Fix #4802. Fix ability to edit CARTESIAN_POINT offset meshes in offset models.

This commit is contained in:
Dion Moult
2024-06-07 14:32:00 +10:00
parent 698c648413
commit d0058a1bde
2 changed files with 23 additions and 10 deletions
@@ -30,6 +30,14 @@ class Surveyor(blenderbim.core.tool.Surveyor):
props = bpy.context.scene.BIMGeoreferenceProperties
if props.has_blender_offset and obj.BIMObjectProperties.blender_offset_type != "NOT_APPLICABLE":
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
if (
obj.BIMObjectProperties.blender_offset_type == "CARTESIAN_POINT"
and obj.BIMObjectProperties.cartesian_point_offset
):
offset_x, offset_y, offset_z = map(float, obj.BIMObjectProperties.cartesian_point_offset.split(","))
matrix[0][3] -= offset_x
matrix[1][3] -= offset_y
matrix[2][3] -= offset_z
matrix = np.array(
ifcopenshell.util.geolocation.local2global(
matrix,