Files
IfcOpenShell/src
Petru Conduraru 2138b0750a Bonsai: generalise representation item deletion to nested items
remove_representation_item assumed a representation item's parent is
always the IfcShapeRepresentation (or an IfcBooleanResult). Items that
live inside a container item were detached from nothing, so they stayed
in the file and were re-imported on leaving item mode (#6591).

The import side is already general. The C++ mapper tags every mapped
IfcRepresentationItem with its instance id, and container items are
mapped through the same map_to_collection helper as
IfcRepresentation.Items, so their children become individually editable
items with no special casing. Deletion now mirrors that: any inverse
that is itself a representation item is treated as a container, and the
item is cleared from whichever attribute references it. A container left
without contents is removed in turn.

This covers IfcGeometricSet/IfcGeometricCurveSet Elements,
IfcShellBasedSurfaceModel SbsmBoundary and IfcFaceBasedSurfaceModel
FbsmFaces, rather than only the case reported in #6591. Items shared by
several containers are detached from all of them, which matches item
mode presenting one object per item id.

Fixes #6591

Generated with the assistance of an AI coding tool.
2026-07-20 10:31:28 +03:00
..
2026-07-18 22:39:33 +05:00
2026-07-15 19:20:17 +05:00
2026-07-18 22:39:33 +05:00
2026-02-27 14:52:55 +05:00
2025-12-19 18:53:14 +05:00
2025-12-19 18:53:14 +05:00
2026-07-18 22:39:33 +05:00
2025-12-22 18:44:42 +05:00
2025-12-19 18:53:14 +05:00
2025-12-22 18:44:42 +05:00