Fixes problems with horizontal curves and clothoid spirals

This commit is contained in:
Richard Brice
2023-10-13 15:03:23 -07:00
parent 53096017f5
commit c1cab4b186
3 changed files with 45 additions and 63 deletions
+1 -2
View File
@@ -454,13 +454,12 @@ ifcopenshell::geometry::taxonomy::solid::ptr ifcopenshell::geometry::create_box(
ifcopenshell::geometry::taxonomy::item::ptr ifcopenshell::geometry::taxonomy::piecewise_function::evaluate() const {
// @todo configure resolution
//double length = std::accumulate(spans.begin(), spans.end(), 0.0); // don't know why this doesn't compile
double length = 0.0;
for (auto& s : spans)
length += s.first;
static const double resolution = 0.5;
std::vector<taxonomy::point3::ptr> polygon;
std::vector<taxonomy::point3::ptr> polygon;
int num_steps = std::ceil(length / resolution);
for (int i = 0; i < num_steps; ++i) {