Skip to content

ifc-style ​

Presentation: styles, colours, textures, layers, annotation.

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

Overview ​

Strict, codec-independent IFC presentation and annotation views.

Appearance stays separate from geometry: this crate exposes colour, style, texture, layer, styled-item, and annotation semantics over ifc_model::Model without placing presentation state in the geometry kernel. Reads and writes resolve attribute slots through the selected ifc_schema::Schema, so IFC2x3, IFC4, and IFC4X3 layout drift is explicit rather than guessed.

Depends on ​

Changes ​

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

Changed (breaking) ​

  • AppearanceSupport is #[non_exhaustive]: a match needs a wildcard arm; AppearanceDeclaration is #[non_exhaustive].
  • Every authoring draft is #[non_exhaustive], so a struct literal no longer compiles outside the crate. Each gains new(required…) and one builder setter per other field, named after the field and taking the unwrapped value: BlobTextureDraft::new(raster_format, raster_code), TextModelDraft::new(), LightSourceDraft::new(light_colour), AnnotationDraft::new(global_id), TextLiteralDraft::new(literal, placement, path), TextLiteralWithExtentDraft::new(literal, placement, path, extent, box_alignment), AnnotationFillAreaDraft::new(outer_boundary), CurveStyleDraft::new(), PixelTextureDraft::new(width, height, colour_components, pixel), ColourRgbDraft::new(red, green, blue), SurfaceStyleShadingDraft::new(surface_colour), SurfaceStyleDraft::new(side, elements), StyledItemDraft::new(styles), PresentationLayerDraft::new(name, assigned_items), SurfaceStyleRenderingDraft::new(surface_colour, reflectance_method) and ImageTextureDraft::new(url_reference). Fields stay public.

Added ​

  • StyleError::UnsupportedSchema: StyledItem::styles refuses a recognised release it is not verified for instead of applying the IFC4X3 rule to it.

Changed ​

  • Links no bundled schema table itself: every entry point takes the Schema from the caller. A consumer that used a table through this crate's dependency (ifc_schema::ifc4()) enables it on its own ifc-schema dependency (default features bundle every release).
  • StyledItem::styles reads IFC4X1 and IFC4X2 like IFC4: both declare Styles over IfcStyleAssignmentSelect, which still admits IfcPresentationStyleAssignment; only IFC4X3 narrowed it. Pinned against both bundled tables.

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

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