Skip to content

ifc-validate ​

Schema conformance: WHERE rules, cardinality, GUID and reference integrity.

StatusImplemented
Latest release0.4.0 (2026-09-29)
Registriescrates.io ifc-validate
Via the facadeopenbim-ifc feature validate
API documentationrustdoc · docs.rs
Sourcecrates/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 ​

FeatureDefaultEnables
ifc4yesifc-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 a SET or UNIQUE level (structure.aggregate.duplicate). The members of a LIST OF LIST are now type-checked against the innermost element type (#215).
  • Every UNIQUE clause of the declared release is checked across the declaring entity and its subtypes (structure.unique.violation), except IfcRoot.UR1, which stays global.UniqueGlobalId.

Changed (breaking) ​

  • structure::duplicate_global_ids and its rule id structure.unique.duplicate_global_id are removed: the function duplicated global.UniqueGlobalId and validate never ran it. Its module now checks the release's UNIQUE clauses (structure::unique_rules, run by validate).
  • No registered rule claims to need aggregate bounds any more: IfcPolyLoop.WR21 and IfcPolyLoop.AllPointsSameDim are unsupported for needing an expression evaluator.
  • Support is #[non_exhaustive]: a match needs a wildcard arm.
  • Finding is #[non_exhaustive]; it can no longer be built with a struct literal outside the crate.
  • Path is #[non_exhaustive], so a later release can name a new location kind; a match needs a wildcard arm.

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).
  • validate_declared validates 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 one where.release finding (severity Unsupported) saying WHERE rules were not evaluated, rather than reading as if they passed.
  • SELECT resolution treats a type declaration form ifc-schema adds later like an undeclared member (fails closed); follows ifc_schema::TypeKind becoming #[non_exhaustive].

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

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