diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 0d70c77958..aa8b89c033 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C @@ -40,6 +40,9 @@ Usage @param -triSurface \n Use triSurface library for input/output + @param -keyed \n + Use keyedSurface for input/output + Note The filename extensions are used to determine the file format type. @@ -49,6 +52,7 @@ Note #include "timeSelector.H" #include "Time.H" #include "polyMesh.H" +#include "keyedSurface.H" #include "meshedSurface.H" #include "triSurface.H" @@ -65,6 +69,7 @@ int main(int argc, char *argv[]) argList::validOptions.insert("clean", ""); argList::validOptions.insert("scale", "scale"); argList::validOptions.insert("triSurface", ""); + argList::validOptions.insert("keyed", ""); # include "setRootCase.H" const stringList& params = args.additionalArgs(); @@ -113,6 +118,31 @@ int main(int argc, char *argv[]) Info<< " with scaling " << scaleFactor << endl; surf.scalePoints(scaleFactor); } + + // write sorted by region + surf.write(exportName, true); + } + else if (args.options().found("keyed")) + { + keyedSurface 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); } else diff --git a/src/surfMesh/keyedSurface/fileFormats/ac3d/AC3DfileFormat.C b/src/surfMesh/keyedSurface/fileFormats/ac3d/AC3DfileFormat.C index d92b2f91df..0aa3f7d84f 100644 --- a/src/surfMesh/keyedSurface/fileFormats/ac3d/AC3DfileFormat.C +++ b/src/surfMesh/keyedSurface/fileFormats/ac3d/AC3DfileFormat.C @@ -232,7 +232,8 @@ Foam::fileFormats::AC3DfileFormat::AC3DfileFormat label patchVertOffset = 0; DynamicList pointLst; - DynamicList faceLst; + DynamicList faceLst; + DynamicList