ifc-style
Presentation: styles, colours, textures, layers, annotation.
| Status | Implemented |
| Latest release | 0.4.0 (2026-09-29) |
| Registries | crates.io ifc-style |
| Via the facade | openbim-ifc feature style |
| API documentation | rustdoc · docs.rs |
| Source | crates/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)
AppearanceSupportis#[non_exhaustive]: a match needs a wildcard arm;AppearanceDeclarationis#[non_exhaustive].- Every authoring draft is
#[non_exhaustive], so a struct literal no longer compiles outside the crate. Each gainsnew(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)andImageTextureDraft::new(url_reference). Fields stay public.
Added
StyleError::UnsupportedSchema:StyledItem::stylesrefuses 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
Schemafrom the caller. A consumer that used a table through this crate's dependency (ifc_schema::ifc4()) enables it on its ownifc-schemadependency (default features bundle every release). StyledItem::stylesreads IFC4X1 and IFC4X2 like IFC4: both declareStylesoverIfcStyleAssignmentSelect, which still admitsIfcPresentationStyleAssignment; only IFC4X3 narrowed it. Pinned against both bundled tables.
Full history: crates/ifc-style/CHANGELOG.md