48int 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"
80 const auto visiblePoint =
args.get<
point>(2);
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
99 const scalar scaling =
args.getOrDefault<scalar>(
"scale", -1);
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);
Extract command arguments and options from the supplied argc and argv parameters.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
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.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
static bool orient(triSurface &, const point &, const bool orientOutside)
Flip faces such that normals are consistent with point:
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.
vector point
Point is a vector.
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)