50int main(
int argc,
char *argv[])
54 "Merge points on surface if they are within absolute distance [m]."
65 "Input geometry scaling factor"
71 const auto mergeTol =
args.get<scalar>(2);
74 const scalar scaling =
args.getOrDefault<scalar>(
"scale", -1);
76 Info<<
"Reading surface from " << surfFileName <<
" ..." <<
nl
77 <<
"Merging points within " << mergeTol <<
" metre." <<
nl;
80 Info<<
"input scaling " << scaling <<
nl;
85 Info<<
"Original surface:" <<
nl;
86 surf1.writeStats(
Info);
92 const label nOldVert = cleanSurf.nPoints();
96 Info<<
"After merging points:" <<
endl;
98 cleanSurf.writeStats(
Info);
100 if (nOldVert == cleanSurf.nPoints())
106 cleanSurf.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 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.
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)