mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
black .
This commit is contained in:
@@ -1261,12 +1261,7 @@ class SlabDirectionDecorator:
|
|||||||
if not obj:
|
if not obj:
|
||||||
return
|
return
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if (element
|
if element and (element.is_a("IfcSlab") or element.is_a("IfcRoof")):
|
||||||
and (
|
|
||||||
element.is_a("IfcSlab")
|
|
||||||
or element.is_a("IfcRoof")
|
|
||||||
)
|
|
||||||
):
|
|
||||||
dir = [obj.matrix_world @ Vector(d) for d in dir]
|
dir = [obj.matrix_world @ Vector(d) for d in dir]
|
||||||
base = [obj.matrix_world @ Vector(d) for d in base]
|
base = [obj.matrix_world @ Vector(d) for d in base]
|
||||||
self.draw_batch("LINES", dir, selected_elements_color, [(0, 1), (1, 2), (1, 3)])
|
self.draw_batch("LINES", dir, selected_elements_color, [(0, 1), (1, 2), (1, 3)])
|
||||||
|
|||||||
@@ -825,8 +825,8 @@ class ShowOpenings(Operator, tool.Ifc.Operator):
|
|||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
props = bpy.context.scene.BIMModelProperties
|
props = bpy.context.scene.BIMModelProperties
|
||||||
objs = context.selected_objects
|
objs = context.selected_objects
|
||||||
|
|
||||||
#add the obj's aggregate, as well, to objs
|
# add the obj's aggregate, as well, to objs
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if element and getattr(element, "Decomposes", None):
|
if element and getattr(element, "Decomposes", None):
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ class CreateObjectUI:
|
|||||||
cls.draw_add_object(context)
|
cls.draw_add_object(context)
|
||||||
if len(context.selected_objects) == 2 and tool.Ifc.get_entity(context.selected_objects[0]):
|
if len(context.selected_objects) == 2 and tool.Ifc.get_entity(context.selected_objects[0]):
|
||||||
op_icon = custom_icon_previews["APPLY_VOID"].icon_id
|
op_icon = custom_icon_previews["APPLY_VOID"].icon_id
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.operator("bim.add_opening", text="Apply Void", icon_value=op_icon)
|
row.operator("bim.add_opening", text="Apply Void", icon_value=op_icon)
|
||||||
else:
|
else:
|
||||||
cls.draw_type_manager_launcher(context)
|
cls.draw_type_manager_launcher(context)
|
||||||
|
|||||||
Reference in New Issue
Block a user