Repository navigation
Description
What
RE-447 (#1822) followed one kind of failure: an exact-size threshold, 1e-9 or smaller in feet or square feet, deciding a geometric question on coordinates a wall's or sketch's line can drift by about 5e-8 ft. There it was wall_centreline_body's 1e-9 axis tests and door_symbol_flipped's 1e-9 side test (#1811). An audit of the rest of the export for the same class found the sites below. Each line was read on main at 97397b9. None of the consequences is measured yet.
| # | Site | Threshold | What it decides | If noise lands on the wrong side |
|---|---|---|---|---|
| 1 | src/ifc/export_content.rs:6521, :6559 |
turn(i) < -1e-9, sine of a ring vertex's turn |
which roof-sketch vertices are reflex; arrow_roof_hip_ambiguous |
a straight-through vertex sits at the threshold. The roof loses its slope-arrow body and keeps its record box |
| 2 | src/ifc/export_content.rs:3809, :3834 |
STRAIGHT = 1e-9, scaled sine |
whether an outline vertex is a straight joint; square_corner_count |
a spurious opening Area quantity (step_writer.rs:3733), or an outline length dropped (:3787) |
| 3 | src/ifc/export_content/wall_tops.rs:394 |
side_of(..) >= -1e-9 in ft², unscaled |
whether a wall's plan ring is convex | a collinear vertex at about 1e-6 ft² either sign. The wall's stepped top is not drawn. The neighbouring tidy (:380) uses a scaled tolerance |
| 4 | src/ifc/export_content/wall_tops.rs:173 |
PIECE_ROUNDING_SQUARE_FEET = 1e-9 ft² |
whether a sliver is a piece; whether two pieces overlap | slivers of about 1e-6 ft² kept as pieces |
| 5 | src/ifc/body_geometry.rs:1009 |
cross.abs() <= 1e-12 in without_spikes |
whether an outline vertex is a spike to drop | it practically never fires at 1e-6 ft² noise. The spikes it exists to remove stay |
| 6 | src/ifc/step_writer.rs:1312, :1431 |
> 1e-9 metres |
whether a ring is already closed | a repeated closing point is written or not |
| 7 | src/research/native_area_regions.rs:974 |
scaled sine <= 1e-12 |
whether an Area boundary vertex is a straight continuation | an extra collinear vertex in the written boundary |
| 8 | src/research/element_record_plan_profiles.rs:970 |
COLLINEAR_EPS = 1e-9, scaled |
whether a plan-profile vertex is merged | an extra profile vertex |
| 9 | src/research/native_saved_mesh.rs:541 |
1e-9 in parameter units |
whether a refined sample is inside a cylinder's envelope | a vertex kept or dropped at the envelope's corner |
| 10 | src/research/partition_column_nodes.rs:100, :136 |
plan_equal(.., 1e-9) |
whether a column's geometry-node boxes agree | fails closed: the cut extents are not applied. The "same bits" claim (element_record_column_cuts.rs:68-73) is not shown for these boxes |
| 11 | src/ifc/body_geometry.rs:316 |
cross(..).abs() <= 1e-12 |
ear_clip's fallback when no ear can be cut |
the profile is not meshed |
The audit also lists about 35 nearby tests that hold, scaled or far from the noise. Among them are the other wall_centreline_body tests (along[1] is the same expression as uy), WALL_BOX_CLOSURE_FEET, the room side tests at ±1e-5 ft, and the stored-flag side decisions.
How to proceed
Measure before changing anything; RE-447 shows a tolerance moved alone only trades one wrong end for another. For each row, a probe over the Measure corpus should count:
- how often the tested value falls within 1e-6 of the threshold, in the unit the test uses;
- for those cases, whether the export's output differs from Revit's.
Then fix only the rows where the count is above zero and Revit's export shows the right answer, one row per PR. Each fix comes with its Measure, and with a scaled tolerance where a scale is available (as tidy and wall_profile.rs:708 have).
Done when
Every row is measured: a count of near-threshold cases on the corpus, and the export effect where the count is above zero. Every row with an effect is fixed or recorded as a measured negative.
Found by a Tendrils audit worker after RE-447; rows 2, 3, 5 and 6 were checked line by line on main by rvtDevelop, and the rest were quoted verbatim by the worker.
Activity
DrunkOnJava commentedon Nov 12, 2026
The first half of "How to proceed": a census of every row, with its rows registered before it runs.
Branch
research/1825-threshold-census, commit041bba20, ismain(ebab7376) plus one commit, and it is not meant to land.rvt::research::threshold_census::notereturns the value it is given. Each site below wraps the value its test already compares, so every test decides as before. The only exceptions are rows 9 and 10, which note a separately computed gap just before their unchanged test.probe_1825_threshold_censusturns the census on for one default export, writes the STEP to nothing so the writer's tests run too, and prints each site's values. Each value is bucketed by sign and by decade of magnitude:0,≤1e-12,≤1e-9,≤1e-8,≤1e-7,≤1e-6,>1e-6, NaN.Sites, at
041bba20:export_content.rs:6546,:6585turn(i), the sine of the turnexport_content.rs:3834cross / scalewall_tops.rs:404side_of(..), ft²wall_tops.rs:349, 359, 551, 569, 583, 1112, 1121, 1573, 1585, 2170areaoroverlapcompared withPIECE_ROUNDING_SQUARE_FEET, ft²body_geometry.rs:1018cross, ft²step_writer.rs:1312,:1434native_area_regions.rs:975element_record_plan_profiles.rs:971cross / scale, wherescale > 0native_saved_mesh.rs:562partition_column_nodes.rs:112,:149plan_equal(.., 1e-9)testsbody_geometry.rs:316cross(a, b, c)inear_clip's fallbackThere is one Measure run: base
main; the samples of every year, the BIM4LCA models (the housing included, where RE-447's drift was), the R2025 set,rac_advancedand the held-out models;scorers=none. Counts only.Rows:
ifc.sha256equalsmain's. That is what makes the countsmain's.DrunkOnJava commentedon Nov 12, 2026
Census run 43329336879 at
041bba20, read against the rows above (comment 6839015810). It counted 102 models, those whose results are published: the samples of every year, BIM4LCA and R2025. Counts only. (Corrected: an earlier version listed the held-out models andrac_advanced's IFC2X3 pair too. Those 24 were exported, and their hashes are in row 1, buttools/ci/scrub-holdout-results.shkeeps only the count lines it knows, so their census lines were dropped and their values are not in this table.)ifc.sha256and 102 of 102diagnostics.jsonequalmain's (ebab7376). The probe's export succeeded on all 102 models.ear_clip's fallback (row 11,body_geometry.rs:316) ran on none of the 102 models. It is not exercised, so it is not a measured negative.export_content.rs:6546,:6585export_content.rs:3834wall_tops.rs:404wall_tops.rs:349wall_tops.rs:359wall_tops.rs:551wall_tops.rs:569wall_tops.rs:1112wall_tops.rs:1121wall_tops.rs:583,:1573,:1585,:2170body_geometry.rs:1018step_writer.rs:1312,:1434native_area_regions.rs:975element_record_plan_profiles.rs:971native_saved_mesh.rs:562partition_column_nodes.rs:112,:149body_geometry.rs:316Exact zeros are left out of the count, as registered. They are the large share at the wall-top sites, for example 1,788 at
:349and 4,544 at:569, and 2,103 at row 8.What the buckets say beyond the rule:
partition_column_nodes.rs's module doc calls equal in x and y. They are not bit-equal: they agree to 1e-12. (An earlier version of this line pointed atelement_record_column_cuts.rs's "the same bits". That comment is about other records, which this census did not measure.)Next. Following "How to proceed": a probe per row for rows 4, 5, 7, 8 and 9, with row 10's short version. Each names the elements whose values sit in the band and compares the export's result for them with Revit's. Rows with no effect close as measured negatives; rows with one get a fix PR each.
The census branch is not meant to land. It stays as
research/1825-threshold-censusuntil this issue closes, then it is archived underrefs/archive/.DrunkOnJava commentedon Nov 13, 2026
Row 8's second half, registered before its run. Branch
research/1825-row8-collinear-1e-6,fd77d187, ismainwithelement_record_plan_profiles.rs'sCOLLINEAR_EPSat 1e-6 instead of 1e-9. It is a measurement and not meant to land.The constant has one use, the merge test at
:1001. The census put 198 values between 1e-9 and 1e-6 there, on the vertices the 1e-9 test keeps and a drift could merge.Run: unfiltered Measure of
fd77d187againstmain, every scorer, with the samples, BIM4LCA, R2025,rac_advancedand the held-out models.How it is read:
DrunkOnJava commentedon Nov 13, 2026
Rows 4, 5, 7 and 9's second half, registered before their runs. Each is one branch off
mainthat moves one threshold so that the census's near values (comment 6839299460) are decided the other way, and nothing else. They are measurements and not meant to land.research/1825-row4-piece-1e-6wall_tops.rsPIECE_ROUNDING_SQUARE_FEET1e-9 → 1e-6:349,:359,:551,:1112,:1121research/1825-row4-piece-1e-12:349,:359,:551research/1825-row5-collinear-1e-9body_geometry.rs's collinear-vertex test (:1009onmain) 1e-12 → 1e-9research/1825-row7-turn-1e-9native_area_regions.rs's straight-turn test (:974) 1e-12 → 1e-9, relativeresearch/1825-row9-envelope-1e-6native_saved_mesh.rswithin_envelope's margin 1e-9 → 1e-6PIECE_ROUNDING_SQUARE_FEETis one constant at all eleven row-4 sites. The four the census found with no near values (:583,:1573,:1585,:2170) move with it, which is what the constant would do under a drift.Not run, with the reason:
partition_column_nodes.rs's module doc, which calls the two boxes' x and y extents equal, is corrected to "equal to 1e-12" in the nextsrc/PR from this issue.Each run: unfiltered Measure of the variant's head against its merge-base with
main, every scorer, with the samples, BIM4LCA, R2025,rac_advancedand the held-out models, as row 8's run 43335523236.How each is read, as row 8's (comment 6839814185):
DrunkOnJava commentedon Nov 13, 2026
Row 8 downward, registered before its run. Branch
research/1825-row8-collinear-1e-12ismainwithCOLLINEAR_EPSat 1e-12 instead of 1e-9. That keeps as vertices the 49 census values in (1e-12, 1e-9], which the 1e-9 test merges. It is a measurement and not meant to land.Run and reading: as row 8 upward (comment 6839814185), against the merge-base with
main. Row 8 upward's own reading follows once the two files whose exports moved with no scorer line are named (kept-IFC run 43338417406).DrunkOnJava commentedon Nov 13, 2026
Readings of four variants, against the rules in comments 6839814185 and 6840140089. Each run is unfiltered against the merge-base
925c482d. In every one,diagnostics.jsonis 102 of 102 identical.Row 8 up (
COLLINEAR_EPS1e-6), run 43335523236: away from Revit's. A measured negative.Row 4 up (
PIECE_ROUNDING_SQUARE_FEET1e-6), run 43338967923: moves no line scored against Revit. A measured negative.Row 4 down (the same constant at 1e-12), run 43338974641: moves no line scored against Revit. A measured negative.
Row 7 up (
native_area_regions.rs's straight-turn test at 1e-9, relative), run 43338166730: toward Revit's. This row gets a fix PR.Rows 5 up, 8 down and 9 wide are still running.
ci: the held-out scrubber keeps the #1825 census's per-site count lin…
DrunkOnJava commentedon Nov 13, 2026
Readings of the other variants, and a correction to row 9's. All runs are unfiltered against the merge-base
925c482d.Row 8 down (
COLLINEAR_EPS1e-12), run 43339001594: away from Revit's. A measured negative.Row 5 up (
body_geometry.rs's collinear-vertex test at 1e-9), run 43338983770: toward Revit's, in the glTF only.diagnostics.jsonare identical: the test shapes the tessellationrvt-gltfwrites, not the IFC.wall_ends_cv_vs_ifc, which scores the GLB's wall layers against Revit's export, counts one more wall end within 0.001 ft on each office file (1,111 → 1,112 as built, 998 → 999 at permit), at every tolerance. Nothing else changes.ifc.sha256does not: the wall named by a--listrun on the kept GLBs, and the viewer's pinned counts.Row 9 wide, run 43338992706: invalid as built, not a reading of the tolerance.
rac_basic2023 to 2027, one saved mesh is refused ascylinder trim outside envelopeand falls back to its record box (box bodies 16 → 17).within_envelopekeeps the points of a refined edge thatcylinder_facewill accept, andcylinder_facerefuses a trim more than 1e-7 outside the envelope. All 27 census values lie between 1e-7 and 1e-6 outside.within_envelopeat 1e-6, it keeps exactly the pointscylinder_facethen refuses. The run measured that mismatch.research/1825-row9-both-1e-6, run 43344032145, read by the same rule.Row 7, named (kept-IFC run 43343069460):
TSTO5andTSTO9, each losing 2 outline points (70 → 68). They are the 2 that come within 0.01 ft of Revit's.rac_advancedIFC2X3 models, through a scrubber that keeps its per-site counts. Row 7's fix PR waits for it.DrunkOnJava commentedon Nov 13, 2026
The census on the 24 models the first run could not count, run 43344511881 at
0b2767ab. These are the held-out models, BIMcollab's andrac_advanced's IFC2X3 pairs. The census branch's scrubber now keeps its per-site count lines and nothing else. Counts only.All 25 results came back (
rac_advanced's pair runs as six saves), eachexport=ok. Values above 1e-12 and at or below 1e-6, by row:wall_tops.rs:349,:359native_area_regions.rs:975element_record_plan_profiles.rs:971What it changes:
research: #1825 row 5's census notes the turn's sine instead of the c…
DrunkOnJava commentedon Nov 13, 2026
Row 5, re-read with a scale-free census: no near value, so no drift risk. The glTF gain belongs to another rule.
body_geometry.rs'swithout_spikescompares the turn's cross product, in square feet, with 1e-12. Row 5 up moved it to 1e-9 (comment 6840989096). That is unscaled: on two edges 0.001 ft long it would drop a turn of a thousandth of a radian (0.06 degrees). So before choosing a fix, the census branch (848f82b5) noted each turn's sine, cross / (|a| |b|), with the test itself unchanged. Run 43346045072 covered every model Measure holds.The site is reached on 3 models, with 239 values. Their sines:
So the 8 values the first census put in (1e-12, 1e-9] are not nearly straight. They are real turns on edges short enough that the cross product is small. No turn sits near a threshold where a drift could tip it, and as a drift question row 5 is a measured negative.
What row 5 up did instead was drop those short-edge corners. In the GLB that brings one wall end to Revit's: wall 1348326's start on both BIM4LCA office files, from 0.4921 ft off to within 0.001 ft. The corner that held it back is a short edge in a layer outline, not a tolerance. Filed as #1870, to be read for what that edge is before any rule drops it.
Where the rows stand:
fix(research): the straight-turn test's comment names the band with n…
DrunkOnJava commentedon Nov 13, 2026
Row 9, rerun with both margins at 1e-6 (
research/1825-row9-both-1e-6, run 43344032145): moves no line scored against Revit. A measured negative.The five
rac_basicsaves of 2023 to 2027 move, and nothing else. All 102diagnostics.jsonare identical: no saved mesh is refused or gained, unlike the invalid first run. The 27 points between 1e-7 and 1e-6 outside the envelope are now kept by both sides, so the faces they bound are drawn with them.rac_basichas no Revit export in Measure, and no scorer line of any model moves. With no evidence that keeping them helps, both margins stay.Every row of the census is now read:
One finding outside the rows is #1870. The variant and census branches stay until #1866 lands, then go under
refs/archive/.fix(research): a room outline's straight-turn test takes a sine under…
DrunkOnJava commentedon Nov 13, 2026
Done: the one row that tips a value is fixed, and every other row is a measured negative.
native_area_regions.rs, the straight-turn test) is fixed by fix(research): a room outline's straight-turn test takes a sine under 1e-8 as straight, so two timber office rooms drop a vertex Revit's outline does not have (#1825) #1866, merged as6036f127. Two rooms of the BIM4LCA timber office,TSTO5andTSTO9, no longer keep a vertex Revit's outline does not have. The new threshold sits in a band no model Measure holds has a turn in, so a drift of 5e-8 ft tips none.The ten variant and census branches are archived under
refs/archive/2026-11-13/research/1825-*(restore withgit fetch origin 'refs/archive/2026-11-13/*:refs/remotes/archive/*') and deleted. The runs cited above stay readable; a run's code ref is its commit, which the archive refs keep.One comment fix is left: the module doc of
partition_column_nodes.rssays two values are "equal" where the test means equal to 1e-12. It goes in the nextsrc/pull request, which has to carry a Measure verdict anyway.fix(redact): redact_path_str scrubs the user name of /home/<name>/ an…