Fix #4057. Data objects for the API are now in util.data instead of mixed into the shape builder utility and only depends on numpy.

This commit is contained in:
Dion Moult
2023-11-29 14:35:46 +11:00
parent 25bd94e84a
commit e8bd272189
5 changed files with 107 additions and 63 deletions
@@ -27,8 +27,8 @@ class Usecase:
"context": None, # IfcGeometricRepresentationContext
"depth": 0.2,
"x_angle": 0, # Radians
# Planes are defined either by ClippingInfo objects
# or by dictionaries of arguments for `ClippingInfo.parse`
# Planes are defined either by Clipping objects
# or by dictionaries of arguments for `Clipping.parse`
"clippings": [], # A list of planes that define clipping half space solids
}
for key, value in settings.items():
@@ -83,7 +83,7 @@ class Usecase:
new = ifcopenshell.util.element.copy(self.file, clipping)
new.FirstOperand = first_operand
first_operand = new
else: # ClippingInfo
else: # Clipping
first_operand = clipping.apply(self.file, first_operand, self.settings["unit_scale"])
return first_operand