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:
Mark Olesen
2017-08-14 09:18:15 +02:00
parent aad962a0e4
commit 139edb2468
24 changed files with 305 additions and 169 deletions

View File

@ -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

View File

@ -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;