Repository navigation
fix(ifc): a floor sketch opening that is not a rectangle carries its Area where its outline is square-cornered (#1016) - #1786
Merged
Conversation
…t computes (RE-247)
…nd none different (#1016)
…n axis its Span and Length (#1016)
…ingElementBaseQuantities.Depth (#1165)
…t too (#1165) Read on Revit's export of the BIM4LCA office as built: on the four such openings read, Width, Height and Depth are 100/2100/810 and 300/2100/1210 mm, the same way round as on any rectangular opening. Height is the outline's (2.1000 m on all four). Width is left out: the outline along the wall is 0.1000 and 0.3002 m, 0.2 mm off Revit's on two of the four.
…tities.Perimeter (#1208)
… gets no Perimeter (#1208) A sketch arc reaches the outline as chords within 0.0005 ft of it, so the polygon's length is short of the arc's by about a third of sagitta over radius, which the measurement would read as different wherever arcs are more than a small share of the loop. No corner between two chords is square, so an outline whose corners are all right angles holds no arc. Found by the second read; no measured roof has an arc.
…gle gets no Area (#1016) Revit takes the area from the sketch's curves; an arc reaches the outline as chords within 0.0005 ft of it, so its polygon is short of that area by more than the measurement's tolerance on a small radius. No corner between two chords is square, so only an outline whose corners are all right angles is written. Found by the second read: the measured outlines hold no arc, and the unscored ones (Core Interior's 20, Snowdon Towers' 12) are not known to.
7 tasks done
…ur square corners, counted without straight joints (#1016) The outline's raw point count let a rectangle one of whose edges is two sketch lines through (five points, four corners), and whether Revit calls that loop a rectangle is not measured. The helper now returns the number of square corners, or none where a corner is not square, and the opening's Area is written above four; a roof's Perimeter needs four. The helper is pure and has seven tests of the ways it can fail: an arc of chords, a slanted edge, a spike, a split edge, repeated points, a turned or reversed outline, and no outline. Found by the second read.
DrunkOnJava
marked this pull request as ready for review
November 11, 2026 21:40
…ng-area-2 # Conflicts: # docs/evidence.md # docs/supported-profile.md # src/ifc/export_content.rs
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
Qto_OpeningElementBaseQuantities.Areais now written on an opening a floor's sketch makes where its outline is not a rectangle, and on no other unfilled opening. On the BIM4LCA office as built that is the 5 openings the census lists as missing, and the 31 rectangular sketch openings, on which Revit's export writes noArea, keep none.Evidence
The census (
evidence/nordic-office-as-built/qtos_vs_ifc.txt):Qto_OpeningElementBaseQuantities.Area: 5, equal 0, different 0, missing 5(line 42), all onIfcOpeningElementx5 (line 123); 3 more on openings rvt-rs does not write (line 7) and 1 on a repeated key (line 78).Matching the two files of the office by Tag, the 5 are the same five objects: 3190490, 3143563, 3146720, 3147725, 3151525, all named
Floor:VP-1:418397in both files, each an opening of a floor's sketch (RE-151) that rvt-rs already writes, with its box and itsReferencevalues equal.IFCQUANTITYAREA, theAreais the area of the polygon the opening's body extrudes: e.g. 3.4096666 m2 for opening 3190490, whose profile is a 890 x 3890 mm rectangle less a 230 x 230 mm notch (3.409662 m2 from rvt-rs's own outline, read in its file's metres), and 9.634416 m2 for 3146720 against 9.634423 m2 from that outline. The same holds for the four roof hatch openings (tag 2991742), the two wall profile openings (1671974) and the door opening that cuts two walls (1623922), which this change does not touch.WidthandHeightand noArea. Nothing else separates them: the 5 sit in five different floors (1384047, 1451421, 1457693, 1457785, 1474132) among openings of the same name, the same kind and the same depth.Floor:VP-2,Floor:AP-1,Floor:VP-1.OL,Floor:VP-1.KL), all 5-point rectangles, and its census misses noAreaat all: the rule adds nothing there.IfcEntity::VoidOpening, not a face-hosted cut) whose outline has more than four corners, writeArea, the outline's shoelace area in square feet, as the wall profile opening'sAreais written (RE-381). Read from evidence: 5 of 5 equal on the model measured, none on the 31 Revit gives none.Areavalues rvt-rs writes on the timber office where Revit writesWidthandHeightinstead (RE-402) — that is the wall profile opening's rule, not this one.--no-base-quantities. The value is written only where rvt-rs writes base quantities at all, the gate a door opening'sDepthand a wall profile opening'sAreahave (RE-242): with the flag everyQto_set is empty and no opening quantity is written.Changes
src/ifc/step_writer.rs: in the loop that writes an opening of a floor's sketch, a boolean of whether anyQto_set still holds quantities, and, on such an opening whose outline has more than four corners, itsAreaasIfcQuantityArea, the outline's area (the shoelace expression the wall profile opening'sAreaalready uses).docs/supported-profile.md,docs/evidence.md: the two sentences that list the openings' base quantities now say the floor sketch opening'sAreais written.changelog.d/fixed/40-floor-void-opening-area.md.Measured
One Measure run scored this change together with nine others it was drafted beside (run 43086493417, head
f5f54467, base5e3ac5b0: every model, with the BIM4LCA office and housing, the Revit 2025 models, Autodesk's samples of every release, rac_advanced, BIMcollab and the held-out pairs; every shard and both same-project gates passed; rows registered on #1636 before it was read). Each change writes a value of a different name, so the rows below are this change's alone. Both sides' exports were kept, and the 58 sample saves, which no Revit export scores, were compared value by value. After the second read the stack was rebuilt onmainas seven changes (the pipe change left it, and the roof and floor-opening rules were narrowed to square-cornered outlines) and measured once more in full (run 43100937918, head53c19487againste8a99d03, rows registered first, read on #1636): all shards and both same-project gates pass, "different" and "values Revit does not write" are unchanged on every model, and the rows below repeat except where a line says otherwise.Qto_OpeningElementBaseQuantities.Areaequal, beforeAreasets on floor sketch openings that are not rectangles, which no Revit value scores (its export writes no base quantities); after it none is written there.Areais written only where the outline has more than four square corners, counted without the joints it runs straight through, so a rectangle one of whose edges is two sketch lines (five points, four corners) is left out: whether Revit calls that loop a rectangle is not measured. The helper that counts them is pure and has seven tests of the ways it can fail.Still open
Area(Revit's export writes itsWidthandHeightthere), and a four-cornered outline that is not a rectangle is left out as unmeasured.Stack: this is change 7 of 7; each branch holds the ones before it, so its own diff is its last commits until those land. First draft: #1758, then #1780.
Testing
gh workflow run measure.yml --ref main -f ref=<this head> -f base=e8a99d03be8a76a2c8871ea8cc28d036653ec6e2 -f nordic=true -f r2025=true -f samples=true -f racadv=true -f bimcollab=true -f holdout=true.mainhas moved since those runs: the eight batch changes before this one landed, with perf(research): 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, and the triangles of 25 of 126 exports fall (#1737) (RE-437) #1769, fix(ifc): an oblique mullion at an end no longer leaves its mullion out, a partner end beside one or a mullion across inside is kept, and a joint centred under a mullion across is hidden: the offices gain 107 to 108 NetSurfaceArea values and 3 of the 4 different at permit are Revit's (#1767) (RE-438) #1771, fix(ifc): the mesh path writes the NetSurfaceArea of a mullion whose partner end the boxes keep, and the offices gain 34 and 33 values equal to Revit's (#1790) (RE-439) #1791 and others. This head,422e9432, ismainat000fc1afmerged in. The merge resolved one conflict insrc/ifc/export_content.rs, where this pull request's own commits rewrite the corner helper feat(ifc): a flat roof written as a slab carries its Qto_SlabBaseQuantities.Perimeter where its outline is square-cornered (#1208) #1785 added, by taking this branch's side; the resolvedexport_content.rsandstep_writer.rsare byte-equal to the files Measure 43108424934 measured at3f2a04c4, and the change againstmainis this pull request's own three commits (byte-equal outsidedocs/, word-equal inside).main, with kept exports: run 43133784518, rows registered on List the shipped rules that rest on one project, and the second model that could test each #1636 before it is read. Its same-project verdict and the advisory semantic verdict land on this head.main) the only sample saves that gain this value are the two Snowdon Towers 2024 saves, Architectural 10 and Structural 2 openings, with no existing value changed or removed. Revit's own IFC4 export of the architectural file was made without base quantities, so those 12Areavalues are written where no Revit export can check them.Audit-honesty checklist
changelog.d/Legal and contribution hygiene
Breaking changes
None.