41 { algorithmType::ALGO_DEFAULT,
"default" },
42 { algorithmType::ALGO_CELL,
"cell" },
43 { algorithmType::ALGO_POINT,
"point" },
44 { algorithmType::ALGO_TOPO,
"topo" },
54 { filterType::NONE,
"none" },
55 { filterType::PARTIAL,
"partial" },
56 { filterType::FULL,
"full" },
57 { filterType::CLEAN,
"clean" },
59 { filterType::CELL,
"cell" },
70 const algorithmType deflt
76 !
dict.readIfPresentCompat
78 "isoMethod", {{
"isoAlgorithm", 0}},
86 if (!algorithmNames.found(enumName))
89 << enumName <<
" is not in enumeration: "
90 << (algorithmNames) <<
nl
94 return algorithmNames[enumName];
102 const filterType deflt
116 return (sw ? deflt : filterType::NONE);
120 if (!filterNames.found(enumName))
123 << enumName <<
" is not in enumeration: "
124 << (filterNames) <<
nl
136 const algorithmType algo,
137 const filterType filter
158 snap_ =
dict.getOrDefault(
"snap",
true);
159 dict.readIfPresent(
"mergeTol", mergeTol_);
160 dict.readIfPresent(
"bounds", clipBounds_);
167 const algorithmType algo,
168 const filterType filter
185 os <<
" isoMethod:" << algorithmNames[algo_]
186 <<
" regularise:" << filterNames[filter_]
187 <<
" snap:" << snap_;
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
bool good() const noexcept
True if the Switch represents a valid enumeration.
static Switch find(const char *s)
Find switchType for the given string, returning a Switch that can be tested for good() or bad().
A bounding box defined in terms of min/max extrema points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Preferences for controlling iso-surface algorithms.
filterType filter() const noexcept
Get current filter type.
static const Enum< filterType > filterNames
Names for the filtering types.
algorithmType
The algorithm types.
isoSurfaceParams(const algorithmType algo=algorithmType::ALGO_DEFAULT, const filterType filter=filterType::DIAGCELL) noexcept
Default construct, or with specified algorithm.
void print(Ostream &os) const
Print information about the settings.
void setClipBounds(const boundBox &bb)
Set optional clipping bounding box.
static algorithmType getAlgorithmType(const dictionary &dict, const algorithmType deflt)
Get 'isoMethod' or 'isoAlgorithm' as enumeration.
static filterType getFilterType(const dictionary &dict, const filterType deflt)
Get 'regularise' as bool or enumeration.
static const Enum< algorithmType > algorithmNames
Names for the iso-surface algorithms.
filterType
The filtering (regularization) to apply.
@ DIAGCELL
Remove pyramid edge points, face-diagonals.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).