48 int main(
int argc,
char *argv[])
52 "Set face normals consistent with a user-provided 'outside' point" 63 "Treat provided point as being inside" 68 "Determine orientation by counting number of intersections" 74 "Input geometry scaling factor" 83 const bool orientInside =
args.
found(
"inside");
84 const bool usePierceTest =
args.
found(
"usePierceTest");
86 Info<<
"Reading surface from " << surfFileName <<
nl 87 <<
"Orienting surface such that visiblePoint " << visiblePoint
102 Info<<
"Input scaling: " << scaling <<
nl;
108 bool anyFlipped =
false;
134 Info<<
"Flipped orientation of (part of) surface." <<
nl;
138 Info<<
"Did not flip orientation of any triangle of surface." <<
nl;
141 Info<<
"Writing new surface to " << outFileName <<
endl;
143 surf.
write(outFileName);
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool orient(triSurface &, const point &, const bool orientOutside)
Flip faces such that normals are consistent with point:
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
Helper class to search on triSurface.
Extract command arguments and options from the supplied argc and argv parameters. ...
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
T get(const label index) const
Get a value from the argument at index.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Triangulated surface description with patch information.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.