mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add input surface scaling (issue #514)
- surfaceFeatureExtract * dictionary "scale" entry - triSurface - triSurfaceLoader * optional scaleFactor on reading - surfaceAdd - surfaceBooleanFeatures - surfaceClean - surfaceCoarsen * scale option - surfaceTransformPoints, transformPoints * scale option as scalar or vector quantity
This commit is contained in:
@ -339,8 +339,15 @@ int main(int argc, char *argv[])
|
||||
<< " writeObj=" << writeObj
|
||||
<< " writeVTK=" << writeVTK << nl;
|
||||
|
||||
scalar scaleFactor = -1;
|
||||
// Allow rescaling of the surface points (eg, mm -> m)
|
||||
if (surfaceDict.readIfPresent("scale", scaleFactor) && scaleFactor > 0)
|
||||
{
|
||||
Info<<"Scaling : " << scaleFactor << nl;
|
||||
}
|
||||
|
||||
// Load a single file, or load and combine multiple selected files
|
||||
autoPtr<triSurface> surfPtr = loader.load(loadingOption);
|
||||
autoPtr<triSurface> surfPtr = loader.load(loadingOption, scaleFactor);
|
||||
if (!surfPtr.valid() || surfPtr().empty())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
||||
@ -50,6 +50,9 @@ outputName1
|
||||
|
||||
surfaces (surface1.stl surface2.nas);
|
||||
|
||||
// mm -> m scaling
|
||||
// scale 0.001;
|
||||
|
||||
// Generate additional intersection features (none | self | region)
|
||||
intersectionMethod self;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user