Skip to content

openbim-step 0.6.0

Choose a tag to compare

@GeneralPawz GeneralPawz released this 24 Sep 14:32
· 22 commits to main since this release

Changed

  • Breaking: EntityDef::supertype: Option<String> is replaced by
    EntityDef::supertypes: Vec<String>, every direct supertype in
    SUBTYPE OF order. EntityDef::supertype() returns the first, for
    single-inheritance callers; with_supertype now appends. Migration:
    def.supertype.clone() becomes def.supertype().map(str::to_owned).
  • Breaking: EntityDef gained public supertypes and redeclared
    fields, so struct-literal construction must add them.

cargo semver-checks against the published 0.5.1 reports exactly these two
breaks (struct_pub_field_missing, constructible_struct_adds_field) and
182 of 184 checks passing.

Added

  • EntityDef::redeclared, EntityDef::is_redeclared, and Redeclaration:
    explicit SELF\X.a : T; redeclarations, kept apart from attributes.
  • SchemaGraph::direct_supertypes.

Fixed

  • Multiple inheritance (#2). Every supertype after the first was dropped, so
    SchemaGraph::attributes omitted inherited slots and is_a missed
    ancestors. Layouts now follow ISO 10303-21:2016 §12.2.5.2: supertypes in
    SUBTYPE OF order, higher supertypes first, and a supertype reached twice
    through a diamond counted once. supertypes, subtypes, and is_a walk
    every parent. AP242 has 248 multi-parent entities; IFC has none.
  • Explicit redeclarations no longer add a phantom positional slot (#3).
    SELF\styled_item.item : plane_or_planar_box; was parsed as a new
    attribute named SELF\styled_item.item; ISO 10303-21:2016 §12.2.8 says it
    has no effect on the encoding. This affected 481 AP242 entities, including
    advanced_face.
  • A \S\ page escape followed by an apostrophe no longer ends the string
    literal. \S\ takes exactly one following LATIN_CODEPOINT, which includes
    the apostrophe (ISO 10303-21:2016 §5.2, §6.4.3.1), so 'Stra\S\'e' is one
    string decoding to Stra§e. Previously it failed to lex. The recovery
    resynchronizer applies the same rule, and \\ is consumed as one escaped
    backslash in both so its second byte cannot open a page escape (#1).

Checked against OCCT's per-entity parameter counts (CheckNbParams in its
generated RWStep* readers): AP242 mismatches fell from 107 to 2, AP203e2
from 24 to 1. The residuals are OCCT departing from Part 21 (common_datum
diamond read twice; characterized_representation dropping derived *
slots) and are pinned in tests/schema_graph.rs.

Full changelog: v0.5.1...v0.6.0

crates.io: https://crates.io/crates/openbim-step/0.6.0