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: "
280 surf.movePoints(tpf());
285 Info<<
"move points to coordinate system: "
288 surf.movePoints(tpf());
293 Info<<
"scale output " << scaleFactor <<
nl;
294 surf.scalePoints(scaleFactor);
309 Info<<
"writing surfMesh:\n " << smesh.objectPath() <<
endl;
point globalPosition(const point &local) const
From local coordinate position to global (cartesian) position.
word lessExt() const
Return word without extension (part before last .)
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
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
Get a value from the named option if present, or return default.
A class for managing temporary objects.
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
virtual const word & name() const
Return the name.
static void addNote(const string ¬e)
Add extra notes for the usage information.
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Specify an alias for the option name.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
Ostream & endl(Ostream &os)
Add newline and flush stream.
word ext() const
Return file name extension (part after last .)
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
instantList times() const
Search the case for valid time directories.
static IOobject selectIO(const IOobject &io, const fileName &altFile, const word &ioName="")
Return the IOobject, but also consider an alternative file name.
A centralized collection of named coordinate systems.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
point localPosition(const point &global) const
From global (cartesian) position to local coordinate position.
An instant of time. Contains the time value and name.
static void noParallel()
Remove the parallel options.
fileName objectPath() const
The complete path + object name.
const word & constant() const
Return constant name.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.