diff --git a/src/blenderbim/blenderbim/bim/export_ifc.py b/src/blenderbim/blenderbim/bim/export_ifc.py index 3d0500bd8f..414b228203 100644 --- a/src/blenderbim/blenderbim/bim/export_ifc.py +++ b/src/blenderbim/blenderbim/bim/export_ifc.py @@ -132,6 +132,9 @@ class IfcExporter: def sync_object_placement(self, obj): blender_matrix = np.array(obj.matrix_world) element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id) + if list(obj.scale) != [1., 1., 1.]: + bpy.ops.bim.update_representation(obj=obj.name) + return element if element.is_a("IfcGridAxis"): return self.sync_grid_axis_object_placement(obj, element) if not hasattr(element, "ObjectPlacement"): diff --git a/src/blenderbim/test/bim/feature/project.feature b/src/blenderbim/test/bim/feature/project.feature index e95aef66e4..ef76a7e0ac 100644 --- a/src/blenderbim/test/bim/feature/project.feature +++ b/src/blenderbim/test/bim/feature/project.feature @@ -374,3 +374,16 @@ Scenario: Export IFC - with changed spatial container synchronised And an empty Blender session is started And I press "bim.load_project(filepath='{cwd}/test/files/export.ifc')" Then the object "IfcSlab/Slab" is in the collection "IfcBuildingStorey/Level 1" + +Scenario: Export IFC - with changed object scale synchronised + Given an empty IFC project + And I add a cube + And the object "Cube" is selected + And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" + And I press "bim.assign_class" + And the object "IfcWall/Cube" is selected + When the object "IfcWall/Cube" is scaled to "2" + And I press "export_ifc.bim(filepath='{cwd}/test/files/export.ifc')" + And an empty Blender session is started + And I press "bim.load_project(filepath='{cwd}/test/files/export.ifc')" + Then the object "IfcWall/Cube" dimensions are "4,4,4"