Skip to main content

ifc_properties/
lib.rs

1//! `ifc-properties` -- Property sets, quantities and units -- the non-geometric payload most
2//!
3//! consumers actually want.
4//!
5//! `references/ifc-spec/` ships the official property set definitions as XML:
6//! 317 for IFC2x3 and 420 for IFC4. That is a machine-readable catalogue, so
7//! standard Psets are data here rather than hand-written tables.
8//!
9//! # Module map
10//!
11//! | Module | Role |
12//! |---|---|
13//! | `pset` | `IfcPropertySet` and single/enumerated/list/table properties |
14//! | `quantity` | `IfcElementQuantity`: length, area, volume, weight, count |
15//! | `template` | `IfcPropertySetTemplate`, property templates, and sets checked against them |
16//! | `standard` | The official Pset catalogue from the shipped XML definitions |
17//! | `unit` | Unit assignment, prefixes and conversion-based units |
18//! | `value` | `IfcValue` measure types and their interpretation |
19//! | `query` | Lookup helpers: property by name, pset by element |
20//! | `nesting` | Bounded, cycle-aware traversal of complex properties and quantities |
21//! | `error` | Why a property lookup failed |
22//!
23//! # Status
24//!
25//! Implemented: `value`, `pset`, `quantity` (including transactional quantity
26//! edits), `unit`, `template`, `query` and the release-bound `exact` lookups.
27//! `standard` is a reserved scaffold; the shipped Pset/Qto catalogue is
28//! `ifc-template-catalog`. Open work is tracked in GitHub issues.
29//!
30//! # What this crate will not do
31//!
32//! It never computes a shape measurement. An `IfcQuantityArea` is what the
33//! authoring tool asserted, and it may disagree with the geometry. Callers
34//! that want a check compute the value with a geometry service and pass it to
35//! [`compare`], which reports agreement rather than inventing it.
36
37mod error;
38mod exact;
39mod nesting;
40mod pset;
41mod quantity;
42mod query;
43mod standard;
44mod template;
45mod unit;
46mod value;
47
48pub use error::{PropertyAnomaly, PropertyError, PropertyResult, TemplateError};
49pub use exact::{
50    exact_material_properties_where, exact_material_property, exact_material_property_sets_where,
51    exact_predefined_sets, exact_properties, exact_properties_where, exact_property,
52    exact_property_sets_where, exact_schema, exact_unit, ExactBoundedValue, ExactComplexMember,
53    ExactComplexValue, ExactEntityRef, ExactEnumeratedValue, ExactEnumeration, ExactLogical,
54    ExactPredefinedSet, ExactProperty, ExactPropertyEntry, ExactPropertyError,
55    ExactPropertySetEntry, ExactReferenceValue, ExactResolution, ExactSource, ExactTableRow,
56    ExactTableValue, ExactTypedValue, ExactUnit, ExactUnitError, ExactValue,
57};
58/// The IFC release an exact resolution binds to (re-exported from `ifc-schema`).
59pub use ifc_schema::SchemaVersion;
60pub use pset::{
61    add_complex_property, add_complex_property_template,
62    add_complex_property_template_with_owner_history, add_door_lining_properties,
63    add_door_lining_properties_with_owner_history, add_door_panel_properties,
64    add_door_panel_properties_with_owner_history, add_element_quantity,
65    add_element_quantity_with_owner_history, add_permeable_covering_properties,
66    add_permeable_covering_properties_with_owner_history, add_physical_complex_quantity,
67    add_profile_properties, add_property_bounded_value, add_property_dependency_relationship,
68    add_property_enumerated_value, add_property_enumeration, add_property_list_value,
69    add_property_reference_value, add_property_set, add_property_set_template,
70    add_property_set_template_with_owner_history, add_property_set_with_owner_history,
71    add_property_single_value, add_property_table_value, add_reinforcement_bar_properties,
72    add_reinforcement_definition_properties,
73    add_reinforcement_definition_properties_with_owner_history, add_section_properties,
74    add_section_reinforcement_properties, add_window_lining_properties,
75    add_window_lining_properties_with_owner_history, add_window_panel_properties,
76    add_window_panel_properties_with_owner_history, attach_property_set,
77    attach_property_set_with_owner_history, attach_template, attach_template_with_owner_history,
78    attach_type, attach_type_with_owner_history, bounded_slot, complex_quantity_slot, complex_slot,
79    defines_by_template_slot, defines_by_type_slot, defines_slot, element_quantity_slot,
80    enumerated_slot, list_slot, property, property_checked, property_set, property_set_checked,
81    property_sets_by_object, pset_slot, pset_template_slot, reference_slot, single_value_slot,
82    table_slot, AttachedSets, Attachment, DoorLiningDraft, Property, PropertySet, PropertyValue,
83    ReinforcementBarDraft, SectionReinforcementDraft, TableValueDraft, WindowLiningDraft,
84};
85pub use quantity::{
86    add_quantity_to_set, compare, create_quantity, create_quantity_with, set_description, set_name,
87    set_quantity_value, Comparison, ComputedQuantity, QuantityExtras, Tolerance,
88};
89pub use quantity::{
90    quantity_set, quantity_sets, stated_unit, Quantity, QuantityKind, QuantitySet, UnresolvedValue,
91};
92pub use query::{
93    properties_of, property_value, resolved_properties, ResolvedProperties, ResolvedSet, Source,
94};
95pub use template::{
96    property_set_template, property_set_template_checked, property_set_templates,
97    property_template, property_template_checked, template_deviations, template_of_set,
98    MeasureRole, PropertySetTemplate, PropertyTemplate, PropertyTemplateKind, TemplateFinding,
99    TemplateReport, UndecidedReason,
100};
101pub use unit::{
102    add_context_dependent_unit, add_conversion_based_unit, add_conversion_based_unit_with_offset,
103    add_derived_unit, add_derived_unit_element, add_dimensional_exponents, add_measure_with_unit,
104    add_monetary_unit, add_si_unit, assign_units, prefix_exponent, project_unit_for, project_units,
105    unit, unit_type, ConversionBasedUnitDraft, MonetaryUnitDraft, SiUnitDraft, UnitKind,
106};
107pub use value::{MeasureValue, Scalar};