mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Applied formatting
This commit is contained in:
committed by
Ryan Schultz
parent
8b621089a8
commit
428a780181
@@ -800,6 +800,7 @@ class FlipFill(bpy.types.Operator, tool.Ifc.Operator):
|
||||
tool.Geometry.reload_representation(filled_object)
|
||||
|
||||
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -682,6 +682,7 @@ class MirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
obj.matrix_world = newmat
|
||||
|
||||
|
||||
class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bl_idname = "bim.mirror_geometry"
|
||||
bl_label = "Mirror Element Geometry"
|
||||
@@ -695,7 +696,7 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||
def _execute(self, context):
|
||||
for obj in context.selected_objects:
|
||||
self.mirror_obj(context, obj)
|
||||
return { "FINISHED" }
|
||||
return {"FINISHED"}
|
||||
|
||||
def mirror_obj(self, context: bpy.types.Context, obj: bpy.types.Object):
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
@@ -742,7 +743,7 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||
if element.is_a("IfcProduct"):
|
||||
if not element.Representation:
|
||||
return
|
||||
|
||||
|
||||
for representation in element.Representation.Representations:
|
||||
for item in representation.Items:
|
||||
builder = ifcopenshell.util.shape_builder.ShapeBuilder(tool.Ifc.get())
|
||||
@@ -799,7 +800,7 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||
|
||||
inverted_type = tool.Blender.Modifier.has_mirrored_type(type_element)
|
||||
if not inverted_type:
|
||||
old_to_new, _ = tool.Geometry.duplicate_ifc_objects([ tool.Ifc.get_object(type_element) ])
|
||||
old_to_new, _ = tool.Geometry.duplicate_ifc_objects([tool.Ifc.get_object(type_element)])
|
||||
inverted_type = old_to_new[type_element][0]
|
||||
self.invert_representation(inverted_type)
|
||||
tool.Blender.Modifier.set_mirrored_type(inverted_type, type_element)
|
||||
|
||||
Reference in New Issue
Block a user