mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 03:14:23 +00:00
Fix #2510.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user