Repository navigation
fix(ci): the mcp answers rooms check counts what each room that differs differs in (#1443) - #1453
Merged
Merged
Conversation
…rs differs in (#1443) A model kept as counts only (racadv-*) reports a FAIL of the rooms check with no way to tell the cause: the difference text is dropped by the scrub. The check now prints, as fixed words and numbers, how many rooms differ, their space kinds, whether their outline has an arc, and how many differ in each thing a room is checked on. The check itself is unchanged.
… so a curved Area is no longer read as an area of zero (#1443) The scorer's ring_area returned 0.0 for any outline that is not an IfcPolyline. The writer writes an Area drawn from Revit's plan topology with an arc (RE-333) as an IfcArbitraryClosedProfileDef over an IfcIndexedPolyCurve, so that Area read as an outline of area zero against the server's exact area. Measure 42056263115 (head 8a2da9e, code dd3dc11) shows it on all six racadv saves: 116 spaces, 25 of space kind area, 1 with an arc, 1 that differs, in the outline reading as zero. ring_area now reads polylines and indexed poly curves of lines and three-point arcs, an arc counted as itself, and returns None for a curve it cannot read, which the check reports as no plan outline instead of as zero.
DrunkOnJava
marked this pull request as ready for review
November 5, 2026 16:00
DrunkOnJava
enabled auto-merge (squash)
November 5, 2026 16:11
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
The
roomscheck oftools/re/mcp_answers_vs_ifc.pyread FAIL with 1 difference of 116 on each of the sixrac_advancedsaves of 2015 to 2020. The cause is the scorer: itsring_areareturned 0.0 for any outline that is not anIfcPolyline, and the writer writes a curved Area as anIfcIndexedPolyCurvewith arcs. It now reads arcs as arcs. The rooms check also prints, as counts, what each room that differs differs in.Motivation
#1443. The check compares
list_roomswith the run's ownrvt-rs.ifc, not with the IFC2X3 export, so that pairing does not produce the difference. Theracadv-*models are kept as counts only, so the scrub dropped the difference text and the run named no cause.Measure 42056263115 (scorers from
8a2da9ef, codedd3dc116,-f racadv=true -f models="racadv-*" -f scorers=mcp_answers_vs_ifc), identical on all six saves: 116 spaces, of space kind room 91 and area 25; 1 with an arc in its outline; 1 differing, of space kind area, with an arc, in "an outline of the IFC that reads an area of zero". Nothing else differs on any save. The same run's oracle lines pair all 116 spaces by GlobalId with an area within 0.1% of Revit's export, so the server's area for that Area was right and the scorer's reading of the IFC was wrong.Changes
tools/re/mcp_answers_vs_ifc.py:ring_areareads anIfcPolylineor anIfcIndexedPolyCurve(lines, three-point arcs, or no segments), counts each arc as itself (the signed circular segmentr^2 (sweep - sin sweep) / 2), and returnsNonefor a curve it cannot read or an arc through collinear points.profile_areathen reports no plan outline instead of an area of zero.check_roomsrecords a cause for each difference and prints count lines of fixed words, only where above zero.docs/maintaining.md: one paragraph on those lines.mcp answers:line; no change there. No exporter, MCP tool or contract change, sodocs/mcp-tools.*is untouched.Testing
Unit tests are banned in this repository: none added.
tools/check-local.sh: N/A, a Python scorer (python3 -m py_compilepasses)8a2da9ef(above).5188641a, codedd3dc116,-f racadv=true -f nordic=true -f r2025=true -f scorers=mcp_answers_vs_ifc, 40 models):rooms: 116 compared, 0 differandconsistency PASS: every check equalonracadv-2015toracadv-2020, each with 1 room whose outline has an arc (the Area above). The other 34 models also read PASS, with 1,469 spaces compared in all and no room whose outline has an arc, so the change to the arc reading does not touch their results.ring_areachecked on synthetic outlines against an independent measurement (every arc cut into 20,000 chords and read by shapely), within 1e-3 relative: an arc bulging out and in, a clockwise ring, two half arcs, a three-quarter arc closed by a chord, an unwritten closing edge, no segments, a repeated first point, a polyline, an arc in a hole; a collinear arc and a composite curve returnNone. Run in scratch, not committed.rac_advanced, which noracadvmodel covers; the merge ofmainatbe595556(Rust code of fix(saved-graphics): the pass frees an owner's graph with its batch, so the walls that embed a curtain wall stop raising the export's peak (#1429) #1441, which this scorer-only change does not touch) was not re-run.Audit-honesty checklist
Breaking changes
None.
Related issues
Closes #1443
Both done-when items are met: the one space is named by its count and cause from Measure 42056263115 (space kind area, an arc in its outline, the IFC outline read as an area of zero, on each of the six saves), and the MCP answer and the IFC agree on all six saves in Measure 42058378119. The IFC2X3 export has no part in it: the check compares with the run's own export, so there is no fact about that pairing to count apart.