Go to the documentation of this file.
57 #include "triSurface.H"
70 int main(
int argc,
char *argv[])
74 "convert between surface formats, "
75 "but primarily for testing functionality\n"
76 "Normally use surfaceMeshConvert instead."
94 "geometry scaling factor - default is 1"
104 if (importName == exportName)
107 <<
"Output file " << exportName <<
" would overwrite input file."
125 surf.writeStats(
Info);
130 Info<<
"Checking surface orientation" <<
endl;
137 Info<<
"Cleaning up surface" <<
endl;
139 surf.writeStats(
Info);
143 Info<<
"writing " << exportName;
144 if (scaleFactor <= 0)
150 Info<<
" with scaling " << scaleFactor <<
endl;
151 surf.scalePoints(scaleFactor);
152 surf.writeStats(
Info);
157 surf.
write(exportName,
true);
164 surf.writeStats(
Info);
169 Info<<
"Checking surface orientation" <<
endl;
176 Info<<
"Cleaning up surface" <<
endl;
178 surf.writeStats(
Info);
182 Info<<
"writing " << exportName;
183 if (scaleFactor <= 0)
189 Info<<
" with scaling " << scaleFactor <<
endl;
190 surf.scalePoints(scaleFactor);
191 surf.writeStats(
Info);
194 surf.
write(exportName);
202 surf.writeStats(
Info);
207 Info<<
"Checking surface orientation" <<
endl;
214 Info<<
"Cleaning up surface" <<
endl;
216 surf.writeStats(
Info);
220 Info<<
"writing " << exportName;
221 if (scaleFactor <= 0)
227 Info<<
" with scaling " << scaleFactor <<
endl;
228 surf.scalePoints(scaleFactor);
229 surf.writeStats(
Info);
232 surf.
write(exportName);
240 surf.writeStats(
Info);
245 Info<<
"Checking surface orientation" <<
endl;
252 Info<<
"Cleaning up surface" <<
endl;
254 surf.writeStats(
Info);
259 Info<<
"writing " << exportName;
260 if (scaleFactor <= 0)
266 Info<<
" with scaling " << scaleFactor <<
endl;
267 surf.scalePoints(scaleFactor);
268 surf.writeStats(
Info);
271 surf.
write(exportName);
282 runTime.setTime(
instant(0, runTime.constant()), 0);
284 Info<<
"runTime.instance() = " << runTime.instance() <<
endl;
285 Info<<
"runTime.timeName() = " << runTime.timeName() <<
endl;
288 Info<<
"write MeshedSurface 'yetAnother' via proxy as surfMesh"
311 Info<<
"surfIn2 = " << surfIn2.size() <<
endl;
313 Info<<
"surfIn = " << surfIn.size() <<
endl;
316 Info<<
"writing surfMesh as obj = oldSurfIn.obj" <<
endl;
317 surfIn.
write(
"oldSurfIn.obj");
320 Info<<
"runTime.instance() = " << runTime.instance() <<
endl;
336 Info<<
"writing surfMesh as well: " << surfOut.objectPath() <<
endl;
353 Info<<
" surf name= " << surfOut.name() <<
nl;
354 Info<<
"rename to anotherSurf" <<
endl;
355 surfOut.rename(
"anotherSurf");
357 Info<<
" surf name= " << surfOut.name() <<
nl;
360 runTime.setTime(
instant(1), 1);
361 surfOut.setInstance(runTime.timeName());
365 Info<<
"writing surfMesh again well: " << surfOut.objectPath()
370 surfOut.
write(
"someName.ofs");
384 Info<<
"write zoneIds (for testing only): "
385 << zoneIds.objectPath() <<
endl;
409 Info<<
"write pointIds (for testing only): "
410 << pointIds.objectPath() <<
endl;
413 Info<<
"surfMesh with these names: " << surfOut.names() <<
endl;
static SLList< string > validArgs
A list of valid (mandatory) arguments.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling file names.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
#define forAll(list, i)
Loop across all elements in list.
A List obtained as a section of another List.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
A surface mesh consisting of general polygon faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fileName & rootPath() const
Return root path.
Triangulated surface description with patch information.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
virtual Ostream & write(const token &)=0
Write next token to stream.
int main(int argc, char *argv[])
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
word ext() const
Return file name extension (part after last .)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool optionFound(const word &opt) const
Return true if the named option is found.
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
An instant of time. Contains the time value and name.
static void noParallel()
Remove the parallel options.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Foam::argList args(argc, argv)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...