Skip to main content

ifc_element_type/
lib.rs

1//! Element, resource, and process type definitions.
2//!
3//! An IFC model separates what a thing *is* from where it sits. The
4//! type definition carries the shared description: a pump type names
5//! the pump model, and every pump placed from it inherits that.
6//!
7//! This crate owns the 132 concrete `IfcTypeObject` subtypes. They
8//! sit in one crate because they are one uniform shape with one
9//! shared WHERE rule, not because they are one domain: the list
10//! spans HVAC, structure, furniture, resources and processes.
11//! Splitting them across domain crates would copy the same rule and
12//! the same slot table into a dozen places.
13//!
14//! The catalogue in [`table`] is generated from the schema by
15//! `scripts/gen-element-types.py`; [`create_type`] is the writer.
16
17mod authoring;
18mod supertype;
19pub mod table;
20
21pub use authoring::{create_type, ElementTypeError, ElementTypeResult, Slot6, TypeDraft};
22pub use supertype::{
23    create_supertype, SupertypeDraft, SupertypeKind, ALL_SUPERTYPES, BUILT_ELEMENT_TYPE,
24    CIVIL_ELEMENT_TYPE, DEEP_FOUNDATION_TYPE, DISTRIBUTION_ELEMENT_TYPE, FURNISHING_ELEMENT_TYPE,
25    TYPE_OBJECT, TYPE_PRODUCT,
26};
27pub use table::{ElementType, Family, ALL};