mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
e0a1988044
IfcSurfaceFeature (e.g. road markings) adheres to a host element through IfcRelAdheresToElement, a [1:1] cardinality hierarchical relationship in the same family as aggregation, containment and nesting since IFC4.3. The spatial traversal never followed it, so surface features had no resolvable parent or container: on import they landed in the Unsorted collection instead of the host's spatial collection, and were dropped entirely in DECOMPOSITION filter mode. Add get_adhered_element (feature to host) to the get_parent resolver chain and walk HasSurfaceFeatures in get_decomposition, plus a get_surface_features helper mirroring get_parts/get_contained. With get_parent resolving adherence, get_container now returns the host's spatial container, so tool.Collector places surface features under the host. Also follow HasSurfaceFeatures in the Bonsai DECOMPOSITION filter path so they load in that mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>