Skip to content

feat(ifc): a duct's size and type from its curve object, and its Length and Reference (#35, #96) - #599

Merged
DrunkOnJava merged 5 commits into
mainfrom
fix/b21-duct-fields
Oct 3, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
fix/b21-duct-fields

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

B21, fourth slice of #35, and part of #96.

RE-134 found where a duct's or pipe's curve object keeps its fields, at its RbsCurveConnectorManager anchor: width at +8, height at +16, type id at +64. This reads them in code.

Measure (run 37137540566, RE1 Mechanical, head against main)

before after
Pset_DistributionFlowElementCommon.Reference 48 of 73 73 of 73
Pset_QuantityTakeOff.Reference 49 of 74 74 of 74
Flow-segment Length, each set 5 of 31 29 of 31
Type names 49 of 74 74 of 74

The 2 Lengths counted as different are within 0.1 mm. This branch's scorer predates the tolerance in #597. Every other model is identical to main.

Revit's export of RE1 Mechanical gives each of its 25 rectangular ducts
Pset_FlowSegmentDuctSegment.Length and Pset_FlowSegmentPipeSegment.Length
(its length along its axis), and Pset_DistributionFlowElementCommon
.Reference and Pset_QuantityTakeOff.Reference (its type's name). The new
real-file target checks each of those on every duct rvt-rs writes with
Revit's Tag: lengths within 0.1 mm, references as Revit writes them.

Red on main (draft #598, run 37136951323, Corpus health tier 2):

    thread 're1_mechanical_duct_lengths_and_references_are_revits'
    panicked at tests/duct_fields.rs:224:5:
    100 of the 25 ducts' Length and Reference values are not Revit's;
    first: ["428274 Pset_FlowSegmentDuctSegment.Length: Revit 0.2 m,
    rvt-rs None", ...]
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured;
    0 filtered out; finished in 0.75s
…th and Reference (#35, #96)

RE-134 measured where a duct's or pipe's curve object keeps its fields:
at its RbsCurveConnectorManager anchor (the nearest before its first
connector entry), m_dWidthOrDiameter at +8, m_dHeight at +16 and m_idType
at +64. This reads them in code.

- partition_curve_fields: scan_curve_fields finds each duct's and pipe's
  anchor and fields; CurveFields::length_in_box gives an axis-aligned
  duct's length as the dimension of its record box its section leaves.
- partition_schema_mvp: ducts and pipes carry m_curve_width and
  m_curve_height; a duct its type and that type's name (RE-130's reader)
  and m_duct_length. Its system family follows its shape, which is not
  read, so it keeps its Duct-<id> name.
- export: a duct gets both flow-segment Length sets, as a pipe does, and
  its type's name as Reference.
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
…#597)

psets_vs_ifc compared numbers at six significant figures. A pipe length
rvt-rs writes a micrometre off Revit's (the writer rounds metres to six
decimals) counted as different: 2 of RE1 Mechanical's and 10 of
Plumbing's Lengths on #595. Numbers of the same value type are now equal
within a relative 1e-5, with an absolute floor of 1e-5 in the compared
unit.

Measure run 37137013931, on main with #595:
- RE1 Plumbing: equal 370, different 0 (was 360 and 10). Both
flow-segment Lengths are equal on 63 of 63 pipes.
- RE1 Mechanical: equal 110, different 0 (was 108 and 2). 6 of 6 pipes
are equal; the 25 ducts are missing until #599.
…ies after it (#96)

The first cut gave each curve the anchor before the first connector entry
in the stream that falls in its box. A fitting's or a neighbour's entry at
a shared end can come first, so 13 of RE1 Mechanical's 25 ducts found no
anchor (tests/duct_fields.rs: '52 of the 25 ducts' Length and Reference
values are not Revit's'). The anchors are one per curve, so each anchor now
goes to the one element whose box holds the points of the first two
entries after it.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 3, 2026 16:42
@DrunkOnJava
DrunkOnJava merged commit 07c18ad into main Oct 3, 2026
23 checks passed
@DrunkOnJava
DrunkOnJava deleted the fix/b21-duct-fields branch October 3, 2026 16:47
DrunkOnJava added a commit that referenced this pull request Oct 3, 2026
Records #595, #597 and #599 in B21's progress, with the property-set
scores measured on main at #599's merge (Measure run 37138175399).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only backlog update; no runtime, export, or CI logic
changes in this diff.
> 
> **Overview**
> Updates **B21** (parameters milestone) in `BACKLOG.md` to reflect work
merged through **#599**, not new product code.
> 
> **#595** is recorded as done (pipe `Length` in both flow-segment sets,
with `tests/segment_length.rs` and its red run). **#597** notes that the
`psets_vs_ifc` Measure scorer now treats numeric properties as equal
within a relative **1e-5** tolerance so tiny writer rounding no longer
counts as a mismatch. **#599** documents RE-134 duct curve fields
(width, height, type at the connector anchor) plus per-duct type,
`Length`, and `Reference`, with `tests/duct_fields.rs` and draft
**#598**’s red run.
> 
> Adds a **Measure run 37138175399** snapshot table (equal counts per
RE1 model, none “different”) and notes progress posted on **#35**,
**#96**, and **#227**. The open-items list drops the
duct-`Length`/RE-134 note because **#599** covers it.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
2e023ef. 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