Skip to content

Commit 117f663

Browse files
committed
Fix bug where you couldn't add a plan representation to something with no context identifier
1 parent 9606103 commit 117f663

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ifcopenshell-python/ifcopenshell/api/geometry/add_representation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ def create_plan_representation(self):
142142
pass
143143
elif self.settings["context"].ContextIdentifier == "SurveyPoints":
144144
pass
145+
else:
146+
if isinstance(self.settings["geometry"], bpy.types.TextCurve):
147+
return self.create_text_representation()
148+
shape_representation = self.create_geometric_curve_set_representation(is_2d=True)
149+
shape_representation.RepresentationType = "Annotation2D"
150+
return shape_representation
145151

146152
def create_lighting_representation(self):
147153
return self.file.createIfcShapeRepresentation(

0 commit comments

Comments
 (0)