Skip to content

fix(elements): a family instance written as a space is left out where its family draws no model form (#1262) (RE-312) - #1279

Merged
DrunkOnJava merged 9 commits into
mainfrom
fix/1262-parking-spaces
Nov 3, 2026
Merged

DrunkOnJava merged 9 commits into
mainfrom
fix/1262-parking-spaces

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

A family instance written as IfcSpace through its "Export to IFC As" is left out where its family draws no model form for its parameters, as Revit's export leaves it out. On the BIM4LCA terrain office this removes 89 bicycle bays from the IfcSpace rvt-rs writes; the 2 car bays Revit exports stay. Measure now also scores the terrain office (concrete and timber).

Motivation

#1262. Revit's export does write parking-space instances as IfcSpace .PARKING. (the reporter's proxy expectation is wrong), but only 2 of the 94. Revit's FamilyInstanceExporter writes a family instance that is not a door or window only when it has a 3D body. The "Parking Space" family has one form whose Visible is bound to "Stripe Y/N"; all 92 bicycle bays carry 0, the 2 car bays inherit 1. Details, the fields that do not separate the two groups, and what is not shown: reports/element-framing/RE-312-bodiless-family-spaces.md.

Changes

  • research/bim4lca-measure.tsv, tools/ci/measure-reference-models.sh, .github/workflows/measure.yml, docs/reference-models.md: the terrain office pair (4 entries, fetched by byte range, sha256 pinned, never stored).
  • src/research/native_family_forms.rs: family_solids, instances_without_body (the family document's model forms and the parameters that show them); family_forms shares the loader.
  • src/research/partition_schema_mvp/types.rs, partition_schema_mvp.rs: without_bodiless_family_spaces, applied to instances whose "Export to IFC As" is IfcSpace; an instance whose family document is not found, holds no form, nests an instance or does not decode is kept.
  • probes/examples/probe_re312_parking_spaces.rs, tools/re/parking_spaces_vs_ifc.py, the RE-312 report, docs/evidence.md, changelog fragments.

Testing

Reviewed head 1afd857 (merged with main cef24f5): Measure 41672855211, -f base=main -f nordic=true -f r2025=true -f holdout=true -f timing=true: 51 of 53 exports byte-identical to main, the two terrain files change (to the hashes of run 41656473590). The earlier run follows.

No unit tests. Measure, unfiltered, head 6eae7dd against main, -f nordic=true -f r2025=true -f holdout=true: 41656473590. 45 of 47 exports are byte-identical (six reference models, the two concrete office files, 24 R2025, 13 held-out). The two that change are the terrain files: extra IfcSpace 89 to 0, spaces equal to Revit's 9 of 98 to 9 of 9, values rvt-rs writes that Revit does not 180 to 2; no element of Revit's export is dropped.

Prediction before the rule (runs 41652870443, 41655209746): exact on 4 files (terrain 2 written / 92 left out; office 42 written / 34 void-only left out).

Evidence and cost

The evidence is two families on one building: "Parking Space" (the output changes) and "Turning Free Space" (42 per office file, drawn and written, unchanged); the office's 34 void-only instances were never written by main. Every file measured is Revit 2024. The rule adds, for an affected file only (one with an IfcSpace-valued family instance), up to three passes over the native records and two walks over the partitions to find the family documents. Timed on one runner in Measure run 41672855211 (-f timing=true): the terrain files 1824 / 1816 ms at base and 1829 / 1830 ms at head, the two 28 s office files (78 IfcSpace-valued instances each) 29,478 / 27,953 ms at base and 29,661 / 27,950 ms at head, peak memory unchanged: within noise.

Fail closed: a form bound to a parameter whose caption or value was not read keeps its instance (the stored Visible of a bound form is not used), a family document with an unparsed group keeps its instances, and a check that cannot run keeps every instance and is a diagnostics warning. The instances left out are counted as element_record_family_space_without_body.

Audit-honesty checklist

Only instances written as IfcSpace are tested; Revit's rule is for every non-door, non-window family instance, which this does not claim. Export view visibility is not decided. The terrain office's 104 IfcGeographicElement that rvt-rs does not write are a separate finding.

…ts the IfcSpace family instances against Revit's export (#1262) (RE-312)
…ameters that show them, and the scorer sets Revit's 3D-body rule against its export (#1262) (RE-312)
… its family draws no model form for its parameters, as Revit's export leaves it out (#1262) (RE-312)
…evit's export; evidence row and changelog fragments (#1262) (RE-312)
…hat was not read is kept, a partial family document keeps its instances, and what the rule leaves out is counted in the export diagnostics (#1262) (RE-312)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 3, 2026 17:04
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 3, 2026 17:04
@DrunkOnJava
DrunkOnJava merged commit f6d2169 into main Nov 3, 2026
34 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/1262-parking-spaces branch November 3, 2026 17:13
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated Claude Code review (the maintainer's review agent; it read the code and the cited Measure runs): one blocking item, fixed in 90cf8de. A form bound to a parameter that was not read fell back to the family's stored visibility and could drop an instance Revit draws; such an instance is now kept, a partial family document keeps its instances, and what the rule leaves out is counted in the export diagnostics.

DrunkOnJava added a commit that referenced this pull request Nov 21, 2026
…rmat, diagnostics, status and user-guide pages say what later work changed (#2131)

## Summary

Eight pages said things later work has changed. Each sentence now says
what `main` does, worded from the file, code, report or run that changed
it. No code, export or `diagnostics.json` changes.

- **`docs/demos.md`:** the committed synthetic fixture is 176 lines, not
172. Its abridged excerpt is regenerated from
`tests/fixtures/synthetic-project.ifc` as committed: the same entities,
with the header's `rvt-rs 0.25.0` and today's entity numbers. The page's
table of entity counts already matched the file.
- **`docs/library.md`:**
- Typed element records start at Revit 2011 (RE-259). The element
records of Revit 2008 to 2010 files are not read, only their release,
metadata and schema; the page said 2008.
- On Revit 2023 the list of what still depends on decoder work keeps
layered or angled joins and IFC export overrides, and says what is read
there: wall joins and beam cuts (RE-120, RE-122), and design options and
the export phase (RE-315).
- **`docs/mcp.md`:** progress names seven stages, not six. `partition
recovery` is in `rvt::control::Stage` since #1195.
- **`docs/rooms.md`:**
- The results table is now one run, Measure
[44928094891](https://github.com/DrunkOnJava/rvt-rs/actions/runs/44928094891)
on `main` at `c356b1d5`, with every model that has rooms (counts only
for the held-out models and the `rac_advanced` pairs). The page named
runs for some rows only. Every row was checked against the run by
script. Three rows moved, and one cell:
- The office as built goes from 260, 260 and 250 to 303, 303 and 293,
and at building permit from 262, 262 and 255 to 306, 306 and 298. Their
44 family instances are drawn from their saved meshes, and permit's last
box room is read from its solid's edges (RE-374).
- `rac_advanced` goes from 107 of 116 to 116 of 116, its 25 Areas drawn
from the plan topology (RE-333).
- Vitoria's source cell read 73 rooms within 0.1% where its own total
and the run give 72.
- Every held-out row gives the same counts as before. The office's "4 by
Revit's floor" is `space_overlaps_vs_ifc` in run 44883137004 on `main`
at `166f945b`, and the page now says so.
- A family instance written as a space can take its saved mesh
(`saved_mesh`, #1191), which the kind and outline-source tables now
list. The `saved_mesh` row now says what the run scores: every space
drawn so is within 0.1% of Revit's area. It had said "not scored".
- "What the misses are": the office's 44 family instances are drawn from
their saved meshes (44 of 44 in area and boundary), and its 30 Areas
from the plan topology (RE-333). The section had them as record boxes
and boundary lines.
- A family instance whose family draws no model form has been left out
since PR #1279 (RE-312). The page said "once PR #1279 lands".
- The `record_box` row says no space of the two tabulated office files
keeps its box.
- The 49 `rme` rooms of each save and Snowdon Towers' four stepped
rooms, whose outlines RE-374 does not read, are drawn from their saved
meshes on the saves of 2023 to 2027, and keep their box on the `rme`
saves of 2015 and 2019. That is counted from the `SpaceOutlineSource`
values of the kept exports of run 44883137004, all 13 `rme` saves and
Snowdon's. The page said 49 and seven kept their box.
- **`docs/format.md`:** three schema fields remain unclassified, each in
at least one release (`RESIDUAL` in `tests/field_type_coverage.rs`,
RE-323). The page said about ten field encodings per release, in three
places.
- **`docs/status.md`:** the same `rme` and Snowdon rooms, which it said
keep their box.
- **`docs/user-guide.md`:** the status table gains the two kinds it
lacked, "Experimental Revit release" and "Element records not exported",
worded from the summaries `rvt-inspect` prints.
- **`docs/diagnostic-semantics.md`:** the table of `failure_mode.kind`
values gains `incomplete_model`, the ninth kind `rvt-inspect` reports,
worded from the summary the CLI prints.

## Motivation

A read of the public pages against `main` at `166f945b`, and for the
rooms table a fresh Measure run of today's `main`. Each finding was
re-read against the file, code, report or run named above before any
text changed. The rustdoc of `SPACE_OUTLINE_SAVED_MESH` in
`src/ifc/export_content.rs` still describes a room drawn with
`--saved-meshes` only; that is a code change, filed as #2130.

## Changes

- `docs/demos.md`, `docs/library.md`, `docs/mcp.md`, `docs/rooms.md`,
`docs/format.md`, `docs/diagnostic-semantics.md`, `docs/status.md`,
`docs/user-guide.md`: the sentences and rows above, and the excerpt,
nothing else.

## Testing

Unit tests are banned in this repository: do not add them.

- [x] The excerpt's lines are the committed fixture's own, picked by
entity and following each reference; the fixture is 176 lines (`wc -l`).
- [x] Each rooms row was compared with the scorer's output in run
44928094891 by script, totals and per-source cells alike.
- [x] `python3 tools/ci/measured_numbers.py` passes with the same counts
as on `main` (287 of 305 numbers name a model, 9 marked as no
measurement).
- [x] `tools/ci/api-doc-ids.py` (RE-120, RE-122, RE-259, RE-312, RE-315,
RE-323, RE-333 and RE-374 each have a report) passes.
- [x] No Measure run of this branch: no code changes.

## Audit-honesty checklist

- [x] Each changed sentence agrees with the file, code, report or run it
names.
- [x] No changelog fragment: a documentation correction.
- [x] No emojis, private paths or internal jargon.

## Legal and contribution hygiene

- [x] Apache-2.0.
- [x] No Autodesk proprietary content.
- [x] No fixtures changed.

## Breaking changes

None.

Review: rvtReview, the maintainer session, wrote this change. As
rvtDevelop is not running, it re-reads the diff and approves the change
itself on a green head (Griffin, 2026-11-12).
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