Skip to content

red: duct segment type common test alone (#35) - #604

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/duct-type-common
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/duct-type-common

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

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


Note

Low Risk
Test-only and CI registration; no production export logic changes in this PR.

Overview
Adds a real-file corpus test for issue #35 that locks Revit parity for duct Pset_DuctSegmentTypeCommon.Length on the RE1 Mechanical model.

The test exports RE1-Mechanical.rvt with RvtDocExporter, parses STEP/IFC for IFCDUCTSEGMENT elements by Revit Tag, and compares Length in Pset_DuctSegmentTypeCommon against Revit’s reference RE1-Mechanical.ifc (read from IFCFLOWSEGMENT), within 0.1 mm after normalizing each file’s length unit. It expects 25 overlapping ducts and skips when RVT_PROJECT_CORPUS_DIR or corpus files are missing.

tools/ci/test-targets.txt registers duct_segment_type_common under the real class so CI runs this gate (intended to fail until export implements the property set).

Reviewed by Cursor Bugbot for commit f8c95fe. Configure here.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red run recorded (run 37140175260: 25 of 25 RE1 Mechanical ducts lack Pset_DuctSegmentTypeCommon.Length); the test is cherry-picked onto the item branch with that output.

@DrunkOnJava DrunkOnJava closed this Oct 3, 2026
@DrunkOnJava
DrunkOnJava deleted the red/duct-type-common branch October 3, 2026 17:52
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
…605)

Revit's IFC4 export of RE1 Mechanical gives every duct
Pset_DuctSegmentTypeCommon with Length, the same value as its two
flow-segment sets (which rvt-rs already matches, 31 of 31). rvt-rs now
writes it on ducts.

Revit also writes the set on RE1 Mechanical's 6 pipes but on none of RE1
Plumbing's 63, so the pipes are left out: IFC4 defines the set for duct
segments. Shape is not written, as the round versus rectangular switch
is not read (RE-134).

Test: tests/duct_segment_type_common.rs (real target). Red on main:
draft #604, run 37140175260, 25 of 25 ducts lack the set; the output is
in the test commit's message. Core Interior has no ducts, so no pinned
count moves.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Adds one more property set on duct exports using the same length
already written elsewhere; pipes and geometry paths are untouched.
> 
> **Overview**
> Duct IFC export now emits **`Pset_DuctSegmentTypeCommon`** with a
**`Length`** property (same value as the existing flow-segment length
sets), matching Revit’s RE1 Mechanical IFC4 behavior. Pipes are
unchanged—only the duct branch adds this third property set when segment
length is known.
> 
> A new **real-file** test (`duct_segment_type_common`) exports
`RE1-Mechanical.rvt`, compares `Pset_DuctSegmentTypeCommon.Length` on
shared duct tags against Revit’s reference IFC (0.1 mm tolerance,
per-file length units), and **`tools/ci/test-targets.txt`** registers
the target for CI.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
37b1bc1. 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