mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix bug where you were unable to remove a representation
This commit is contained in:
@@ -53,4 +53,4 @@ class Usecase:
|
||||
for item in mapped_representations:
|
||||
self.unassign_product_representation(item["product"], item["representation"])
|
||||
for representation in just_representations:
|
||||
ifcopenshell.api.run("owner.remove_representation", self.file, **{"representation": representation})
|
||||
ifcopenshell.api.run("geometry.remove_representation", self.file, **{"representation": representation})
|
||||
|
||||
@@ -71,11 +71,11 @@ class Usecase:
|
||||
ifcopenshell.api.run("geometry.remove_representation", self.file, **{"representation": representation})
|
||||
for representation_map in self.settings["relating_type"].RepresentationMaps:
|
||||
representation = representation_map.MappedRepresentation
|
||||
result = ifcopenshell.api.run(
|
||||
mapped_representation = ifcopenshell.api.run(
|
||||
"geometry.map_representation", self.file, **{"representation": representation}
|
||||
)
|
||||
ifcopenshell.api.run(
|
||||
"geometry.assign_representation",
|
||||
self.file,
|
||||
**{"product": self.settings["related_object"], "representation": result}
|
||||
**{"product": self.settings["related_object"], "representation": mapped_representation}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user