Repository navigation
fix(research): four of Snowdon Towers Architectural's six block roofs are drawn from their saved meshes, at 198,762 triangles (#1683) (RE-422) - #1707
Merged
Conversation
…e says what the edge's m_pFace holds (#1683) The guard refuses a component when an edge's m_pFace does not resolve to two Face objects; the six Snowdon Towers Architectural roofs it keeps as blocks (RE-420) show only that, not which fault. The refusal text now names each entry's class or none. No body is drawn differently.
…eps its level block holds at the edge the ruled-surface guard refuses (#1683) probe_re422_ruled_boundary prints, for the four Snowdon Towers Architectural roofs, the classes of the graph's objects, each face's surface class, the shapes of every edge's m_pFace, the components the guard builds and the first open edges with the face they border.
…ed face borders an edge that names fewer than two faces (#1683) RE-422's probe: the four Snowdon Towers Architectural roofs that kept their block have closed ruled faces; the open edges (Face + none, 8 to 59 per roof) border planes and a cylinder, and cannot join two ruled faces. The guard now looks at the ruled faces' own edges.
…d a flat one none (#1683) One normalized grid for every ruled face of a component gave a roof of 23 ruled faces 1.1 million triangles where Revit's own body has 1,259. A face now takes its own steps: none along a straight profile, the angular step across an arc or an ellipse, and the twist only where the four corners of its parameter rectangle are not in one plane. The guard against a ruled face with an unresolved neighbour stays.
…across them apart (#1683) An arc of radius 100 ft over 90 degrees needs 176 steps to stay within 0.001 ft, and the face got 176 across its straight generators too. u now takes the larger of the arcs' steps and sqrt of the twist's cells, v takes what the twist asks beyond u (at least one), so u times v is still at least the twist's cells.
…rter of the twist's cells, which hold the 0.001 ft bar (#1683) A surface between two lines is a bilinear patch: cut into n_u by n_v cells of two triangles it leaves them by twist / (4 n_u n_v) at most, so twist / (4 * 0.001 ft) cells hold the bar and the 4 times that the rule asked had no reason in the code. A face with an arc or an ellipse keeps the margin, its own bow adding to the twist's. The probe of the roofs' grids (Measure 42974359390) found 98% of the file's ruled-face cells in faces that are not flat, all straight to straight with 11.6 to 24.0 ft of twist, and the trim adding nothing to them.
…ly to a component main's guard refused; a component it accepted keeps its shared grid (#1683) The unfiltered Measure of the per-face grid (42980660819) moved 12 exports, one of them a scored class: the held-out house's windows within 0.001 ft of Revit's in both directions, from 9 of 15 to 2. A component main drew is now drawn with the grid it had, byte for byte; the four roofs and the 43 footings, which only the narrowed guard admits, take the per-face grid. The refusal text is main's again, so no element still refused changes.
…d what sets its cells (#1683) The four roofs of Snowdon Towers Architectural still have 761,635 triangles after the per-face grid. face_grid adds every trim point's coordinates to both knot vectors, so this prints, per ruled face, the formula's counts, the final knots, the distinct u and v the trim adds, the twist and whether it is flat. face_grid and FaceGrid are public for it. (cherry picked from commit 954eb50)
…gistered on #1683, and scores the 43 footings against the VIM (#1683) (RE-422) The footings are the one thing the rule moves besides the roofs: all 43 are SFD_Round shafts, and the VIM export of the model holds Revit's own meshes for them. Height and lowest point equal the VIM's on 43 of 43, volume within 0.55% (the VIM's cylinders are 32-sided prisms).
The probe made FaceGrid and face_grid public in rvt::research, and the crate warns on public types without Debug (clippy -D warnings, fast / cargo clippy on 9ee661b).
DrunkOnJava
marked this pull request as ready for review
November 11, 2026 09:39
Owner
Author
|
Timing of this head against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four of Autodesk's Snowdon Towers Architectural's roofs (Revit 2024) are drawn from their saved meshes instead of the level block of their sketch outline: 198,762 triangles in all, each within 0.11% of Revit's volume, every vertex of Revit's body within 0.000358 ft of rvt-rs's surface (the blocks were 33% to 133% over Revit's volume). A ruled-surface component is refused now only where a ruled face of it borders an edge naming fewer than two faces, and a component that guard used to refuse takes a grid per face and a quarter of the cells for a face between two straight profiles. Exports are unchanged for 124 of 126 models; the two that move are Snowdon Towers Architectural (the four roofs) and Snowdon Towers Structural (43 footings).
Motivation
#1683 (RE-420 found that six of the model's 20 roofs stay blocks, each with one decoder diagnostic). Four had
malformed ruled-surface edge is connected to face #; the roofs' ruled faces are closed and the open edges are on the planes and the cylinder of their sides (RE-422, Measure 42954101363). Every step was registered on the issue before its run, 39 rows in all (21 held, 3 held in part, 10 missed, 4 could not be read as written; the last is read here), listed with their comments in section 9 of RE-422.Changes
src/research/native_parametric_mesh.rs:ruled_surface_componentrefuses a component only where a ruled face of it borders an edge that names fewer than two faces, and says whether the old guard would have refused it;face_gridgives a ruled face of such a component its own grid,ualong the profiles from its arcs' steps and the twist,vbetween them from the rest, with a quarter of the twist's cells for a face between two straight profiles (a bilinear patch leaves its two triangles by|W| / (4 n_u n_v)), and flat faces ask none; a component the old guard accepted keeps its sharednbyngrid and its refusal text, so no export drawn before changes.FaceGridandface_gridarepubfor the probe (insidervt::research).probes/examples/probe_re422_ruled_boundary.rs(what the saved graph holds at the open edges) andprobe_1683_ruled_grids.rs(the grid of each ruled face and what sets its cells).tools/re/footing_meshes_vs_vim.py: scores the saved meshes of an element class against the VIM export of the model (height, lowest point, volume; the VIM's own document only, since ElementIds repeat across its six).reports/element-framing/RE-422-ruled-surface-roofs.md,docs/format-reconnaissance.md(an addendum),changelog.d/changed/1683-ruled-surface-edge-detail.md.Testing
Measured end to end on the Measure runner (no local builds here). The unfiltered run of the rule as it lands, 42984875710 (
1cd344d5merged withmain1641128, every flag and scorer, 126 models each side):124 of 126 exports byte-identical, among them the held-out house, RE1 Architecture,
rac_basic2023 to 2027 and Snowdon Electrical, HVAC and Plumbing, which the quarter bound alone moved; the two that move are Snowdon Architectural and Snowdon Structural; the scorer diff holds nothing but oneplacement compositionline on each of those two (2,409 to 2,405 swept solids on Architectural, 1,214 to 1,171 on Structural, which have no Revit export);same-project gatespass;the element read of the kept exports (42988906515 against 42993080184,
main1641128; Tag, class,BodySource, refusal and a hash of each face set): Architectural has 6,049 products on both sides and exactly 4 change, the fourIfcRoof, record box to saved mesh, the 3,837 meshes drawn on both sides are identical, and its file goes from 4,218,653 triangles (189.6 MB) to 4,417,415 (196.6 MB), the 198,762 added being the four roofs'; Structural has 1,289 products on both sides and exactly 43 change, allIfcFooting, the 83 meshes drawn on both sides are identical, and its file goes from 230,626 triangles (13.5 MB) to 248,294 (14.2 MB);the 43 footings against the VIM export of Structural (
tools/re/footing_meshes_vs_vim.py, local only): all 43 areSFD_Roundshafts, height and lowest point equal Revit's on 43 of 43 (largest difference 0.00000 m), volume at most 0.55% over (the VIM's cylinders are 32-sided prisms, 0.64% under their circle); the 47 footingsmainalready drew from a mesh read height and lowest point equal on 47 of 47, volume within 0.44%;the roof scorer (
tools/re/roof_bodies_vs_ifc.py) on a cut of the four roofs from rvt-rs's export and Revit's local IFC4: volumes -0.0019%, +0.0029%, -0.0007% and -0.103%, farthest vertex of Revit's body 0.000222, 0.0000267, 0.00000843 and 0.000358 ft (4 of 4 within 0.001 ft).tools/check-local.sh: not run locally (no local builds here); CI builds and tests itVerified end to end on real Revit files: the runs above, read against the rows registered on Snowdon Towers Architectural: 6 roofs stay level blocks, 33% to 133% above Revit's volume, each with one decoder diagnostic (4 ruled-surface, 1 shared curved edge, 1 multi-loop cylinder) #1683
IFC output: 124 of 126
ifc.sha256equal; the two that move are named aboveAudit-honesty checklist
changelog.d/changed/FaceGridandface_gridbecome public inrvt::researchLegal and contribution hygiene
Breaking changes
None.
Related issues
Closes #1683: its done-when asked for each of the six roofs drawn from its saved mesh and within 1% of Revit's volume, by a rule that moves no other element's export. Four are, at 0.11% or less; the two others are named with their diagnostics and have their own issue (#1706); and the rule moves the 43 footings of Structural, which the wording did not foresee and which the VIM export scores (above). Follow-up: #1706.