Skip to content

red: B59 duct names (scratch, do not merge) - #682

Closed
DrunkOnJava wants to merge 1 commit into
mainfrom
red/b59-duct-names
Closed

DrunkOnJava wants to merge 1 commit into
mainfrom
red/b59-duct-names

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Red run for B59's test; the implementation lands in a rebuilt PR.


Note

Low Risk
Test and CI manifest only; no production exporter logic changes in this PR.

Overview
Adds a red-run integration test for B59/B43: exported ducts must match Revit’s IFC naming and typing on RE1-Mechanical (Name, ObjectType, and type object name via IFCRELDEFINESBYTYPE).

The new tests/duct_names.rs parses STEP from Revit’s reference IFCFLOWSEGMENT exports (25 rectangular ducts) and compares per-Tag to rvt-rs’s IFCDUCTSEGMENT output from RvtDocExporter. It skips when RVT_PROJECT_CORPUS_DIR or the corpus files are missing.

Registers duct_names under the real CI target list in tools/ci/test-targets.txt so the test cannot be omitted from the local/CI gate.

Reviewed by Cursor Bugbot for commit 082f840. Configure here.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Red draft for B59; its run (37231946415) is recorded in the rebuilt PR's test commit.

@DrunkOnJava DrunkOnJava closed this Oct 4, 2026
DrunkOnJava added a commit that referenced this pull request Oct 4, 2026
#684)

A rigid duct type's native record (AbsDuctType) holds its sweep profile:
AbsSysRectSweepProfile, AbsSysCircSweepProfile or AbsSysOvalSweepProfile
(Measure run 37231078920). Revit names a duct's system family by that
shape and its export names the duct <family>:<type>:<id>. rvt-rs named
RE1 Mechanical's ducts Duct-<id>, with no type object. Each typed duct
now takes the shape's system family through the native record path (2023
to 2027): Rectangular Duct:233113-DUCT-Tees:<id>, that ObjectType, and
an IfcDuctSegmentType of that name.

Red on draft #682 (run 37231946415); the output is in the test commit.
tests/element_names.rs pins RE1 Mechanical's Family:Type:Id names at 49,
and the 25 ducts will raise that. The maintainer's approval comes before
that test changes. Pset_DuctSegmentTypeCommon.Shape (B43) follows in its
own PR.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes partition field attachment and IFC element naming for all
typed ducts when native extraction succeeds; failures are silent (ducts
keep prior naming), but successful reads alter exported names and types
across supported Revit releases.
> 
> **Overview**
> **Duct IFC naming now follows Revit’s shape-based system family**
instead of generic `Duct-<id>` when the native record path can read the
type’s sweep profile (B59).
> 
> A new **`native_duct_shapes`** module maps `AbsDuctType` sweep
profiles (`AbsSysRectSweepProfile`, etc.) to **Rectangular / Round /
Oval Duct** system families. During partition decode,
**`attach_duct_system_families`** fills **`FamilyName`** (and source) on
typed ducts that lack one, using locale-aware labels so export can emit
**`Family:Type:ElementId`** names and matching ObjectType / type objects
like Revit’s RE1 Mechanical export.
> 
> Adds corpus test **`duct_names`** (vs `RE1-Mechanical.ifc`) and
registers it in CI real targets. Export comment in **`export_content`**
is updated to document the behavior;
**`Pset_DuctSegmentTypeCommon.Shape`** is explicitly out of scope here.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d1fbadd. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@DrunkOnJava
DrunkOnJava deleted the red/b59-duct-names branch October 18, 2026 09:37
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