Go to the documentation of this file.
56 int main(
int argc,
char *argv[])
60 "Clean surface by removing baffles, sliver faces,"
61 " collapsing small edges, etc."
73 "Suppress surface checking/cleanup on the input surface"
81 "Input geometry scaling factor"
86 const auto minLen =
args.
get<scalar>(2);
87 const auto minQuality =
args.
get<scalar>(3);
90 Info<<
"Reading surface " << inFileName <<
nl
91 <<
"Collapsing all triangles with" <<
nl
92 <<
" edges or heights < " << minLen <<
nl
93 <<
" quality < " << minQuality <<
nl
94 <<
"Writing result to " << outFileName <<
nl <<
endl;
97 Info<<
"Reading surface from " << inFileName <<
" ..." <<
nl <<
endl;
104 surf.writeStats(
Info);
108 Info<<
"Removing duplicate and illegal triangles ..." <<
nl <<
endl;
112 Info<<
"Collapsing triangles to edges ..." <<
nl <<
endl;
118 if (nEdgeCollapse == 0)
125 const label nSplitEdge =
collapseBase(surf, minLen, minQuality);
134 <<
"Resulting surface:" <<
endl;
135 surf.writeStats(
Info);
138 <<
"Writing refined surface to " << outFileName <<
" ..." <<
endl;
139 surf.
write(outFileName);
A class for handling file names.
T getOrDefault(const word &optName, const T &deflt) const
static void addNote(const string ¬e)
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
T get(const label index) const
static void addArgument(const string &argName, const string &usage="")
Triangulated surface description with patch information.
Routines to collapse small edges.
virtual bool write(const token &tok)=0
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Routines collapse sliver triangles by splitting the base edge.
label collapseBase(triSurface &surf, const scalar minLen, const scalar minQuality)
label collapseEdge(triSurface &surf, const scalar minLen)
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
bool found(const word &optName) const