surfMesh code cleanup

- added protected storedPoints(), storedFaces() functions for non-const
   access to the data. Mixing protected non-const versions and public const
   versions of the same method does not agree with the compiler
 - better handling of triFace/face distinction
This commit is contained in:
Mark Olesen
2008-11-15 23:29:50 +01:00
parent 59bfd4ecef
commit c651a0ba29
45 changed files with 639 additions and 739 deletions

View File

@ -71,6 +71,7 @@ int main(int argc, char *argv[])
argList::validOptions.insert("scale", "scale");
argList::validOptions.insert("triSurface", "");
argList::validOptions.insert("unsorted", "");
argList::validOptions.insert("triFace", "");
# include "setRootCase.H"
const stringList& params = args.additionalArgs();
@ -125,7 +126,7 @@ int main(int argc, char *argv[])
}
else if (args.options().found("unsorted"))
{
unsortedMeshedSurface surf(importName);
UnsortedMeshedSurface<face> surf(importName);
if (args.options().found("clean"))
{
@ -146,9 +147,33 @@ int main(int argc, char *argv[])
surf.write(exportName);
}
#if 1
else if (args.options().found("triFace"))
{
MeshedSurface<triFace> surf(importName);
if (args.options().found("clean"))
{
surf.cleanup(true);
surf.checkOrientation(true);
}
Info<< "writing " << exportName;
if (scaleFactor <= 0)
{
Info<< " without scaling" << endl;
}
else
{
Info<< " with scaling " << scaleFactor << endl;
surf.scalePoints(scaleFactor);
}
surf.write(exportName);
}
#endif
else
{
meshedSurface surf(importName);
MeshedSurface<face> surf(importName);
if (args.options().found("clean"))
{