This commit is contained in:
Dion Moult
2022-10-19 18:54:35 +11:00
parent 83bd0a973c
commit 2cad62554e
2 changed files with 3 additions and 2 deletions
@@ -47,6 +47,7 @@ class AddFilledOpening(bpy.types.Operator, tool.Ifc.Operator):
def _execute(self, context):
props = context.scene.BIMModelProperties
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
voided_obj = bpy.data.objects.get(self.voided_obj)
filling_obj = bpy.data.objects.get(self.filling_obj)
@@ -75,7 +76,7 @@ class AddFilledOpening(bpy.types.Operator, tool.Ifc.Operator):
if container:
container_obj = tool.Ifc.get_object(container)
if container_obj:
new_matrix[2][3] = container_obj.matrix_world[2][3] + props.rl2
new_matrix[2][3] = container_obj.matrix_world[2][3] + (props.rl2 * unit_scale)
filling_obj.matrix_world = new_matrix
bpy.context.view_layer.update()
@@ -569,7 +569,7 @@ class DumbWallGenerator:
matrix_world = Matrix.Rotation(self.rotation, 4, "Z")
matrix_world.col[3] = self.location.to_4d()
if self.collection_obj and self.collection_obj.BIMObjectProperties.ifc_definition_id:
matrix_world[2][3] = self.collection_obj.location[2] + props.rl1
matrix_world[2][3] = self.collection_obj.location[2] + (props.rl1 * self.unit_scale)
obj.matrix_world = matrix_world
bpy.context.view_layer.update()
self.collection.objects.link(obj)