ifc-validate
Schema conformance: WHERE rules, cardinality, GUID and reference integrity.
| Status | Implemented |
| Latest release | 0.4.0 (2026-09-29) |
| Registries | crates.io ifc-validate |
| Via the facade | openbim-ifc feature validate |
| API documentation | rustdoc · docs.rs |
| Source | crates/ifc-validate/ |
Overview
ifc-validate -- Schema and model validation: is this file actually legal IFC?
Split from parsing on purpose. A reader that rejects everything imperfect is useless on real data -- roughly half of production files violate something -- so parsing is permissive and validation is an explicit, separate pass.
Features
| Feature | Default | Enables |
|---|---|---|
ifc4 | yes | ifc-schema/ifc4 |
Depends on
Changes
Latest release, 0.4.0 (2026-09-29):
Added
- Aggregate checks from the schema's bounds (#111): a level outside its declared size (
structure.aggregate.too_few,structure.aggregate.too_many;ARRAY [l:u]needs exactly u-l+1), an inner level of a nested aggregate that is not an aggregate (structure.aggregate.nesting), and a repeated element in aSETorUNIQUElevel (structure.aggregate.duplicate). The members of aLIST OF LISTare now type-checked against the innermost element type (#215). - Every
UNIQUEclause of the declared release is checked across the declaring entity and its subtypes (structure.unique.violation), exceptIfcRoot.UR1, which staysglobal.UniqueGlobalId.
Changed (breaking)
structure::duplicate_global_idsand its rule idstructure.unique.duplicate_global_idare removed: the function duplicatedglobal.UniqueGlobalIdandvalidatenever ran it. Its module now checks the release's UNIQUE clauses (structure::unique_rules, run byvalidate).- No registered rule claims to need aggregate bounds any more:
IfcPolyLoop.WR21andIfcPolyLoop.AllPointsSameDimare unsupported for needing an expression evaluator. Supportis#[non_exhaustive]: a match needs a wildcard arm.Findingis#[non_exhaustive]; it can no longer be built with a struct literal outside the crate.Pathis#[non_exhaustive], so a later release can name a new location kind; a match needs a wildcard arm.
Changed
- Depends on
ifc-schemawith its default features named explicitly (every bundled release), now that the workspace dependency turns them off for the facade's per-release features (#112). validate_declaredvalidates IFC4X1 and IFC4X2 files against their own bundled tables instead of refusing them as unknown. No WHERE rule is registered for either release yet, so their report carries onewhere.releasefinding (severityUnsupported) saying WHERE rules were not evaluated, rather than reading as if they passed.- SELECT resolution treats a type declaration form
ifc-schemaadds later like an undeclared member (fails closed); followsifc_schema::TypeKindbecoming#[non_exhaustive].
Full history: crates/ifc-validate/CHANGELOG.md