Sliding doors - moved annotation arrow to Annotation/PLAN_VIEW #2919

This commit is contained in:
Andrej730
2023-04-04 18:29:49 +05:00
parent b44cd7e153
commit 5d4ecb7177
3 changed files with 75 additions and 42 deletions
@@ -513,18 +513,19 @@ class ShapeBuilder:
)
return extruded_area
def get_representation(self, context, items):
def get_representation(self, context, items, representation_type=None):
# > items - could be a list or single curve/IfcExtrudedAreaSolid
# < IfcShapeRepresentation
if not isinstance(items, collections.abc.Iterable):
items = [items]
if items[0].is_a("IfcExtrudedAreaSolid"):
representation_type = "SweptSolid"
elif items[0].is_a("IfcCurve") and items[0].Dim == 3:
representation_type = "Curve3D"
else:
representation_type = "Curve2D"
if not representation_type:
if items[0].is_a("IfcExtrudedAreaSolid"):
representation_type = "SweptSolid"
elif items[0].is_a("IfcCurve") and items[0].Dim == 3:
representation_type = "Curve3D"
else:
representation_type = "Curve2D"
representation = self.file.createIfcShapeRepresentation(
ContextOfItems=context,