mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 13:26:36 +00:00
Fix bug where only a light removal occured when removing elements. Now, a full geometry purge is done as well.
This commit is contained in:
@@ -24,7 +24,7 @@ class Data:
|
||||
else:
|
||||
representations = []
|
||||
elif product.is_a("IfcTypeProduct"):
|
||||
representations = [rm.MappedRepresentation for rm in product.RepresentationMaps]
|
||||
representations = [rm.MappedRepresentation for rm in product.RepresentationMaps or []]
|
||||
for representation in representations:
|
||||
c = representation.ContextOfItems
|
||||
rep_id = int(representation.id())
|
||||
|
||||
@@ -230,8 +230,7 @@ class RemoveRepresentation(bpy.types.Operator):
|
||||
bpy.data.meshes.remove(mesh)
|
||||
product = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||
unassign_representation.Usecase(self.file, {"product": product, "representation": representation}).execute()
|
||||
if not is_mapped_representation:
|
||||
remove_representation.Usecase(self.file, {"representation": representation}).execute()
|
||||
remove_representation.Usecase(self.file, {"representation": representation}).execute()
|
||||
Data.load(product.id())
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user