Skip to content

feat(research): a face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid, and 119 elements of Snowdon Towers Architectural and 43 of each office are drawn from their saved meshes (#1706) (RE-430) - #1715

Merged
DrunkOnJava merged 20 commits into
mainfrom
feat/1706-trimmed-faces
Nov 11, 2026

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

A ruled, revolved or cone face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid, where it was refused (nonrectangular parametric trim, multiple parametric trim loops unsupported). An element refused only for that is drawn from its saved mesh in place of a box: its BodySource partition_element_record_bbox (or partition_family_instance_turned_box) becomes saved_graphics_mesh, body_sources and saved_mesh_refusals in the diagnostics move by the same count, and the body becomes a triangulated face set, which makes the IFC larger.

What moves (Measure, 126 exports against main: 101 identical, 25 differ): IfcFurniture (chairs, tables), IfcSanitaryTerminal (toilets, sinks, a faucet), IfcCovering, 2 IfcBeam, 1 IfcRailing per rac_advanced save and an IfcSpace. Snowdon Towers Architectural 119, each BIM4LCA office 43, the four large housing exports 15 and the two terrain ones 9, rac_advanced 71 per save, rac_basic 1, Snowdon Plumbing 13 and Structural 2, RE1 Architecture 1. Triangles drawn from saved graphics rise (the office at permit 838,380 to 1,590,622; Snowdon Architectural 5.17 to 6.23 million) and so do the IFCs: Snowdon Architectural 229.7 to 269.4 MB (+17.3%), the offices +27.8% to +31.2%, rac_advanced +53% to +56%, rac_basic +8.6%.

Motivation

The second step of #1706, after #1709. Snowdon Towers Architectural had 146 elements refused for the two reasons above. The cost is the finding too: 4,600 to 17,500 triangles per element drawn, where Revit's export of the same toilet has 1,668 (#1737).

Changes

  • trimmed_cells and tessellate_trimmed (src/research/native_parametric_mesh.rs) cut the region the loops enclose into the grid's strips and cells; keep_triangle (pure, tested for its failures first) drops a triangle without area when its edges are all 1e-4 ft or shorter or its shortest is 1e-8 ft or shorter, and refuses a needle.
  • tools/re/ifc_body_diff.py and tools/re/cut_ifc.py (the tools the report's numbers come from), reports/element-framing/RE-430-trimmed-faces.md, the reconnaissance addendum and changelog.d/changed/1706-trimmed-faces.md.

Testing

Measure, unfiltered with keep_ifc: 43041839803 (code ea9a16d7, kept at refs/archive/2026-11-11/cited/ea9a16d7705e, against main 8ec2ac98); timing 43041844475. The same-project gates pass. No element drawn at main changes: of 81,529 drawn on both sides in the 24 exports whose IFC was kept, 0 meshes differ, and every BodySource that changes is a box becoming a saved mesh. Against Revit's export (176 of the new elements are in it): 73 have the volume within 1%, the 102 chairs read 1.0164 (Revit draws their tubes as inscribed polygons), and no body has every vertex of Revit's within 0.001 ft (Revit's vertices lie up to 0.005 ft from the surface, on both sides). Export time 0.98 to 1.09 and peak memory 0.95 to 1.06 of main's over 74 files. Rows 3, 4 and 9 registered on #1706 are missed and reported as measured in section 7 of RE-430.

Refs #1706

…at the refusals of the plane's refinement would need to accept (#1706)

Counts, by curved kind, the plane-to-curved edges that run along u, along v or along neither; for the last, the samples per edge, the chord's sagitta against the curved surface at a pair of samples' parameter midpoint, the distance of that surface point from the plane, and whether the curved face meshes.
…h its parameters is meshed, the edge refined to the bar by its own points (#1706)

refined_plane_edge refused every shared edge that is not along u or v of the curved face (a slanted plane through a cylinder is an ellipse in its parameters), which kept 141 elements of Snowdon Towers Architectural as record boxes. An edge across both parameters now takes the points of the edge itself (Newton's method onto the plane at the middle of the parameter that changes more, halving to 2.5e-4 ft of chord sagitta), on the plane's polygon and on the cylinder's loop alike. Any other edge is as before.
#1706)

clippy -D warnings: variant Stored is never constructed (fast / cargo clippy on 547f2f2).
…ope stays out of its loop (#1706)

The 24 railings of Snowdon Towers Architectural that were refused for a shared edge that changes its fixed parameter came out refused for 'cylinder trim outside envelope': the envelope is made from the samples and the edge between two of them can lie a sagitta beyond it. The loop keeps the graph's samples there; the plane's polygon keeps the point.
…edge draws against Revit's export, and the 24 railings among them (#1706) (RE-426)
…crossing edges a plane meets a cylinder along (#1706) (RE-426)
…alving is refused, the solved parameter must lie between the samples', and the plane's polygon leaves out the points beyond the cylinder's envelope that its loop does (#1706) (RE-426)
…nd drops roof 201262 from the roofs a later save may draw otherwise, as #1706 draws them (#1706) (RE-426)
…tself, a point farther from the chord's middle than the chord is long is the other branch, and an edge that never settles is refused (#1706) (RE-426)
…ge's refinement are tested through limits passed in, each refused with its own message (#1706) (RE-426)
…ers, or has holes, is meshed in the cells of its grid (#1706) (RE-428)
# Conflicts:
#	changelog.d/changed/1706-crossing-edges.md
#	docs/format-reconnaissance.md
#	reports/element-framing/RE-426-crossing-edges.md
@DrunkOnJava DrunkOnJava changed the title feat(research): a face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid (#1706) (RE-428) feat(research): a face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid (#1706) (RE-430) Nov 11, 2026
…opped as one with a collapsed edge is, so a trimmed face with a sliver between two near knots is drawn (#1706) (RE-430)
…riangle with an edge that short is dropped like a pole's (#1706) (RE-430)
…stered rows, with the tools its numbers come from (#1706) (RE-430)

The report states what the second step of #1706 draws and what it costs on
the unfiltered run of ea9a16d against main 8ec2ac9 (101 of 126 exports
identical, 25 moved): 119 elements of Snowdon Towers Architectural, 43 of
each BIM4LCA office, 15 of each large housing export, 71 of each rac_advanced
save, and the rest of its section 6. Six of the nine registered rows hold;
rows 3 (the shares of volume and vertex agreement with Revit's export), 4 and
9 (the IFC growth, 17.3% on Snowdon Architectural and 27.8% to 31.2% on the
offices) miss and are reported as measured, with the shapes read as the row
asks. The triangle density that causes the growth is #1737.

tools/re/ifc_body_diff.py compares the bodies of two exports object by object
as text (class, BodySource, SavedMeshRefusal, a fingerprint of every face
set), and tools/re/cut_ifc.py cuts an export down to the elements of some
Tags for the scorer: the report's counts of what changes and what does not
(81,529 drawn on both sides, 0 meshes differ) and its Snowdon scores come
from them. The head that was measured is archived under
refs/archive/2026-11-11/cited/ea9a16d7705e.

Also the changelog fragment and the format-reconnaissance addendum.
@DrunkOnJava DrunkOnJava changed the title feat(research): a face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid (#1706) (RE-430) feat(research): a face whose trim is not the rectangle of its parameters, or has holes, is meshed in the cells of its grid, and 119 elements of Snowdon Towers Architectural and 43 of each office are drawn from their saved meshes (#1706) (RE-430) Nov 11, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 11, 2026 16:02
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
… there and meshed again when its triangles miss its area, and 21 toilets of Snowdon Towers Architectural are drawn from their saved meshes (#1732) (RE-434) (#1740)

## Summary

A plane face's outline can be one ring that visits a vertex twice (two
lobes that touch at a point), which earcut covers a sliver beside, so
its triangles add up to 0.65% more than the ring's area and the face is
refused for `triangulated area mismatch`. When that check fails, the
rings are split at every vertex a ring visits twice and the face is
triangulated again; if the check then passes, the face is drawn from the
split rings, else it is refused as before. A face that passes the check
takes the path it always took, so no element that is drawn can change.

What moves (Measure, 126 exports against `main`: 125 identical, 1
differs): 21 `IfcSanitaryTerminal` of Snowdon Towers Architectural, one
type (`Toilet-Domestic-3D`), change BodySource from
`partition_element_record_bbox` to `saved_graphics_mesh`; `body_sources`
moves 492 to 471 and 4,282 to 4,303, `saved_mesh_refusals` loses
`triangulated area mismatch` 21 to 0 (269 to 248 entries). The model's
triangles from saved graphics go from 6,228,638 to 6,948,098 (34,260 per
toilet, where Revit's has 1,668, #1737) and its IFC from 269.5 to 296.3
MB (+9.9%).

## Motivation

#1732, found by RE-430's run: the 21 toilets were behind a ruled-face
refusal until #1715 let them reach this plane face. The diagnostic (a
scratch build, runs 43054812102 and 43055872726) names the face and the
cause.

## Changes

- `plane_mesh` (the planar triangulation, moved unchanged) and
`split_pinched_rings` (`src/research/native_saved_mesh.rs`); five
failure-first tests of the pure helper.
- `reports/element-framing/RE-434-pinched-plane-rings.md`, the
reconnaissance addendum and
`changelog.d/changed/1732-pinched-plane-rings.md`.

## Testing

Measure unfiltered with `keep_ifc`
([43058503567](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43058503567),
code `4f47b837`, kept at `refs/archive/2026-11-11/cited/4f47b837bb2b`,
against `main` `aa5dc4c6`) and `timing`
([43058508332](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43058508332));
the same-project gates and the semantic check pass. No element drawn at
`main` changes: of 4,282 objects drawn on both sides 0 meshes differ
(`tools/re/ifc_body_diff.py`), and no other object differs in geometry
or refusal. Against Revit's export the 21 read 1.0063 of its volume (21
of 21 within 1%; Revit's vertices lie up to 0.0047 ft from the mesh).
Export time and peak memory of that model read 1.02 and 1.03 of
`main`'s. The four rows registered on #1732 hold.

Fixes #1732. Refs #1737.
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
… steps and at the v of the trim's own steps and cusps, and the triangles of 25 of 126 exports fall (#1737) (RE-437) (#1769)

## Summary

A face cut by its trim is cut across at the chord's `v` steps and at the
`v` of the trim's own steps and cusps, where `trimmed_cells` cut each
strip's trapezoids at every knot of `v` and `face_grid` made every trim
point's `v` a knot, so that a trim of T points left every trapezoid that
held a point's `v` cut once more across the whole face. The strips keep
a knot at every trim point's `u` (a trim segment must cross a strip
whole, so each corner of the trim is still a corner of the cells). The
cuts across them are now the chord's steps and the `v` of each vertex
the trim does not run through from one strip to the next (`trim_steps`:
the ends of a step along a strip boundary and the tip of a hole),
because without those a strip's cells run straight past a vertex of the
next strip's and leave a crack inside the face. A face meshed on its
grid keeps every trim point as a knot on both axes, and a plane face
that shares an edge with a cut face follows the same `v` knots
(`refined_plane_edge`). No element stops being drawn from its saved mesh
(BodySource changes 0).

What moves (Measure, 126 exports against `main`: 101 identical, 25
differ, the same 25 as the first version of this change): the triangles
from saved graphics fall by 7.5% on the BIM4LCA office (all 107,887 of
them in its 43 toilets, a toilet from 14,025 to 11,516), 6.8% on Snowdon
Towers Architectural, 4.6% on the four large housing exports, 3.3% on
the two terrain ones and 10.4% on `rac_advanced`; the IFCs by 0.4% to
6.6% (the office 117.1 to 113.6 MB, Snowdon Towers Architectural 272.1
to 257.6 MB). The cracks are identical per class to `main`'s on the
office as built (160 in 57 face sets), the timber office (168 in 57),
the housing and RE1, none in a toilet, and fewer on `rac_advanced` (394
to 374). One measured negative: RE1 Architecture's shower head has its
farthest vertex from Revit's surface move from 0.009123 to 0.01007 ft,
over the 0.01 ft column of its class.

## Motivation

#1737, the second lever of the density RE-430 measured (after RE-435): a
toilet's two trimmed faces were 4,147 of its 14,025 triangles. A first
version cut at the chord's steps alone and took 8.1% off the office, and
rvtDevelop's read counted what its rows had not: the vertices of a
face's cells inside a boundary edge of the same face's cells went from
160 to 504 on the office as built, the 344 more all in the 43 toilets.
This version keeps the cuts that stop them and the diagnostic is in
RE-437.

## Changes

- `face_grid` (`src/research/native_parametric_mesh.rs`): the trim
points' coordinates join the knots of `u`; for a face not meshed on its
grid the knots of `v` take the `v` of the trim's steps and cusps
(`trim_steps`) and no longer every trim point's; `trimmed_cells` no
longer asks a trim point's `v` to be a knot (a point off the `u` knots
is refused as before). Four failure-first tests of the pure helpers: a
trim point between the `v` knots is a corner and not a cut, a point on a
vertical side between them is covered all the same, the vertices a strip
beside passes by are the steps and the cusps (an L, a diamond, a square
with a diamond hole), and a step of the trim is a vertex of the strips
on both sides when its `v` is a knot while chord steps alone leave a
free edge off the trim.
- `tools/re/mesh_tjunctions.py` (new): the crack count, per class of the
owning product, over a kept export.
- `reports/element-framing/RE-437-trimmed-face-cuts.md`, the
reconnaissance addendum,
`changelog.d/changed/1737-trimmed-face-cuts.md`, and the sentence of
`changelog.d/changed/1706-trimmed-faces.md` that said every trim point
was a knot.

## Testing

The measured commit is `70bef87acfbe` (`ee2d9dfe`, the steps rule,
merged over `main` `a0c1c61a`), archived as
`refs/archive/2026-11-11/cited/70bef87acfbe`; the commits after it
change the report, the fragments, the addendum and this description, and
no source.

- [x] Unfiltered Measure with `keep_ifc`
([43091480051](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43091480051),
against `main` `a0c1c61a`; GitHub's artifact outage of 2026-11-11 failed
the uploads of 8 shards, which `gh run rerun --failed` re-ran as attempt
2) and `timing`
([43091485302](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43091485302)).
Rows registered on #1737 before the run ([comment
6805810741](#1737 (comment)))
all hold: rows 1, 2, 4, 5 and 6 outright; row 3 on its registered
columns (against Revit's export no class's median volume moves, and the
counts within 1% of its volume and with every vertex of Revit's within
0.001 ft fall on no class), with the shower head's 0.01 ft column as a
measured negative (RE-437 section 4); row 6: export time 0.97 to 1.02
and peak memory 0.98 to 1.05 of `main`'s (1.05 asked), the office 1.00
in both.
- [x] The first version, Measure
[43078686248](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43078686248)
(code `aafa5b1a`, kept under
`refs/archive/2026-11-11/cited/aafa5b1a2f15`), held its five rows and
left 344 cracks in the toilets: kept as the negative result in RE-437
section 2.
- [ ] `same-project gates` and the semantic check on the measured
commit; `full / CI passed` on the final head

## Audit-honesty checklist

- [x] A user-visible change has its entry as a fragment under
`changelog.d/changed/`.
- [x] A reverse-engineering finding has its report:
`reports/element-framing/RE-437-trimmed-face-cuts.md` (status, artefact
hashes by run, measured counts, reproduce commands naming a commit).
- [x] No emojis, no private paths in committed files.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk proprietary source, internals or NDA
material.
- [x] No new test fixtures.

## Breaking changes

None.

## Related issues

Refs #1737 (the chord, the third lever, stays open). Follows #1715,
#1744, #1709.
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