mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 05:22:06 +00:00
Minor fix
This commit is contained in:
@@ -270,6 +270,8 @@ class CreateDrawing(bpy.types.Operator):
|
|||||||
if obj == self.camera:
|
if obj == self.camera:
|
||||||
continue
|
continue
|
||||||
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
|
if element.is_a("IfcTypeProduct"):
|
||||||
|
continue
|
||||||
representation = ifcopenshell.util.representation.get_representation(
|
representation = ifcopenshell.util.representation.get_representation(
|
||||||
element, "Plan", "Annotation", self.camera.data.BIMCameraProperties.target_view
|
element, "Plan", "Annotation", self.camera.data.BIMCameraProperties.target_view
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -154,13 +154,14 @@ class AddRepresentation(bpy.types.Operator):
|
|||||||
obj.data = mesh
|
obj.data = mesh
|
||||||
Data.load(IfcStore.get_file(), obj.BIMObjectProperties.ifc_definition_id)
|
Data.load(IfcStore.get_file(), obj.BIMObjectProperties.ifc_definition_id)
|
||||||
|
|
||||||
if self.file.schema == "IFC2X3":
|
if product.is_a("IfcTypeProduct"):
|
||||||
types = product.ObjectTypeOf
|
if self.file.schema == "IFC2X3":
|
||||||
else:
|
types = product.ObjectTypeOf
|
||||||
types = product.Types
|
else:
|
||||||
if product.is_a("IfcTypeProduct") and types:
|
types = product.Types
|
||||||
for element in types[0].RelatedObjects:
|
if types:
|
||||||
Data.load(IfcStore.get_file(), element.id())
|
for element in types[0].RelatedObjects:
|
||||||
|
Data.load(IfcStore.get_file(), element.id())
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class VIEW3D_MT_PIE_bim(bpy.types.Menu):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
pie = self.layout.menu_pie()
|
pie = self.layout.menu_pie()
|
||||||
pie.operator("bim.edit_object_placement")
|
pie.operator("bim.edit_object_placement")
|
||||||
pie.operator("bim.update_mesh_representation")
|
pie.operator("bim.update_representation")
|
||||||
pie.operator("bim.pie_add_opening")
|
pie.operator("bim.pie_add_opening")
|
||||||
pie.operator("bim.pie_update_container")
|
pie.operator("bim.pie_update_container")
|
||||||
pie.operator("bim.open_pie_class", text="Assign IFC Class")
|
pie.operator("bim.open_pie_class", text="Assign IFC Class")
|
||||||
|
|||||||
Reference in New Issue
Block a user