71 int main(
int argc,
char *argv[])
75 "convert between surface formats, " 76 "but primarily for testing functionality\n" 77 "Normally use surfaceMeshConvert instead." 95 "geometry scaling factor - default is 1" 105 if (importName == exportName)
108 <<
"Output file " << exportName <<
" would overwrite input file." 126 surf.writeStats(
Info);
131 Info<<
"Checking surface orientation" <<
endl;
138 Info<<
"Cleaning up surface" <<
endl;
140 surf.writeStats(
Info);
144 Info<<
"writing " << exportName;
145 if (scaleFactor <= 0)
151 Info<<
" with scaling " << scaleFactor <<
endl;
152 surf.scalePoints(scaleFactor);
153 surf.writeStats(
Info);
158 surf.
write(exportName,
true);
165 surf.writeStats(
Info);
170 Info<<
"Checking surface orientation" <<
endl;
177 Info<<
"Cleaning up surface" <<
endl;
179 surf.writeStats(
Info);
183 Info<<
"writing " << exportName;
184 if (scaleFactor <= 0)
190 Info<<
" with scaling " << scaleFactor <<
endl;
191 surf.scalePoints(scaleFactor);
192 surf.writeStats(
Info);
195 surf.
write(exportName);
203 surf.writeStats(
Info);
208 Info<<
"Checking surface orientation" <<
endl;
215 Info<<
"Cleaning up surface" <<
endl;
217 surf.writeStats(
Info);
221 Info<<
"writing " << exportName;
222 if (scaleFactor <= 0)
228 Info<<
" with scaling " << scaleFactor <<
endl;
229 surf.scalePoints(scaleFactor);
230 surf.writeStats(
Info);
233 surf.
write(exportName);
241 surf.writeStats(
Info);
246 Info<<
"Checking surface orientation" <<
endl;
253 Info<<
"Cleaning up surface" <<
endl;
255 surf.writeStats(
Info);
260 Info<<
"writing " << exportName;
261 if (scaleFactor <= 0)
267 Info<<
" with scaling " << scaleFactor <<
endl;
268 surf.scalePoints(scaleFactor);
269 surf.writeStats(
Info);
272 surf.
write(exportName);
285 Info<<
"runTime.instance() = " << runTime.instance() <<
endl;
286 Info<<
"runTime.timeName() = " << runTime.timeName() <<
endl;
289 Info<<
"write MeshedSurface 'yetAnother' via proxy as surfMesh" 312 Info<<
"surfIn2 = " << surfIn2.size() <<
endl;
314 Info<<
"surfIn = " << surfIn.size() <<
endl;
317 Info<<
"writing surfMesh as obj = oldSurfIn.obj" <<
endl;
318 surfIn.
write(
"oldSurfIn.obj");
321 Info<<
"runTime.instance() = " << runTime.instance() <<
endl;
337 Info<<
"writing surfMesh as well: " << surfOut.objectPath() <<
endl;
354 Info<<
" surf name= " << surfOut.name() <<
nl;
355 Info<<
"rename to anotherSurf" <<
endl;
356 surfOut.rename(
"anotherSurf");
358 Info<<
" surf name= " << surfOut.name() <<
nl;
361 runTime.setTime(
instant(1), 1);
362 surfOut.setInstance(runTime.timeName());
366 Info<<
"writing surfMesh again well: " << surfOut.objectPath()
371 surfOut.
write(
"someName.ofs");
385 Info<<
"write zoneIds (for testing only): " 386 << zoneIds.objectPath() <<
endl;
410 Info<<
"write pointIds (for testing only): " 411 << pointIds.objectPath() <<
endl;
414 Info<<
"surfMesh with these names: " << surfOut.names() <<
endl;
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
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...
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const fileName & rootPath() const
Return root path.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
A List obtained as a section of another List.
bool optionFound(const word &opt) const
Return true if the named option is found.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
A surface mesh consisting of general polygon faces.
An instant of time. Contains the time value and name.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
word ext() const
Return file name extension (part after last .)
virtual Ostream & write(const token &)=0
Write next token to stream.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
Triangulated surface description with patch information.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...