Skip to content

red: B26 InvertElevation test alone (#35) - #612

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b26-invert-elevation
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b26-invert-elevation

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Scratch PR: the new test invert_elevation on its own, to show it red on CI before the implementation. Closed once the red run is recorded.


Note

Low Risk
Test and CI registration only; no production exporter or reader behavior changes in this diff.

Overview
Adds a real-file regression test for RE-157 (B26): exported pipes must carry Pset_FlowSegmentPipeSegment.InvertElevation matching Revit’s IFC4 export within 0.1 mm, keyed by pipe Tag, for overlapping pipes in RE1-Mechanical and RE1-Plumbing when RVT_PROJECT_CORPUS_DIR and reference RE1-*.ifc files are present.

The test exports via RvtDocExporter, parses STEP to read property sets (Revit reference uses IFCFLOWSEGMENT, rvt-rs uses IFCPIPESEGMENT), and compares values in metres after scaling from each file’s length unit.

invert_elevation is registered in tools/ci/test-targets.txt so CI runs it with the other corpus checks. This scratch PR is meant to fail until the exporter implements the property.

Reviewed by Cursor Bugbot for commit a33acf1. Configure here.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run recorded (run 37143783049: 6 of 6 RE1 Mechanical pipes lack InvertElevation); the test is cherry-picked onto the item branch with that output.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b26-invert-elevation branch October 3, 2026 18:25
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
… (#613)

RE-157 (#611) found each pipe's inner and outer diameters in its own
RbsPipeCurve data object, 549 bytes after the header. Revit's
InvertElevation is a horizontal pipe's axis less half its inner
diameter, or a vertical pipe's lower end, above the pipe's storey (69
pipes on RE1).

- partition_room_parameters: verified_data_object; enclosing_data_object
uses it.
- partition_curve_fields: scan_pipe_diameters (pipe id and RbsPipeCurve
tag in the header, 0 < inner < outer).
- partition_schema_mvp: m_pipe_inner_diameter.
- export_content: InvertElevation (IfcLengthMeasure) in
Pset_FlowSegmentPipeSegment, in model height; a sloped pipe gets none.
- ifc/mod.rs: pipe_inverts_above_storeys takes the storey elevation off
once storeys are bound.

Test: tests/invert_elevation.rs (real target). Red on main: draft #612,
run 37143783049, 6 of 6 Mechanical pipes missing; the output is in the
test commit's message. Core Interior has no pipes, so no pinned count
moves.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes IFC property emission and partition binary parsing for pipes;
incorrect invert math or storey adjustment would affect downstream MEP
workflows, but scope is limited to pipe property sets and new validation
tests.
> 
> **Overview**
> Adds **RE-157** support so IFC exports include **`InvertElevation`**
on `Pset_FlowSegmentPipeSegment` for pipes, aligned with Revit’s IFC4
behavior.
> 
> Partition scanning now reads each pipe’s inner/outer diameter from
verified **`RbsPipeCurve`** data objects (`scan_pipe_diameters`) and
attaches **`m_pipe_inner_diameter`** on pipe elements. Invert is
computed in model height (vertical pipe: lower end; horizontal: axis
minus half inner diameter; sloped or missing diameter: omitted), emitted
alongside segment **Length**, then **`pipe_inverts_above_storeys`**
subtracts the bound storey elevation so the value is height above the
storey.
> 
> **`verified_data_object`** is factored out of room-parameter parsing
for reuse by the diameter scanner. A corpus integration test
**`invert_elevation`** compares RE1 Mechanical/Plumbing exports to
reference IFC within 0.1 mm.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3c22e81. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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