Go to the documentation of this file.
94 int main(
int argc,
char *argv[])
98 "Import from various third-party surface formats into surfMesh"
107 "Perform some surface checking/cleanup on the input surface"
113 "The surface name when writing (default is 'default')"
119 "Input format (default: use file extension)"
125 "Input geometry scaling factor"
131 "Output geometry scaling factor"
143 "The source coordinate system, applied after '-read-scale'",
150 "The target coordinate system, applied before '-write-scale'",
173 const word readFileType
182 <<
"Unsupported file format(s)" <<
nl
187 scalar scaleFactor(0);
199 coordinateSystems::typeName,
221 const auto* csPtr = globalCoords.cfind(csName);
226 <<
"Cannot find -from " << csName <<
nl
227 <<
"available coordinateSystems: "
238 const auto* csPtr = globalCoords.cfind(csName);
243 <<
"Cannot find -to " << csName <<
nl
244 <<
"available coordinateSystems: "
253 if (fromCsys && toCsys)
256 <<
"Only allowed '-from' or '-to' option at the moment."
266 Info<<
"scale input " << scaleFactor <<
nl;
267 surf.scalePoints(scaleFactor);
277 Info<<
"move points from coordinate system: "
278 << fromCsys->name() <<
endl;
280 surf.movePoints(tpf());
285 Info<<
"move points to coordinate system: "
286 << toCsys->name() <<
endl;
288 surf.movePoints(tpf());
293 Info<<
"scale output " << scaleFactor <<
nl;
294 surf.scalePoints(scaleFactor);
309 Info<<
"writing surfMesh:\n " << smesh.objectPath() <<
endl;
static autoPtr< T > New(Args &&... args)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
A class for handling file names.
T getOrDefault(const word &optName, const T &deflt) const
A class for managing temporary objects.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
static void addNote(const string ¬e)
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
Ostream & endl(Ostream &os)
T get(const label index) const
bool readIfPresent(const word &optName, T &val) const
static bool canRead(const fileName &name, bool verbose=false)
static void addArgument(const string &argName, const string &usage="")
instantList times() const
static IOobject selectIO(const IOobject &io, const fileName &altFile, const word &ioName="")
A centralized collection of named coordinate systems.
virtual bool write(const token &tok)=0
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void setTime(const Time &t)
word name(const expressions::valueTypeCode typeCode)
An instant of time. Contains the time value and name.
fileName objectPath() const
const word & constant() const
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
bool found(const word &optName) const