Skip to content

fix(ifc): a wall's mesh quantities set aside each opening at its real height, not as tall as its start plus its top (#1046) - #1939

Merged
DrunkOnJava merged 2 commits into
mainfrom
fix/opening-box-height
Nov 13, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
fix/opening-box-height

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

wall_frame_and_openings (#1046, since #1741) builds the boxes of the openings a wall's saved-mesh quantities set aside. It read an opening's z_range_feet as [start, start + height] and then put the box's top at start plus that, so a door or window whose opening starts above its placement (RE-93) had a box too tall by its start. The box is now the opening the writer cuts: from its start, as high as it is (step_writer::opening_solid_position reads z_range_feet the same way).

Motivation

Found by the batch 9 export audit (a DeepSeek checker's lead, re-read against the code by Claude): src/ifc/saved_meshes.rs:1418-1443. A box too tall can claim faces of the wall above a window as the opening's, which can move that wall's Qto_WallBaseQuantities side areas.

Changes

  • src/ifc/saved_meshes.rs: [start, height] is taken as stored.
  • changelog.d/fixed/opening-box-height.md.

Testing

The unfiltered Measure against main (every model and scorer, with the samples for the same-project gates) is in this PR's comments. It says which exports move and whether each moved Qto_WallBaseQuantities value is closer to Revit's.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/fixed/

… height, not as tall as its start plus its top (#1046)

wall_frame_and_openings mapped an opening's z_range_feet, which is
[start, height] (RE-93, as step_writer::opening_solid_position reads it),
to [start, start + height] and then put the box's top at start + that, so a
window starting above its placement had a box too tall by its start. Since
#1741.
… the opening box fix adds (Measure 43511426932)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Measure 43511426932: an unfiltered run against main b817ac6, with every model and scorer and the samples. The head is f2397c1.

  • Exports: 12 of 101 move; all 101 diagnostics.json are equal.
  • Every quantity that moves goes from missing to equal Revit's own value. No model gains a different value:
Model Equal Missing
Nordic housing, concrete, as built 4,127 → 4,131 1,230 → 1,226
Nordic housing, timber, as built 4,560 → 4,568
Nordic housing, timber, permit 4,485 → 4,491
BIM4LCA office, as built 37,451 → 37,459
R2025 12 and 16 48 → 56 and 52 → 60
R2025 13 to 15 54 → 62 each
R2025 17 48 → 56
  • Different: 0 everywhere, as on main; the office keeps its 1.
  • Core Interior: writes 24 more wall quantities (GrossSideArea, GrossVolume, Height and NetSideArea, 338 → 344). Its Revit export has base quantities off (RE-242), so they are counted apart.
  • Same-project gates: pass (15 samples held to their earlier saves, and the Areas).
  • Witness: Core Interior's observations are refreshed from Measure's witness files (byte-identical to CI's). The replay passes for ifc-lite, ifcopenshell and rvt-rs on both artifacts.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 13, 2026 22:09
@DrunkOnJava
DrunkOnJava merged commit 9aa0f4a into main Nov 13, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/opening-box-height branch November 13, 2026 22:34
DrunkOnJava added a commit that referenced this pull request Nov 13, 2026
…1939's quantities and this change's material representations (Measure 43520712633)
DrunkOnJava added a commit that referenced this pull request Nov 13, 2026
…r --revit-property-sets, and docs and messages that say what the export does (batch 9) (#1946)

## Summary

Batch 9's confirmed findings that change no IFC value, each re-read
against the code by Claude:

- **One material rule.** The viewer's schedule
(`scene_graph::build_schedule`) read only an element's single material,
so a layered wall showed none where the elements CSV names its layer
set. `schedule_csv::MaterialNames` holds the CSV's rule (profile set,
layer set, single material, constituents) and both use it.
- **Counts after `--revit-property-sets`.** `export_pipeline` called
`recount_exported` after every model-changing step but
`revit_property_sets::attach`, so `exported.total_entities` missed the
sets it adds.
- **No storey means the building.** `BuildingElement.storey_index`,
`ElementInput.storey_index`, a `step_writer` comment and the no-Level
warning said an element with no storey goes to storey 0, or to a
fallback storey. The writer contains it in the building (RE-27, RE-124),
and they now say so.
- **Docs that misstated the code.**
- `BuilderOptions.units` named a `build_unit_list` that does not exist,
and claimed the units become the `IfcUnitAssignment`; the writer's
assignment is fixed SI (#403).
  - `ScheduleRow.guid` is the ElementId, not the GlobalId.
- The pbr comment named the 2.2 gamma; the code applies the exact sRGB
curve.
- **Small guards.**
- The element panel prints a length that rounds to zero as `0.000`, as
its own rule says.
- The glTF export drops a material index past the model's materials, as
the STEP writer does.
- `attach_wall_top_joins` replaces `m_wall_top_joined` rather than
pushing a second copy.

## Motivation

Batch 9, an export bug hunt: 40 DeepSeek checkers and 30 verifiers,
$3.79. Two other fixes from it change exports and are their own PRs:
#1939 (the opening box height) and #1940 (material colours). The rules
that run on unmeasured releases are #1945.

## Testing

No IFC value changes. `diagnostics.json` changes only in the no-Level
warning's text, and in `total_entities` under `--revit-property-sets`,
which no Measure run uses. The unfiltered Measure with the samples is in
this PR's comments, to show the exports byte-identical and give the
gates verdict.

## Audit-honesty checklist

- [x] README / docs reflect the current state after this PR
- [x] A user-visible change has its entry as a fragment under
`changelog.d/fixed/`
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