Skip to content

feat(elements): carry each element's Type Mark, Description and Fire Rating from its type (#35) (RE-77) - #419

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/type-text-parameters
Sep 27, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/type-text-parameters

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Each element now carries its type's Type Mark, Description and Fire Rating, read from the type's parameter value block (RE-77). On Snowdon Towers every value rvt-rs writes agrees with Revit's own data.

Motivation

#35 and #155: parameters were the largest gap in exported properties. jakobhirn-bit and STE1200 described the value-block and BuiltInParameter-keyed layout in Discussion #112; this measures which of those entries are safe to read.

Changes

  • src/partition_type_parameters.rs: value blocks open [owner u64][56 x 0xff][3 x 0x00]; a type's text entries i64 BuiltInParameter, u32 n, UTF-16 x n belong to the block they follow, and the block's ElementId must be declared in Global/ElemTable. A type whose blocks disagree on a value gets none (fail closed).
  • partition_schema_mvp.rs: each element takes its type's values through the type RE-38 / Names for system-family types (walls, floors, roofs) from schema-serialised partition data #322 already resolve.
  • ifc/export_content.rs: written under the names Revit shows (Type Mark, Description, Fire Rating).
  • tools/re/type_parameters_vs_ifc.py, tools/re/type_parameters_vs_vim.py, reports/element-framing/RE-77-type-text-parameters.md, README row, support matrix entry type-text-parameters, CHANGELOG.
  • Core Interior's IFC gains 138 Type Mark and 227 Fire Rating properties, so both witness artifacts' rvt-rs.json observations are regenerated.

Testing

Measured end to end (no new unit tests, per repository policy):

file parameter written checked equal
Snowdon Towers (2024) Type Mark 1,284 1,276 (VIM of the 2027 edition) 1,257; the other 19 are empty in the VIM
Description 70 70 (VIM) 70
Fire Rating 696 696 (Revit's IFC4 export) 696
RE1 Architecture (2025) Fire Rating 7 7 (Revit's IFC export) 7

No value rvt-rs writes disagrees with a value either oracle holds.

  • fmt, clippy -D warnings, rustdoc -D warnings, cargo test --workspace --all-targets --all-features
  • corpus: cargo test --profile ci --no-fail-fast --test '*' with RVT_SAMPLES_DIR and RVT_PROJECT_CORPUS_DIR set
  • witness replay: both Core Interior artifacts PASS, three replays match each; ifc_schema_arity.py --witness-agreement passes
  • synthetic fixtures unchanged (no type records in them)

Audit-honesty checklist

  • Docs reflect this PR only: README, support matrix (partial), CHANGELOG
  • Limitations documented: instance parameters (Mark, Comments) and numbers are not read; Fire Rating reaches 696 of Snowdon's 862 rated elements
  • No emojis, private paths or PII; the Snowdon and VIM oracles stay local

Legal and contribution hygiene

  • Apache-2.0
  • Clean-room: byte observations on public sample files, compared with Revit's own exports. Which BuiltInParameter is which was established by matching values against those exports, not from any list or SDK.
  • No new fixtures

Breaking changes

None. New properties only.

Related issues

Refs #35, #155. Credit: jakobhirn-bit and STE1200 (Discussion #112).


Note

Medium Risk
Changes IFC property output and relies on new binary parameter parsing; scope is limited to three text type parameters with documented partial recall and fail-closed conflicts.

Overview
Adds RE-77 type text parameters so exported elements inherit their type’s Type Mark, Description, and Fire Rating in IFC property sets and diagnostics.

A new partition_type_parameters module scans inflated partitions for value blocks (ElementId + sentinel) and reads three BuiltInParameter-keyed UTF-16 strings per type, with fail-closed handling when a type disagrees. partition_schema_mvp copies those onto instances via the existing resolved type id; ifc/export_content writes them under Revit’s display names (dropping the internal m_type_parameter: prefix).

Documentation and validation follow: CHANGELOG/README/support matrix, RE-77 report, and Python oracles against VIM/Revit IFC. Core Interior witness observations bump IFCPROPERTYSINGLEVALUE counts and hashes. Instance parameters and numeric type params are still not read; Fire Rating recall is partial on large models.

Reviewed by Cursor Bugbot for commit 38c8a84. Configure here.

…Rating from its type (#35) (RE-77)

A type's parameter value block (ElementId, 56 x 0xff, 3 x 0x00) holds some
text parameters as i64 BuiltInParameter, u32 n, UTF-16 x n. Three are read,
identified by matching values against the model's own exports: Type Mark,
Description and Fire Rating. Each element gets its type's values through
the type RE-38 and #322 resolve. On Snowdon Towers every value agrees with
Revit's: Type Mark 1,257 of the 1,276 the VIM checks (the rest are empty in
that later edition), Description 70 of 70, Fire Rating 696 of 696 against
Revit's IFC4 export; RE1 Architecture Fire Rating 7 of 7.

Credit: jakobhirn-bit and STE1200 (Discussion #112) for the value-block
and BuiltInParameter-keyed shapes.
@cursor

cursor Bot commented Sep 27, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_15f85c28-c5cb-45d6-8d65-548aa8bd6e3c)

@DrunkOnJava
DrunkOnJava merged commit 6c74e96 into main Sep 27, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/type-text-parameters branch September 27, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant