Skip to content

ifc-material ​

Material definitions: layer sets, profile sets, constituents, usage.

StatusImplemented
Latest release0.4.0 (2026-09-29)
Registriescrates.io ifc-material
Via the facadeopenbim-ifc feature material
API documentationrustdoc · docs.rs
Sourcecrates/ifc-material/

Overview ​

Borrowed, codec-independent IFC MaterialResource views.

The crate projects typed material identity, constituents, layers, profiles, usage assignments, relationships, and material property sets from ifc_model::Model. Accessors distinguish absent optional values from malformed values and enforce immediate aggregate shape, required slots, and MaterialResource WHERE constraints. Authored placement and offset values are exposed here; geometric interpretation remains in ifc-geometry.

Views and authoring bind to the release the model's header declares (IFC2X3 TC1, IFC4 ADD2 TC1 or IFC4X3 ADD2; see material_schema): every slot position comes from that release's bundled schema table. An attribute the release lacks is MaterialError::NotInSchema, and a record type it lacks is MaterialError::EntityNotInSchema; neither is read from another release's slot.

Depends on ​

Changes ​

Latest release, 0.4.0 (2026-09-29):

Changed (breaking) ​

  • MaterialView::profile_set_usages() also yields IfcMaterialProfileSetUsageTapering, the schema subtype of IfcMaterialProfileSetUsage in IFC4 and IFC4X3, in entity-id order, and MaterialProfileSetUsage::try_new / try_from_view accept it (#136). A caller that iterated both profile_set_usages() and tapering_profile_set_usages() sees each tapering usage twice; iterate profile_set_usages() alone and branch on the new MaterialProfileSetUsage::tapering(), which returns the tapering projection (end_profile_set_id, cardinal_end_point) or None.
  • The authoring drafts MaterialDraft, LayerDraft, LayerSetDraft, MaterialAssignmentDraft, ConstituentDraft and ProfileDraft are #[non_exhaustive]: build them with MaterialDraft::new(name), LayerDraft::new(thickness), LayerSetDraft::new(layers), MaterialAssignmentDraft::new(global_id, related_objects, relating_material), ConstituentDraft::new(material) or ProfileDraft::new(profile) and a setter named after each optional field (LayerDraft::new(0.2).material(brick).priority(80)). Fields stay public.
  • ResolvedAssignment is #[non_exhaustive].

Changed ​

  • Depends on ifc-schema with its default features named explicitly (every bundled release), now that the workspace dependency turns them off for the facade's per-release features (#112).
  • UnsupportedSchema reads "a release this crate has no verified layout for" instead of "no bundled schema table".
  • A model whose header declares IFC4X1 or IFC4X2 is refused with the existing unsupported-schema error. ifc-schema now bundles both releases, but no layout here is verified against them, so they are never read as IFC4 or IFC4X3.

Full history: crates/ifc-material/CHANGELOG.md

Released under the AGPL-3.0-or-later licence. ISO and CEN standards material is not redistributed.