mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Remove try except blocks, rename piecewise-step to function-step, remove settings where default suffices
This commit is contained in:
@@ -100,14 +100,7 @@ def generate_vertices(rep_curve: entity_instance, distance_interval: float = 5.0
|
||||
)
|
||||
|
||||
s = ifcopenshell.geom.settings()
|
||||
try:
|
||||
s.set("piecewise-step-type", 0) # 0 = step-size is maximum step size, 1 = step-size is mininimum number of steps
|
||||
except RuntimeError:
|
||||
print("[util.py] piecewise-step-type setting not available, skipping")
|
||||
try:
|
||||
s.set("piecewise-step-size", distance_interval)
|
||||
except RuntimeError:
|
||||
print("[util.py] piecewise-step-size setting not available, skipping")
|
||||
s.set("function-step-param", distance_interval)
|
||||
shape = ifcopenshell.geom.create_shape(s, rep_curve)
|
||||
vertices = shape.verts
|
||||
if len(vertices) == 0:
|
||||
|
||||
Reference in New Issue
Block a user