ENH: add -tri (triangulate) option to foamToSurface, surfaceMeshConvert

STYLE: drop surface extraction from foamToStarMesh

- retain surfZone names when writing surfaces
- remove surface extraction/writing from meshWriter since it now
  duplicates what the meshedSurface class can do.
This commit is contained in:
Mark Olesen
2010-02-10 11:49:53 +01:00
parent 0bae7febff
commit 3613752115
15 changed files with 108 additions and 318 deletions

View File

@ -36,6 +36,9 @@ Usage
Specify an alternative geometry scaling factor.
Eg, use @b 1000 to scale @em [m] to @em [mm].
@param -tri \n
Triangulate surface.
\*---------------------------------------------------------------------------*/
#include "argList.H"
@ -62,6 +65,11 @@ int main(int argc, char *argv[])
"scale",
"specify geometry scaling factor"
);
argList::addBoolOption
(
"tri",
"triangulate surface"
);
# include "setRootCase.H"
@ -69,6 +77,7 @@ int main(int argc, char *argv[])
scalar scaleFactor = 0;
args.optionReadIfPresent<scalar>("scale", scaleFactor);
const bool doTriangulate = args.optionFound("tri");
fileName exportName(params[0]);
@ -107,6 +116,12 @@ int main(int argc, char *argv[])
surf.scalePoints(scaleFactor);
Info<< "writing " << exportName;
if (doTriangulate)
{
Info<< " triangulated";
surf.triangulate();
}
if (scaleFactor <= 0)
{
Info<< " without scaling" << endl;