mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
Address comment by @RickBrice
This commit is contained in:
@@ -53,10 +53,19 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
auto len = end - start;
|
auto curve_length = end - start;
|
||||||
auto nsteps = (size_t)ceil(len);
|
auto param_type = settings_.get<ifcopenshell::geometry::settings::PiecewiseStepType>().get();
|
||||||
for (size_t i = 0; i <= nsteps; ++i) {
|
auto param = settings_.get<ifcopenshell::geometry::settings::PiecewiseStepParam>().get();
|
||||||
auto m4 = pwf->evaluate(start + len / nsteps * i);
|
size_t num_steps = 0;
|
||||||
|
if (param_type == ifcopenshell::geometry::settings::PiecewiseStepMethod::MAXSTEPSIZE) {
|
||||||
|
// parameter is max step size
|
||||||
|
num_steps = (size_t) std::ceil(curve_length / param);
|
||||||
|
} else {
|
||||||
|
// parameter is minimum number of steps
|
||||||
|
num_steps = (size_t) std::ceil(param);
|
||||||
|
}
|
||||||
|
for (size_t i = 0; i <= num_steps; ++i) {
|
||||||
|
auto m4 = pwf->evaluate(start + curve_length / num_steps * i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|||||||
Reference in New Issue
Block a user