mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 10:59:17 +00:00
Fix bug where adding a representation to type instances didn't ensure it was added to a geometric type
This commit is contained in:
@@ -81,16 +81,6 @@ class AddRepresentation(bpy.types.Operator, Operator):
|
||||
ifc_representation_class=self.ifc_representation_class,
|
||||
profile_set_usage=tool.Ifc.get().by_id(self.profile_set_usage) if self.profile_set_usage else None,
|
||||
)
|
||||
Data.load(tool.Ifc.get(), obj.BIMObjectProperties.ifc_definition_id)
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
if element.is_a("IfcTypeProduct"):
|
||||
if tool.Ifc.get_schema() == "IFC2X3":
|
||||
types = element.ObjectTypeOf
|
||||
else:
|
||||
types = element.Types
|
||||
if types:
|
||||
for element in types[0].RelatedObjects:
|
||||
Data.load(tool.Ifc.get(), element.id())
|
||||
|
||||
|
||||
class SwitchRepresentation(bpy.types.Operator, Operator):
|
||||
|
||||
Reference in New Issue
Block a user