Skip to content

test: red run for B21 pipe Length (do not merge) - #594

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b21-segment-length
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b21-segment-length

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Scratch branch: runs tests/segment_length.rs on main's code to record the red output for #35. Closed and deleted once the output is recorded.


Note

Low Risk
Test-only and CI manifest change; no exporter or runtime behavior is modified in this diff.

Overview
Adds a real-file integration test for issue #35: rvt-rs IFC exports must expose Length on Pset_FlowSegmentPipeSegment and Pset_FlowSegmentDuctSegment for pipes that share Revit’s Tag, within 0.1 mm of Revit’s RE1 Mechanical/Plumbing IFC reference files.

The new tests/segment_length.rs parses STEP/IFC text (entity index, property-set wiring, SI length scaling) and compares Revit’s IFCFLOWSEGMENT reference export to rvt-rs’s IFCPIPESEGMENT export when RVT_PROJECT_CORPUS_DIR is set; it skips missing corpus or files. segment_length is registered in tools/ci/test-targets.txt as a real target so CI and the local gate run it.

Per the PR description, this branch is intended as a red run on current main to capture failing output—not a fix for export behavior.

Reviewed by Cursor Bugbot for commit 2fd36f5. Configure here.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red output recorded: 12 of 12 flow-segment Lengths on RE1 Mechanical's 6 pipes are missing on main (run 37136045232).

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/b21-segment-length branch October 3, 2026 16:18
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
)

B21, third slice of #35.

Revit's export of the RE1 models gives every pipe
Pset_FlowSegmentPipeSegment.Length and
Pset_FlowSegmentDuctSegment.Length (IfcPositiveLengthMeasure), its
length between its ends. Each pipe whose ends RE-131 reads now carries
both.

- **Test (separate commit):** tests/segment_length.rs on RE1 Mechanical
and Plumbing. Red on main in draft #594 (run 37136045232): 12 of 12 are
missing on Mechanical. The red output is in the commit message. It
passes on the runners, every pipe within 0.1 mm of Revit's.
- Ducts are not covered: their length needs RE-134's width and height,
which are not yet read in code.

**Measure** (run 37136386732, psets_vs_ifc, equal Revit values before →
after)

| model | equal before → after |
|---|---|
| RE1 Mechanical | 98 → 108 |
| RE1 Plumbing | 244 → 360 |

The scorer counts 2 values on Mechanical and 10 on Plumbing as
different. Those are within 0.1 mm: the scorer compares at 6 significant
figures, while the writer rounds metres to 6 decimals. A tolerance
follows in the scorer. Every other model is identical to main.
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