mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fixes divide by zero error for zero-length segments. See Issue #4713.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user