diff --git a/src/ifcblenderexport/blenderbim/bim/export_ifc.py b/src/ifcblenderexport/blenderbim/bim/export_ifc.py index 95ed12e9a1..912497a8d2 100644 --- a/src/ifcblenderexport/blenderbim/bim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/export_ifc.py @@ -1887,7 +1887,8 @@ class IfcExporter(): def create_model_representation(self, representation): if representation['subcontext'] == 'Annotation': - pass + return self.file.createIfcRepresentationMap(self.origin, + self.create_geometric_set_representation(representation)) elif representation['subcontext'] == 'Axis': return self.file.createIfcRepresentationMap( self.origin, self.create_curve3d_axis_representation(representation)) @@ -1913,7 +1914,9 @@ class IfcExporter(): def create_plan_representation(self, representation): if representation['subcontext'] == 'Annotation': - pass + shape_representation = self.create_geometric_curve_set_representation(representation, is_2d=True) + shape_representation.RepresentationType = 'Annotation2D' + return self.file.createIfcRepresentationMap(self.origin, shape_representation) elif representation['subcontext'] == 'Axis': return self.file.createIfcRepresentationMap( self.origin, self.create_curve2d_axis_representation(representation)) @@ -1986,6 +1989,13 @@ class IfcExporter(): 'Curve', self.create_curves(representation['raw'])) + def create_geometric_set_representation(self, representation, is_2d=False): + geometric_curve_set = self.file.createIfcGeometricSet(self.create_curves(representation['raw'], is_2d=is_2d)) + return self.file.createIfcShapeRepresentation( + self.ifc_rep_context[representation['context']][representation['subcontext']][ + representation['target_view']]['ifc'], + representation['subcontext'], 'GeometricSet', [geometric_curve_set]) + def create_geometric_curve_set_representation(self, representation, is_2d=False): geometric_curve_set = self.file.createIfcGeometricCurveSet(self.create_curves(representation['raw'], is_2d=is_2d)) return self.file.createIfcShapeRepresentation(