Skip to main content

ifc_geometry/select/
mod.rs

1//! EXPRESS `SELECT` and defined types of the IFC geometry schema.
2//!
3//! Subtype answers come from tables generated for IFC4 ADD2 TC1 and IFC4X3
4//! ADD2, listed in [`subtype::VERIFIED_SCHEMA_VERSIONS`].
5//!
6//! # Why selects need real code
7//!
8//! A STEP attribute declared as `IfcBooleanOperand` is just an entity
9//! reference in the file. Nothing in the record says which of the five
10//! permitted kinds it is; you must resolve the reference and inspect the
11//! target's type. Every consumer that skips this grows an ad-hoc `match` on
12//! type-name strings, and those drift from the schema.
13//!
14//! # The trap: select members are usually abstract
15//!
16//! `IfcBooleanOperand` permits `IfcSolidModel`, which is ABSTRACT -- no file
17//! ever contains one. Files contain `IfcExtrudedAreaSolid`, four levels below.
18//! Resolution must be **subtype-aware**, so comparing the target's type name
19//! against the member list directly rejects every valid file. [`is_a`] answers
20//! that question from a compiled-in table.
21//!
22//! Each select resolves to the *branch* taken, so callers write an exhaustive
23//! `match` the compiler checks instead of string comparisons they must keep in
24//! sync with the schema.
25
26pub mod aggregate_selects;
27pub mod entity_selects;
28pub mod subtype;
29mod subtype_ifc4;
30mod subtype_ifc4x3;
31mod subtype_profile;
32
33pub use aggregate_selects::{
34    ArcIndex, CurveOnSurface, CurveOrEdgeCurve, DimensionCount, GeometricSetSelect,
35    GridPlacementDirectionSelect, LineIndex, PointOrVertexPoint, SegmentIndexSelect,
36    SurfaceOrFaceSurface,
37};
38pub use entity_selects::{
39    Axis2Placement, BooleanOperand, CsgSelect, SolidOrShell, TrimmingSelect, VectorOrDirection,
40};
41pub use subtype::{
42    is_a, is_a_in, known_entities, known_entities_in, supertypes_of, supertypes_of_in,
43};