mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 21:06:25 +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)
|
tool.Geometry.reload_representation(filled_object)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -682,6 +682,7 @@ class MirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
|
|
||||||
obj.matrix_world = newmat
|
obj.matrix_world = newmat
|
||||||
|
|
||||||
|
|
||||||
class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
bl_idname = "bim.mirror_geometry"
|
bl_idname = "bim.mirror_geometry"
|
||||||
bl_label = "Mirror Element Geometry"
|
bl_label = "Mirror Element Geometry"
|
||||||
@@ -695,7 +696,7 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
for obj in context.selected_objects:
|
for obj in context.selected_objects:
|
||||||
self.mirror_obj(context, obj)
|
self.mirror_obj(context, obj)
|
||||||
return { "FINISHED" }
|
return {"FINISHED"}
|
||||||
|
|
||||||
def mirror_obj(self, context: bpy.types.Context, obj: bpy.types.Object):
|
def mirror_obj(self, context: bpy.types.Context, obj: bpy.types.Object):
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
@@ -742,7 +743,7 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
if element.is_a("IfcProduct"):
|
if element.is_a("IfcProduct"):
|
||||||
if not element.Representation:
|
if not element.Representation:
|
||||||
return
|
return
|
||||||
|
|
||||||
for representation in element.Representation.Representations:
|
for representation in element.Representation.Representations:
|
||||||
for item in representation.Items:
|
for item in representation.Items:
|
||||||
builder = ifcopenshell.util.shape_builder.ShapeBuilder(tool.Ifc.get())
|
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)
|
inverted_type = tool.Blender.Modifier.has_mirrored_type(type_element)
|
||||||
if not inverted_type:
|
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]
|
inverted_type = old_to_new[type_element][0]
|
||||||
self.invert_representation(inverted_type)
|
self.invert_representation(inverted_type)
|
||||||
tool.Blender.Modifier.set_mirrored_type(inverted_type, type_element)
|
tool.Blender.Modifier.set_mirrored_type(inverted_type, type_element)
|
||||||
|
|||||||
Reference in New Issue
Block a user