Repository navigation
Description
State as of PR #1608 (RE-380; the comments keep the working). Revit's wall-profile openings are the pockets of the profile against its convex hull. RE-151's rule (elevation_profile_cuts, "each run of lines leaving the profile's bounding rectangle cuts the region between it and the rectangle's edge") matches Revit's export on one wall of the five Revit 2024 files and writes an opening Revit does not write on ten.
Runs. 42614629885 (all models, #1604's code against b969296e), 42616460564 and 42618842627 (the scorer prints each opening's mesh corners; commits c9de5fb8 and 4ccce43d), 42619901187 and 42635378158 (probe_1607_wall_profile_lines, commit 80808447, which prints every wall's sketch lines with their ElementIds and ends: the five Revit 2024 files, and Autodesk's 2024 sample projects). The commits are archived under refs/archive/2026-11-09/cited/.
The rule, wall by wall. A wall's loop is its sketch lines in its vertical plane; its pockets are the stretches of the loop between two hull corners that the hull edge cuts off. A pocket is closed by the hull edge where one end of the edge stands off the loop's bounding rectangle (terrain 1387731: four corners; 7 of the 15 pockets Revit exports), or through the rectangle's corner where the edge's ends stand on two adjacent sides, neither at a corner (Core Interior's 55840: nine points, 301.65 ft2, where the stretch and the edge hold 71.23; 8 of the 15). The opening's Tag is the first line of the stretch in the loop's counter-clockwise walk on 12 of the 15 pockets, and the last line on the 3 of one Snowdon wall.
| File | Walls with sketch lines | Pockets | Revit's export |
|---|---|---|---|
| Core Interior | 2 (55840, 34362) | 2 | 55840: opening Tag 55859, nine points; 34362: a wall neither export holds |
| BIM4LCA terrain | 2 (1351524, 1387731) | 1 (1387731) | opening Tag 1389018, the same four corners |
| BIM4LCA office, as built and at permit | 14 | none | no opening on any of them |
| Snowdon Towers Architectural (local only) | 9 | 13 on 7 walls | those 13 openings and no other; none on the other 2 walls |
None of Revit's 30 (as built) and 24 (at permit) openings of no cutter in an office wall is on a wall with sketch lines; they are RE-321's rectangular openings. So the pocket rule predicts an opening on 10 of the 27 walls with sketch lines (16 pockets) and none on the other 17; Revit's export holds exactly the 15 pockets it can and none on the 17. Of the other Revit 2024 files in the corpus, Autodesk's sample projects rac_basic, rme_advanced and rme_basic hold 10 more pockets (three of them notches) with no Revit export to measure; no pocket of any file has a hull edge that ends otherwise.
What the first builds got wrong (2026-11-09). The first #1608 commit closed every pocket by its hull edge, because the scorer's corners and boxes were the same for 55840 either way; the test of #227 (tests/wall_profile_openings.rs) reads the opening's area and failed (71.233 ft2 against Revit's 301.649). unfilled_openings_vs_ifc now compares the opening's volume. The second design cut every region in the wall's body and also wrote the pockets as openings, and the Tag was the highest id of the stretch; Snowdon Towers showed that IfcOpenShell evaluates the body of wall 698311, cut and with an opening on the cut, as the uncut box, and that the highest id is right on 6 of the 15 (the first line on 12, the lowest id on 8). A region a pocket equals is now the pocket (the wall keeps its box); any other region is cut in the body.
The Tag's residual. On Snowdon's wall 698364, Revit names the last line of each of its three stretches, and the first-line rule writes another line: those 3 openings do not pair in unfilled_openings_vs_ifc (3 extras and 3 missing, on a file no gate has). Checked and the same on all 13 Snowdon openings: the extrusion direction against the wall's y, the polygon's winding in the wall's frame, the profile axis against the wall's x. Revit's polygon starts at the end of the stretch beside the line it names; what fixes that end is not read.
Why it is Revit's rule is not read from its source: the exporter's AddClippingsToBaseExtrusion and the extrusion calculator it uses are in RevitAPIIFC, closed. The open-source WallExporter.cs (TryToCreateAsExtrusion, ExportWall) shows the shape of it: the wall is a footprint extrusion with clippings, and the openings that call returns ("cut pairs") are written by OpeningUtil.CreateOpeningsIfNecessary. Read that way, the hull's sloped edges are the clip planes (they run on to the wall's end, which is what #1473 sees as Revit keeping the slope past the profile's end) and a pocket is what no plane can cut. That is a reading of measured walls.
Not measured: a pocket on a wall outside Revit 2024; arcs in a profile (RE-151 leaves a sketch with an arc alone); a notch against Revit's export (the notch writes the polygon RE-151 wrote); a cut body with an opening that overlaps the cut other than the one case avoided.
Done when: rvt-rs writes the profile openings Revit writes, with Revit's host and polygon within 0.01 ft, on the files with Revit's export, and none Revit does not, by pockets against the convex hull, with the rest of the profile's cut in the body in a way that is not an opening, and the walls' tops, heights and volumes still Revit's on all 1,560; or a measured negative says where the pocket rule fails. #1608 does this; the Tag of one wall's three openings is the measured negative.
Activity
DrunkOnJava commentedon Nov 9, 2026
The shapes of the other openings, from run 42618842627 (
mainatf0842b30; the scorer prints the mesh corners of every opening of no cutter in a wall):So on the nine walls where rvt-rs's opening is a plain cut above a sloped top (the office's eight and 1351524) Revit's export has none, while the two openings of Revit's on a profile-edited wall (Core Interior's 55840, and the first three lines of 1387731's top) are something other than a plain slope. That is a reading of the measurements, not a rule.
DrunkOnJava commentedon Nov 9, 2026
A reading that fits the terrain walls corner for corner: Revit's openings on a profile-edited wall are the pockets of the profile against its convex hull, not the regions between a run of lines and the bounding rectangle.
In Autodesk's open-source exporter (
WallExporter.cs,TryToCreateAsExtrusionandExportWall) a wall is built as an extrusion of its footprint with clippings, and the native callAddClippingsToBaseExtrusionhands back the "cut pair" openings thatOpeningUtil.CreateOpeningsIfNecessarywrites; the rule inside that call is not in the open source, so the hull reading is a measurement, not something read. It would also say why Revit's body here is the profile with no opening for a plain slope: the clipping planes are the hull's sloped edges, and only what the planes cannot cut (a pocket) becomes an opening.What this changes in #1607's plan: RE-151's rule takes the region between a run and the rectangle; the pocket rule takes the region between a hull edge and the lines that leave it, which agree where the hull edge is the rectangle's (Core Interior) and part where it is a slope. The wall's body would be the hull (the box clipped at its sloped hull edges), with one opening per pocket.
DrunkOnJava commentedon Nov 9, 2026
The probe in run 42619901187 (
probe_1607_wall_profile_lines,mainatf0842b30plus the probe) prints the sketch lines of every wall that lists any, with their ElementIds and ends, on the five Revit 2024 files with Revit's export. Computing each wall's loop, its convex hull and the pockets of the loop against the hull gives, wall by wall:RE-151's rule (a run of lines leaving the bounding rectangle) gives the same region as the hull on Core Interior's two walls, where the hull edge is the rectangle's top, and a region Revit does not write on 13 others: 1387731 (Tag 1389150 against Revit's 1389018), 1351524 and 11 of the office's 14 walls. rvt-rs writes an opening for the two terrain walls and the office's eight; the runs of the other three office walls are not written, for a reason I did not check. The pocket rule is right, in Tag and in corners, on both walls where Revit writes an opening that can be set against it (55840 and 1387731) and on all 15 walls where Revit writes none (1351524 and the office's 14: none of Revit's 30 and 24 openings of no cutter sits on one of them). It is wrong only on Core Interior's 34362, which has 55840's shape and no opening in Revit's export; rvt-rs writes none for it either, so the wall is probably not exported (not checked).
Two readings of why this is Revit's rule, neither read from its source (the extrusion calculator the open-source exporter calls is in
RevitAPIIFC): the exporter clips the footprint extrusion at the planes of the profile's hull edges, so a pocket is what no plane can cut, and the wall's body in Revit's export is the profile because the clip planes run on to the wall's ends (which is what #1473 sees as the sloped top that Revit keeps sloping past the profile's end).What this asks of rvt-rs. Writing an opening per pocket, tagged by the highest line id, equals Revit's on every wall above. The wall's body then needs the hull's sloped edges as clips, since the box less the pockets alone is the hull's bounding rectangle, not the hull: today the cuts between the hull and the rectangle are written as openings too, and those are the openings of rvt-rs's that Revit does not write (the office's eight and the terrain's two, the last with the pocket merged into it).
research(measure): a throwaway scorer of how each file writes the bod…
[-]Wall profile openings: rvt-rs writes one on 10 walls of the office and terrain files where Revit's export writes none or another, and matches Revit only on Core Interior's wall 55840 (RE-151, follow-up of #1600)[/-][+]Wall profile openings: Revit writes the pockets of a profile against its convex hull; RE-151's rectangle rule writes openings Revit does not on 10 walls and misses wall 1387731's (follow-up of #1600)[/+]fix(ifc): a profile-edited wall whose profile closes below its record…
fix(ifc): a wall's edited elevation profile is cut in its body, and i…
fix(ifc): a profile pocket is closed through the profile rectangle's …
fix(ifc): a wall's profile cut and its top at the profile's highest p…
chore(witness): Core Interior's rvt-rs observations count wall 55840'…
fix(ifc): a wall's edited elevation profile is cut in its body, and i…
fix(ifc): a profile pocket is closed through the profile rectangle's …
fix(ifc): a wall's profile cut and its top at the profile's highest p…
chore(witness): Core Interior's rvt-rs observations count wall 55840'…
fix(ifc): a region a pocket equals is not cut in the wall's body, and…
docs(re): RE-380 section 4 holds the checks of the CI-built head on C…
fix(ifc): a wall's edited elevation profile is cut in its body, and i…
feat(ifc): a wall's profile opening carries its wall's type name as R…