Minor georeferencing offset fix after recent fixes

This commit is contained in:
Dion Moult
2024-06-07 20:06:57 +10:00
parent af5838cba6
commit f565b4e8f0
@@ -374,14 +374,12 @@ class UpdateRepresentation(bpy.types.Operator, Operator):
gprop = context.scene.BIMGeoreferenceProperties gprop = context.scene.BIMGeoreferenceProperties
coordinate_offset = None coordinate_offset = None
if gprop.has_blender_offset and obj.BIMObjectProperties.blender_offset_type == "CARTESIAN_POINT": if (
coordinate_offset = Vector( gprop.has_blender_offset
( and obj.BIMObjectProperties.blender_offset_type == "CARTESIAN_POINT"
float(gprop.blender_eastings), and obj.BIMObjectProperties.cartesian_point_offset
float(gprop.blender_northings), ):
float(gprop.blender_orthogonal_height), coordinate_offset = Vector(map(float, obj.BIMObjectProperties.cartesian_point_offset.split(",")))
)
)
representation_data = { representation_data = {
"context": context_of_items, "context": context_of_items,
@@ -948,7 +946,7 @@ class OverrideDuplicateMove(bpy.types.Operator):
pset = ifcopenshell.util.element.get_pset(new[0], "BBIM_Linked_Aggregate") pset = ifcopenshell.util.element.get_pset(new[0], "BBIM_Linked_Aggregate")
if pset: if pset:
pset = tool.Ifc.get().by_id(pset["id"]) pset = tool.Ifc.get().by_id(pset["id"])
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=new[0],pset=pset) ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), product=new[0], pset=pset)
if new[0].is_a("IfcElementAssembly"): if new[0].is_a("IfcElementAssembly"):
linked_aggregate_group = [ linked_aggregate_group = [
@@ -1176,7 +1174,10 @@ class DuplicateLinkedAggregateTo3dCursor(bpy.types.Operator):
return OverrideDuplicateMove.execute_duplicate_operator(self, context, linked=False) return OverrideDuplicateMove.execute_duplicate_operator(self, context, linked=False)
def _execute(self, context): def _execute(self, context):
return DuplicateMoveLinkedAggregate.execute_ifc_duplicate_linked_aggregate_operator(self, context, location_from_3d_cursor=True) return DuplicateMoveLinkedAggregate.execute_ifc_duplicate_linked_aggregate_operator(
self, context, location_from_3d_cursor=True
)
class RefreshLinkedAggregate(bpy.types.Operator): class RefreshLinkedAggregate(bpy.types.Operator):
bl_idname = "bim.refresh_linked_aggregate" bl_idname = "bim.refresh_linked_aggregate"