mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user