Merge pull request #4071 from maxfb87/fix_clone_opening

This commit is contained in:
Andrej
2023-12-04 16:39:34 +05:00
committed by GitHub
@@ -826,13 +826,10 @@ class CloneOpening(Operator, tool.Ifc.Operator):
continue continue
opening_placement = opening.ObjectPlacement opening_placement = opening.ObjectPlacement
opening_representations = opening.Representation.Representations opening_representation = opening.Representation
new_opening = ifcopenshell.api.run("root.create_entity", tool.Ifc.get(), ifc_class="IfcOpeningElement") new_opening = ifcopenshell.api.run("root.create_entity", tool.Ifc.get(), ifc_class="IfcOpeningElement")
for representation in opening_representations: new_opening.Representation = opening_representation
ifcopenshell.api.run(
"geometry.assign_representation", tool.Ifc.get(), product=new_opening, representation=representation
)
ifcopenshell.api.run("void.add_opening", tool.Ifc.get(), opening=new_opening, element=wall) ifcopenshell.api.run("void.add_opening", tool.Ifc.get(), opening=new_opening, element=wall)
new_opening.ObjectPlacement = opening_placement new_opening.ObjectPlacement = opening_placement