Adds conversion settings to control the granularity of points computed for a piecewise_function

This commit is contained in:
Richard Brice
2023-11-22 15:49:24 -08:00
parent 39c3cac05d
commit 2126381a15
9 changed files with 64 additions and 14 deletions
+14
View File
@@ -37,3 +37,17 @@ std::istream& ifcopenshell::geometry::settings::operator>>(std::istream& in, Ite
}
return in;
}
std::istream& ifcopenshell::geometry::settings::operator>>(std::istream& in, PiecewiseStepMethod& ioo) {
std::string token;
in >> token;
boost::to_upper(token);
if (token == "MAXSTEPSIZE") {
ioo = MAXSTEPSIZE;
} else if (token == "MINSTEPS") {
ioo = MINSTEPS;
} else {
in.setstate(std::ios_base::failbit);
}
return in;
}