diff --git a/src/ifcblenderexport/blenderbim/bim/export_ifc.py b/src/ifcblenderexport/blenderbim/bim/export_ifc.py index b030db8d0a..7b828fcfc4 100644 --- a/src/ifcblenderexport/blenderbim/bim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/export_ifc.py @@ -2204,6 +2204,8 @@ class IfcExporter(): # TODO: support unclosed surfaces swept_area = self.file.createIfcArbitraryClosedProfileDef('AREA', None, self.create_curves(representation['raw'].bevel_object.data)[0]) + if (representation['raw'].bevel_object.scale - Vector((1, 1, 1))).length > 0.01: + self.scale_ifc_representation(swept_area, representation['raw'].bevel_object.scale) swept_area_solids = [] for spline in representation['raw'].splines: points = self.get_spline_points(spline) @@ -2242,6 +2244,15 @@ class IfcExporter(): representation['subcontext'], 'AdvancedSweptSolid', swept_area_solids) + def scale_ifc_representation(self, rep, scale): + for element in self.file.traverse(rep): + if not element.is_a('IfcCartesianPoint'): + continue + element.Coordinates = tuple(Vector(element.Coordinates) @ Matrix(( + (scale[0], 0, 0), + (0, scale[1], 0), + (0, 0, scale[2])))) + def create_vertex_point(self, point): return self.file.createIfcVertexPoint( self.create_cartesian_point(point.x, point.y, point.z))