pub fn select_plan_representation(
model: &Model,
product: EntityId,
) -> GeometryResult<Option<EntityId>>Expand description
Pick the representation a 2D drawing should use for this product.
Preference is, in order:
- a
PLAN_IDENTIFIERSmatch inside aPLAN_VIEWsub-context – drawable geometry the author explicitly targeted at a plan; - otherwise the best
PLAN_IDENTIFIERSmatch in any context.
The two rules are intersected, not ordered. Treating the context as
sufficient on its own looks reasonable – an author who sets
TargetView = .PLAN_VIEW. has stated intent – but ArchiCAD authors
Box/BoundingBox shape representations inside a PLAN_VIEW
sub-context. A context-first rule returns those boxes and never reaches
the identifier list: on AC20-FZK-Haus.ifc that was 107 of 253 shape
representations, and every plan lookup came back a box. Authorial intent
selects between drawable candidates; it does not make a bounding box
drawable.
Returns None when the product has only solid or bounding-box geometry.
That is a real answer, not a failure: deriving a plan from a solid needs
sectioning, which this crate does not do. A caller that wants an outline
anyway should say so explicitly rather than be handed a box that claims
to be a plan.