1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
//! `ifc-geometry` — the IFC side of geometry.
//!
//! # What this crate is
//!
//! It answers *"what does this IFC entity mean geometrically"* and lowers
//! implemented slices into the format-neutral `axiolid-model` DAG. It does not
//! triangulate, evaluate NURBS, or perform booleans itself.
//!
//! The opt-in `compile` feature is the one narrow exception: it hands the
//! lowered DAG to an Axiolid provider and returns triangles. It is off by
//! default because selecting a provider and a memory budget is application
//! policy, not something the IFC file determines. See the `compile` module
//! and ADR 0004.
//!
//! ```text
//! ifc-model this crate geometry package
//! (untyped graph) --> typed/family views --> GeometryGraph
//! + IFC resolution (implemented elsewhere)
//! ```
//!
//! # Scope
//!
//! The three IFC geometry resource schemas, counted from IFC4 ADD2 TC1:
//!
//! | Schema | Entities | Types | Functions |
//! | --- | ---: | ---: | ---: |
//! | `IfcGeometryResource` | 59 | 14 | 25 |
//! | `IfcGeometricModelResource` | 42 | 4 | 2 |
//! | `IfcGeometricConstraintResource` | 11 | 5 | 1 |
//!
//! # Design
//!
//! **Views and explicit inventory.** The 89 concrete entities are represented by
//! dedicated or shared subtype-aware borrowed views. The 23 abstract entities
//! are inheritance/inventory entries, not falsely presented as constructible
//! views. All 23 schema types are modeled.
//!
//! **Honest lowering.** The dispatcher's `IMPLEMENTED` list (in
//! `lower::dispatch`) names every representation-item type it lowers: swept,
//! CSG, boolean and half-space solids, faceted and advanced B-reps,
//! tessellated face sets, surfaces, curves, surface models, collections and
//! mapped items. Every other concrete IFC4 representation item has a
//! recorded disposition in `data/ifc4-representation-item-dispositions.tsv`
//! (nested input, non-shape, or typed refusal). Input that cannot be lowered
//! exactly returns a typed [`crate::GeometryError`], such as
//! [`crate::GeometryError::Unsupported`], rather than panicking or
//! substituting approximate geometry.
//!
//! **Neutral DAG output.** Implemented lowerers resolve IFC units, placements,
//! profiles, and representation relationships into `axiolid-model` nodes. Active
//! lowering owns no duplicate geometry types and never selects a CPU/GPU
//! provider.
//!
//! **Feature `lowering`** (default on) carries the neutral geometry crates.
//! Without it this crate is representation selection only -- contexts,
//! plan/body choice, profiles, curves, surfaces, solids, units and
//! placements -- and links no geometry code at all.
// Neutral geometry vocabulary, re-exported so a lowering consumer needs only
// this crate in scope. Gated with the lowering it exists to serve.
pub use BooleanOperator as GeometryBooleanOperator;
pub use ;
pub use Primitive as AnalyticPrimitive;
pub use Profile as ExactProfile;
// Placement resolution is the most-reused operation in any IFC consumer
// and the one most often reimplemented wrongly, so it is reachable from
// the crate root and does not require the `lowering` feature: a 2D drawing
// needs world coordinates without compiling a solid kernel.
pub use ;
pub use ;
pub use Slots;
pub use Transform;
pub use UnitScale;
// Representation contexts and selection policy. Public because drawing
// production is a first-class consumer: choosing the geometry a plan is drawn
// from is a question about contexts, not about lowering.
pub use ;
// Geometry-shaping material inputs only. Material identity, quantities, and
// association policy remain owned by `ifc-material`.
pub use ;
pub use ;
// Which entities carry a shape at all. Kernel-free: a slot read, not a lowering
// question, so a 2D or auditing consumer reaches it without linking a kernel.
pub use geometric_products;
// Which openings void a host (`IfcRelVoidsElement`). Kernel-free for the same
// reason; `lower::lower_product_net` turns the answer into subtractions.
pub use ;
// How a body is modelled -- kind, swept-solid profile parameters, direction
// and depth -- in SI and world coordinates. Kernel-free: a rule check asking
// "is this beam an HEA300" must not link a solid kernel for the answer.
pub use ;
// Profile families read into SI parameters. The same reader feeds
// `lower::profile`, so a description and a lowering cannot disagree.
pub use ;