Fixes divide by zero error for zero-length segments. See Issue #4713.

This commit is contained in:
Richard Brice
2024-05-21 16:22:44 -07:00
parent a45f6f980f
commit a976e63def
+2
View File
@@ -473,6 +473,8 @@ ifcopenshell::geometry::taxonomy::item::ptr ifcopenshell::geometry::taxonomy::pi
num_steps = (unsigned)std::ceil(param);
}
num_steps = std::max(1u, num_steps); // never have fewer than 1 step
return evaluate(0.0, curve_length, num_steps);
}