mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
promote get_shape_aspects to util.element method
This commit is contained in:
@@ -102,7 +102,7 @@ class RepresentationsData:
|
||||
|
||||
# shape aspects matching context of the active representation
|
||||
matching_shape_aspects = []
|
||||
for shape_aspect in tool.Geometry.get_shape_aspects(element):
|
||||
for shape_aspect in ifcopenshell.util.element.get_shape_aspects(element):
|
||||
matching_representation = tool.Geometry.get_shape_aspect_representation(shape_aspect, base_representation)
|
||||
if matching_representation:
|
||||
matching_shape_aspects.append(shape_aspect)
|
||||
|
||||
@@ -779,18 +779,6 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
also_consider = list(consider_inverses)
|
||||
ifcopenshell.util.element.remove_deep2(ifc_file, representation_item, also_consider=also_consider)
|
||||
|
||||
@classmethod
|
||||
def get_shape_aspects(cls, element):
|
||||
# IfcProduct
|
||||
if hasattr(element, "Representation"):
|
||||
return element.Representation.HasShapeAspects
|
||||
|
||||
# IfcTypeProduct
|
||||
shape_aspects = []
|
||||
for repersentation_map in element.RepresentationMaps:
|
||||
shape_aspects += repersentation_map.HasShapeAspects
|
||||
return shape_aspects
|
||||
|
||||
@classmethod
|
||||
def create_shape_aspect(cls, product_shape, base_representation, items, previous_shape_aspect=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user