mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Handle RuntimeError in alignment geometry generation
Add RuntimeError handling for IfcOpenShell versions that don't support the piecewise-step-type setting in geometry generation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,10 @@ def generate_vertices(rep_curve: entity_instance, distance_interval: float = 5.0
|
||||
)
|
||||
|
||||
s = ifcopenshell.geom.settings()
|
||||
s.set("piecewise-step-type", 0) # 0 = step-size is maximum step size, 1 = step-size is mininimum number of steps
|
||||
try:
|
||||
s.set("piecewise-step-type", 0) # 0 = step-size is maximum step size, 1 = step-size is mininimum number of steps
|
||||
except RuntimeError:
|
||||
pass # Setting not available in older IfcOpenShell versions
|
||||
s.set("piecewise-step-size", distance_interval)
|
||||
shape = ifcopenshell.geom.create_shape(s, rep_curve)
|
||||
vertices = shape.verts
|
||||
|
||||
Reference in New Issue
Block a user