Skip to content

feat(elements): draw pipes as the cylinders their connector entries and record box make (#96) (RE-131) - #522

Merged
DrunkOnJava merged 5 commits into
mainfrom
re/re131-pipe-sections
Sep 30, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
re/re131-pipe-sections

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Pipes are drawn as the circle-profile cylinders Revit draws (an IfcExtrudedAreaSolid over an IfcCircleProfileDef) instead of their record boxes, from the two connector entries that hold each pipe's ends and the record box that gives its radius. On the MIT RE1 Mechanical and Plumbing models (Revit 2025), all 69 pipes match Revit's own export in profile, radius, axis ends and length; main matched none.

Motivation

Pipes were boxes (#96). jakobhirn-bit's test vector in Discussion #112 reads a pipe's centreline from connector entries and derives its outside radius from the record box, on Autodesk's Snowdon Towers plumbing sample, which cannot run in CI. The probe on RE1 (runs 36719977712 and 36720663075) found the same entries there, at the points where Revit's own IFC starts and ends each pipe's extrusion, so the layout is now measured on a licensed file. reports/element-framing/RE-131-pipe-cylinders.md has the finding.

Changes

  • src/partition_pipe_axes.rs: finds the connector entries ([u64 element][u32 index][u32 1][3 x f64]) whose points lie in a pipe's box in one pass over its partition, takes the furthest-apart pair, and keeps it only if every well-conditioned axis gives the same radius and the box rebuilt from the cylinder is the record box on all six sides. A pipe no pair proves keeps its box. Revit 2025 only.
  • partition_schema_mvp::attach_pipe_axes stores the ends and radius on the element; ifc::export_content writes a PlacedExtrusion over a circle, BodySource = partition_pipe_axis.
  • examples/probe_re131_pipe_sections.rs (the probe the finding rests on), and tools/re/pipe_bodies_vs_ifc.py, added to the Measure workflow's scorers.
  • CHANGELOG, README, supported profile, support matrix (element-record-pipe-cylinders, partial), and the RE-131 report.

Testing

Measure run 36723473598 (this branch against main, on GitHub's runners), pipe_bodies_vs_ifc.py, per pipe against Revit's own IFC export:

main this PR
RE1 Plumbing pipes with a circle profile 0 of 63 63 of 63
radius within 0.001 ft of Revit's 0 of 63 63 of 63
axis ends within 0.01 ft of Revit's 21 of 63 63 of 63
length within 0.01 ft of Revit's 21 of 63 63 of 63
RE1 Mechanical pipes: circle profile and radius 0 of 6 6 of 6
RE1 Mechanical pipes: axis ends and length 2 of 6 6 of 6

The worst differences are under 0.00001 ft. The export diagnostics count partition_pipe_axis 63 on Plumbing and 6 on Mechanical, and the record-box bodies fall from 124 to 61 and from 74 to 68. The IFC of Core Interior, Einhoven, RE1 Architecture and RE1 Electrical is byte-identical to main's (so both Core Interior witness observations regenerate unchanged), and no other scorer's output changes on any model.

  • Every required check, MSRV 1.85, IfcOpenShell validation, corpus tier 2 and the wheel build pass on GitHub's runners
  • Verified end to end on real Revit files (MIT-licensed RE1 models, Revit 2025) against Revit's own IFC export; the probe and scorer reproduce it (gh workflow run measure.yml --ref <branch> -f base=main)
  • IFC exporter change: Core Interior's IFC, and so its witness observations, are identical to main's

Audit-honesty checklist

  • What is not measured is stated in the report, the support matrix (partial), the README and the profile: every RE1 pipe runs along a principal axis, so sloped pipes rest on the rebuild proof and not on an oracle; jakobhirn-bit's 3,006 of 3,056 on Snowdon Towers' plumbing sample is theirs and is not claimed; Revit 2024 and 2026 are theirs, so the release gate lists 2025; ducts and fittings keep their boxes
  • The README's "still boxes" list now names ducts and pipe fittings
  • No emojis, private paths or PII

Legal and contribution hygiene

  • Apache-2.0
  • Clean-room: public byte observations of the named MIT files, comparison with Revit's own IFC exports, and the layout jakobhirn-bit published in Discussion Set of findings #112 from two public Autodesk samples (no SDK source, disassembly or NDA material, by their statement there). Credit: jakobhirn-bit.
  • No new fixtures

Breaking changes

On Revit 2025 files, a pipe whose ends are proven changes from a box to a cylinder in the IFC, glTF and plan output. Off nowhere else.

Related issues

Refs #96.

@cursor

cursor Bot commented Sep 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a41b074d-5556-412e-bc0a-b359c6d52afd)

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review September 30, 2026 13:50
@DrunkOnJava
DrunkOnJava merged commit 730c9de into main Sep 30, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the re/re131-pipe-sections branch September 30, 2026 13:50
DrunkOnJava added a commit that referenced this pull request Sep 30, 2026
…onnected there, and ends match to 0.00001 ft (#96) (#523)

## Summary

Corrects two statements in RE-131 (#522) that said more than was measured: what an entry's element is at a pipe's ends, and how closely the ends match.

## Motivation

#522 said an entry is keyed by the pipe "for an end nothing is connected to" and by the connected element otherwise. Only the second half was checked: pipe 442026's two ends are keyed by 442040 and 442191, two Closet Bend fittings whose placements in Revit's IFC sit 0.1413 ft beyond the pipe's ends on its axis, each beside the end it is keyed for. Pipes 441731 and 441849 have both entries keyed by the pipe itself, and what is at those ends was not looked at. The doc comment and the note on the tolerance also said "to the last bit"; the scorer's resolution supports 0.00001 ft.

## Changes

- `src/partition_pipe_axes.rs` doc comments, the RE-131 report, the CHANGELOG entry and the support-matrix note now say the entry is keyed by the pipe itself or by the element connected at that end, with the 442026 evidence, and give the ends' agreement as 0.00001 ft. No code changes.

## Testing

Docs and comments only. The fittings' placements are from RE1 Mechanical's own IFC (`IFCFLOWFITTING` Tags 442040 and 442191, placed at x = -178.7549 and -184.0042 ft against the pipe's ends at -178.8962 and -183.8629 ft, same y and z).

- [x] `cargo fmt` clean; the doc comment change is the only Rust change

## Legal and contribution hygiene

- [x] Apache-2.0; clean-room as #522
- [x] No new fixtures

## Breaking changes

None.

## Related issues

Refs #96.
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