71 int main(
int argc,
char *argv[])
77 "convert between surface formats, " 78 "but primarily for testing functionality\n" 79 "Normally use surfaceMeshConvert instead." 96 "geometry scaling factor - default is 1" 106 if (importName == exportName)
109 <<
"Output file " << exportName <<
" would overwrite input file." 127 surf.writeStats(
Info);
132 Info<<
"Checking surface orientation" <<
endl;
139 Info<<
"Cleaning up surface" <<
endl;
141 surf.writeStats(
Info);
145 Info<<
"writing " << exportName;
146 if (scaleFactor <= 0)
152 Info<<
" with scaling " << scaleFactor <<
endl;
153 surf.scalePoints(scaleFactor);
154 surf.writeStats(
Info);
159 surf.
write(exportName,
true);
166 surf.writeStats(
Info);
171 Info<<
"Checking surface orientation" <<
endl;
178 Info<<
"Cleaning up surface" <<
endl;
180 surf.writeStats(
Info);
184 Info<<
"writing " << exportName;
185 if (scaleFactor <= 0)
191 Info<<
" with scaling " << scaleFactor <<
endl;
192 surf.scalePoints(scaleFactor);
193 surf.writeStats(
Info);
196 surf.
write(exportName);
204 surf.writeStats(
Info);
209 Info<<
"Checking surface orientation" <<
endl;
216 Info<<
"Cleaning up surface" <<
endl;
218 surf.writeStats(
Info);
222 Info<<
"writing " << exportName;
223 if (scaleFactor <= 0)
229 Info<<
" with scaling " << scaleFactor <<
endl;
230 surf.scalePoints(scaleFactor);
231 surf.writeStats(
Info);
234 surf.
write(exportName);
242 surf.writeStats(
Info);
247 Info<<
"Checking surface orientation" <<
endl;
254 Info<<
"Cleaning up surface" <<
endl;
256 surf.writeStats(
Info);
261 Info<<
"writing " << exportName;
262 if (scaleFactor <= 0)
268 Info<<
" with scaling " << scaleFactor <<
endl;
269 surf.scalePoints(scaleFactor);
270 surf.writeStats(
Info);
273 surf.
write(exportName);
290 Info<<
"write MeshedSurface 'yetAnother' via proxy as surfMesh" 313 Info<<
"surfIn2 = " << surfIn2.size() <<
endl;
315 Info<<
"surfIn = " << surfIn.size() <<
endl;
318 Info<<
"writing surfMesh as obj = oldSurfIn.obj" <<
endl;
340 Info<<
"writing surfMesh as well: " 341 << surfOut.localObjectPath() <<
endl;
358 Info<<
" surf name= " << surfOut.name() <<
nl;
359 Info<<
"rename to anotherSurf" <<
endl;
360 surfOut.rename(
"anotherSurf");
362 Info<<
" surf name= " << surfOut.name() <<
nl;
370 Info<<
"writing surfMesh again well: " 371 << surfOut.localObjectPath()
376 surfOut.surfMesh::write(
fileName(
"someName.ofs"));
390 Info<<
"write zoneIds (for testing only): " 391 << zoneIds.localObjectPath() <<
endl;
413 Info<<
"write pointIds (for testing only): " 414 << pointIds.localObjectPath() <<
endl;
417 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.
virtual Ostream & write(const char)=0
Write character.
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...
const fileName & rootPath() const
Return root path.
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.
bool optionFound(const word &opt) const
Return true if the named option is found.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static void write(const fileName &, const surfMesh &)
Write to file.
word ext() const
Return file name extension (part after last .)
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
A List obtained as a section of another List.
const word & constant() const
Return constant name.
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.
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
An instant of time. Contains the time value and name.
const fileName & instance() const
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...
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...