Repository navigation
fix(ifc): on Revit 2025 a wall under a roof drawn from its slopes is cut along the roof's underside (#1478) - #1967
Merged
Merged
Conversation
…cut along the roof's underside (#1478)
Merged
2 tasks done
…esh gives, the record's, as Revit writes it (#1478)
…wall-tops # Conflicts: # src/research/partition_schema_mvp.rs # src/research/partition_schema_mvp/fields.rs
…o, the saves the same-project gate holds to 2025's (#1478)
…wall-tops # Conflicts: # src/ifc/export_content.rs # src/ifc/export_content/wall_tops.rs
Owner
Author
|
Measure 43555026485 on the merged head
The merge of main changed nothing this PR measures. It stays a draft until the 0.23.0 tag is out, then goes ready for review. |
…ns on Revit 2025 to 2027, 2026 and 2027 held to the 2025 save (#1478)
DrunkOnJava
marked this pull request as ready for review
November 14, 2026 06:04
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
On Revit 2025 to 2027, a wall that no level underside cuts, whose top join names one roof and nothing else, and whose roof is drawn from its slopes as one solid of faces, is now cut along that roof's underside. Each convex piece of its plan, cut by the plan of each roof face that looks down, rises to that face's plane, one item each. Before, these walls stood level at their record top, through the roof.
What each export gains, on 25
IfcWallin 17 Revit 2025 models (the R2025 roof models02_1Slopeto17_Rooms_Stairs_Spiral) and onrac_basic's 2025, 2026 and 2027 saves (no Revit export):IfcWallbodyextrusiontosolid);RvtElementRecordGeometry.BodyHeightSourceand the trust markerBodyHeightSourcereadwall_top_cut_along_sloped_roof;RvtElementRecordGeometry.TopCoverElementIdnames the roof that cuts the wall: 2901 on 12 walls, 3823 on 11 (the L-shaped hips), 3546 on 2 (the gables);provenance.value_sourcesgains two rows per wall, the inputs the cut read: the roof's element record (partswith the roof'selement_id, 2901, 3546 or 3823, and itsPartitionsstream) and the wall's own native record (readernative_wall,rulenative).No other class, property or quantity changes. The wall's
Qto_WallBaseQuantitieskeep their values.Motivation
#1478, measured first: on puzzbobb's Revit 2025 models (Measure 43542785440,
wall_top_cover_vs_ifc), wall 2892 is 355 plan points too tall on 17 models (11.53 ft² of full height each), and 5 or 6 of the 7 walls are too tall on the L-shaped hips (48.27 and 59.80 ft²). Revit's top follows the roof's underside, as polygonal face sets. Everypairline shows rvt-rs's roof underside equal to Revit's over each wall's plan ("varies 13.1684..19.4729 in 71 runs" on both sides), so the surface to cut at is the one rvt-rs already writes.Changes
src/ifc/export_content/wall_tops.rs:sloped_top_solid: the roof'sFacetedBrepfaces that look down (outward normals,Meshwinds counter-clockwise from outside), each as its plan triangle and plane; the wall's plan cut into convex pieces, each clipped by each triangle (clip_convex), and each part a solidbetween_surfaces_meshfrom the wall's base to the face's plane;COVER_TOLERANCE_SQUARE_FEET) and every vertex's underside lies above the base and at or below the wall's top (UNDERSIDE_TOLERANCE_FEET);cut_wall_topsapplies it to the wallsdecideleft uncut, withBodyHeightSourcewall_top_cut_along_sloped_roofandTopCoverElementId;base_cut_left_under_a_sloped_top, so a base cut does not redraw it to its own top;partition_schema_mvp.rsandfields.rs: roofs onSLOPED_ROOF_WALL_TOP_REVIT_VERSIONS(2025 to 2027: 2025 is measured against Revit's own exports of puzzbobb's 20 models, Measure 43542785440; 2026 and 2027 have no Revit export with such a wall and are held to the same project's 2025 save by the same-project gate) carryROOF_CUTS_WALL_TOPS_FIELD;export_content.rscollects them and passes them to the top pass.wall_cut_openings.rs: an opening voids every piece of such a wall, as of a stepped one.element_provenance.rs,tests/value_sources_offsets.rsanddocs/export-diagnostics.mdregister the new source.Testing
Measure 43544122324, unfiltered against
main, with nordic, r2025, samples and holdout. Registered before it runs:wall_top_cover_vs_ifc's walls under a sloped roof become equal over the plan (summarytaller0), and no wall becomes lower.Only Revit 2025 files' exports move: the R2025 models and any 2025 sample with a wall under a sloped roof. Every 2024, 2026 and 2027 export is byte for byteAs it turned out: the gate was widened to 2026 and 2027 before the Result run, so the Revit 2025 roof models andmain's.rac_basic's 2025, 2026 and 2027 saves move; every 2024 export is byte for bytemain's, and the 2026 and 2027 saves are held to the 2025 save by the same-project gate (run 43547699441).same-project gates: a 2025 sample that moves is checked against its 2024 and 2026 saves, which this change leaves as they are. If the gate reads that as a difference, the result goes on the PR, not a widened gate.If a wall comes out lower than Revit's, or the faces do not cover the plan once on any of the 20, the rule is narrowed before this leaves draft.
tools/check-local.sh: no local builds;rustfmt --checkpasses; CI runs the rest.Result
Measure 43551765959 (head
0232f664against mainfaec9c51, unfiltered with nordic, r2025, samples and holdout): 20 of 120 exports move, and only these 20. They are the 17 Revit 2025 roof models whose walls stand under a sloped roof (02_1Slopeto17_Rooms_Stairs_Spiral, less02_..._Overhang,03_2Slopeand the models with no sloped roof), andrac_basic's 2025, 2026 and 2027 saves. Diagnostics are 102 of 102 equal. Noqtos_vs_ifcorpsets_vs_ifcrow moves on any model: the wallHeightkeeps its value through the cut. The one scorer line that moves isschema.txt's count of swept solids placed apart from their product, which drops on each moved model (on Gable from 5 to 4) as the cut walls stop being plain extrusions. The same-project gates pass, holdingrac_basic's 2026 and 2027 saves to its 2025 save.What the walls do against Revit's,
wall_top_cover_vs_ifcon the 20 (Measure 43554259332, same head and base):Every one of the 17 moved Revit 2025 models goes to every wall equal over its plan, 10,465 taller points to 0 (for example
08_LShapedHipRooffrom 2 of 7 walls to 7 of 7,09and10from 1 of 7 to 7 of 7). No point is lower than Revit's on either side. The 705 left are one wall each on02_1Slope_Rafter2SquareCut_Overhang(350) and03_2Slope_Rafter2SquareCut(355), whose exports this PR does not move, and they stay on #1478.rac_basic's saves have no Revit export to score.After #1974 landed, main was merged in (
1e8829f9):plate_roofsis now keyed on the Roof record andsloped_roofssits beside it, and a sloped roof still gives no level cut. Its Measure is 43555026485.Audit-honesty checklist
rac_basic's 2025 save by the same-project gate.rac_basichas no Revit export on any release.Legal and contribution hygiene
Part of #1478.