48int main(
int argc,
char *argv[])
52 "Set face normals consistent with a user-provided 'outside' point"
55 argList::noParallel();
56 argList::addArgument(
"input",
"The input surface file");
57 argList::addArgument(
"point",
"The visible 'outside' point");
58 argList::addArgument(
"output",
"The output surface file");
60 argList::addBoolOption
63 "Treat provided point as being inside"
65 argList::addBoolOption
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;
114 anyFlipped = orientedSurface::orient
124 anyFlipped = orientedSurface::orient
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);
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Extract command arguments and options from the supplied argc and argv parameters.
T get(const label index) const
Get a value from the argument at index.
bool found(const word &optName) const
Return true if the named option is found.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
A class for handling file names.
Helper class to search on triSurface.
Triangulated surface description with patch information.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)