Expand description
IfcGeometricModelResource: solids, tessellation and booleans.
§What this module is
Read-only typed views over the 42 entities of the IFC4 ADD2 TC1
IfcGeometricModelResource schema. Each view is a newtype over
(EntityId, &Entity) with named accessors and a mod slot block citing the
EXPRESS declaration. Views borrow and own nothing, so constructing one is
free and the model remains the single source of truth.
§What this module deliberately does NOT do
It does not triangulate, evaluate booleans, build meshes, or resolve units.
Those belong to a geometry kernel and to crate::units. A view’s job is
to say faithfully what the file contains, including the parts a naive reader
gets wrong.
§The three counting conventions that must not be confused
- Attribute slots are absolute. Inherited attributes come first, so
IfcExtrudedAreaSolid.SweptAreais slot 0 (inherited fromIfcSweptAreaSolid) andDepthis slot 3. Local, per-subtype numbering is never used anywhere in this module. - Vertex indices are 1-based.
CoordIndex,PnIndexandInnerCoordIndicesall count from 1. Seetessellated. - Measures are in file units. Lengths and angles are returned raw;
IfcRevolvedAreaSolid.Angleis very often in degrees.
§The map from schema to module
| Module | Entities |
|---|---|
swept | the 9 swept solids plus IfcSectionedSpine |
brep | the 5 IfcManifoldSolidBrep types |
csg | IfcCsgSolid plus the 6 primitive types |
halfspace | the 3 half spaces |
boolean | IfcBooleanResult, IfcBooleanClippingResult |
tessellated | the 6 tessellation types |
surface_model | the 2 surface models and 2 geometric sets |
bbox | IfcBoundingBox |
§Volume semantics, in one place
Only some of these entities enclose a volume, and confusing the categories is the most consequential mistake a consumer can make:
- Finite solids: swept solids, breps, CSG solids and primitives.
- Infinite:
IfcHalfSpaceSolidand its subtypes. Only ever a boolean operand; never tessellate one on its own. Seehalfspace. - Conditionally solid: the tessellated face sets, but only when
Closedis TRUE. - Never solid: the surface models and geometric sets in
surface_model, andIfcBoundingBox, which is a proxy extent.
SolidKind::classify turns that table into a dispatch a caller can use
rather than re-deriving from type names.
Re-exports§
pub use bbox::BoundingBox;pub use boolean::BooleanClippingResult;pub use boolean::BooleanOperator;pub use boolean::BooleanResult;pub use boolean::IfcBooleanOperator;pub use boolean::OperandKind;pub use boolean::ParseIfcBooleanOperatorError;pub use brep::AdvancedBrep;pub use brep::AdvancedBrepWithVoids;pub use brep::FacetedBrep;pub use brep::FacetedBrepWithVoids;pub use brep::ManifoldSolidBrep;pub use csg::Block;pub use csg::CsgPrimitive3D;pub use csg::CsgSolid;pub use csg::RectangularPyramid;pub use csg::RightCircularCone;pub use csg::RightCircularCylinder;pub use csg::Sphere;pub use halfspace::BoxedHalfSpace;pub use halfspace::HalfSpaceSolid;pub use halfspace::PolygonalBoundedHalfSpace;pub use surface_model::FaceBasedSurfaceModel;pub use surface_model::GeometricCurveSet;pub use surface_model::GeometricSet;pub use surface_model::ShellBasedSurfaceModel;pub use swept::ExtrudedAreaSolid;pub use swept::ExtrudedAreaSolidTapered;pub use swept::FixedReferenceSweptAreaSolid;pub use swept::RevolvedAreaSolid;pub use swept::RevolvedAreaSolidTapered;pub use swept::SectionedSpine;pub use swept::SurfaceCurveSweptAreaSolid;pub use swept::SweptAreaSolid;pub use swept::SweptDiskSolid;pub use swept::SweptDiskSolidPolygonal;pub use swept::TrimMeasure;pub use tessellated::IndexedPolygonalFace;pub use tessellated::IndexedPolygonalFaceWithVoids;pub use tessellated::PolygonalFaceSet;pub use tessellated::TessellatedFaceSet;pub use tessellated::TessellatedItem;pub use tessellated::TriangulatedFaceSet;
Modules§
- bbox
IfcBoundingBox: an axis-aligned box, and the trap in what it is aligned to.- boolean
- Booleans:
IfcBooleanResultand the clipping specialisation. - brep
- Boundary representations:
IfcManifoldSolidBrepand its subtypes. - csg
- CSG: analytic primitives and the solid that roots a CSG tree.
- halfspace
- Half spaces: infinite solids, valid only as boolean operands.
- surface_
model - Surface models and geometric sets: collections that are not solids.
- swept
- Swept solids: a cross section dragged along a path.
- tessellated
- Tessellated geometry: explicit meshes addressed by index.
Enums§
- Solid
Kind - Which family of
IfcGeometricModelResourcean entity belongs to.