Repository navigation
fix(re): the frame fit and the fine rows choose their elements by the smallest CRC-32 of their Tag, through one shared function, not an even stride by Tag (#2114) - #2123
Merged
Conversation
… smallest CRC-32 of their Tag, through one shared function, not an even stride by Tag (#2114)
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 frame fit (
frames_vs_ifc.py) and thefinerows ofsaved_meshes_vs_ifc.pynow choose their elements by the smallest CRC-32 of their Tag, as the body scorers have since #2119. Before, they took an even stride over the sorted Tags, which could move every chosen element when one was added or removed (#2114).The choice now lives in one shared function,
ifc_common.tag_sample.mesh_bodies_vs_ifc.class_samplecalls it, with the same result as before.On identical exports of 42 models (
ifc.sha256anddiagnostics.jsonunchanged: only the scorers changed), scored by this branch and bymain:mesh_bodies_vs_ifc's output is identical on every model;frames_vs_ifcmoves on the 9 models with more than 200 common elements. Each now compares 200 elements, where the stride took 139 to 192. The fit lines move. The residual after Revit's site placement alone stays at median 0.0000 on all 35 models that print it, and its maximum moves on 5: up on the two concrete housing files (4.09 to 4.16 m) and the office permit (0.228 to 0.246 m), down on both timber office files (0.9075 to 0.2175 m). The maximum is still over a sample of 200;finerows move on the 10 BIM4LCA files where a class has more than 300 paired elements. Each such class now scores 300, where the stride took 170 to 296. Every element added is within 0.001 ft, like those before it. Nothing outside thefinerows moves.Motivation
Closes #2114. #2118 tested every vertex of a scored body, #2119 chose a large class's bodies by CRC-32, and #2122 tested every point of a fitting's faces. A search of
tools/refor[::slices, first-N cuts,_CAP,SAMPLE,LIMITandMAX_constants and steppedrange(loops found these two strides as the last ones that choose what is scored. What else it found:LISTED,SHOW,LIST_LIMIT), which shorten printed listings, not counts;wall_top_cover_vs_ifc.py's stations, set by a wall's length;range(loops inmesh_bodies_vs_ifc.py, which cut the work into chunks and reach every item.Changes
tools/re/ifc_common.py:tag_sample(tags, cap), moved frommesh_bodies_vs_ifc.class_samplewith its docstring generalised.tools/re/mesh_bodies_vs_ifc.py:class_samplecallstag_sample;saved_mesh_status_vs_ifc.py's import of it is unchanged.tools/re/frames_vs_ifc.py: the 200 centres come fromtag_sample; the docstring says how they are chosen.tools/re/saved_meshes_vs_ifc.py: thefinerows' 300 per class come fromtag_sample; both docstrings say so.Testing
Unit tests are banned in this repository: do not add them.
main's code (339ee7fc),nordic,r2025,fine_mesh=true,scorers="frames_vs_ifc saved_meshes_vs_ifc mesh_bodies_vs_ifc": 44869977616 with this branch's scorers (e1bd4b09), 44869990078 withmain's. No step on either side came from the score cache, whose key covers each scorer and every module it imports.ifc.sha256on both runs.mesh_bodies_vs_ifc: identical on all 41 models it scores,finerows included.frames_vs_ifc: header lines and "elements tagged in both" identical everywhere; the whole output identical on models with 200 or fewer.saved_meshes_vs_ifc: everything before thefinerows identical everywhere. Only classes over 300 move, and each to 300, every element within 0.001 ft:IfcMemberon all 10 files (178 to 296 before), andIfcColumnon the two timber office files (172 and 170). "Sampled elements meshed" rises with them (for example 686 → 808 on the concrete housing as built).saved_meshes_vs_ifcstep on the office as built 316 → 476 s, on the timber office as built 459 → 308 s), so no cost is measured.finerows print only withfine_mesh=true.python3 -m py_compileon the five files. No Rust changes.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
class_samplekeeps its name and its result.Review: rvtReview, the maintainer session, wrote this change. As rvtDevelop is not running, it re-reads the diff and approves the change itself on a green head (Griffin, 2026-11-12).