Repository navigation
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Boundary provenance and surface continuation solidcore/crates/solidcore/src/topology/face/p1.rs, solidcore/crates/solidcore/src/nurbs/b_spline_surface/..., solidcore/crates/solidcore/src/nurbs/b_spline_surface_n_lib/p1.rs, solidcore/crates/solidcore/src/intersect/topology_solver/projected_bound.rs |
Oriented trim boundaries now map curves to their source edge uses. B-spline surfaces have a continuation flag that controls whether simple evaluation clamps parameters outside the natural domain. |
Closed-boundary volume integration solidcore/crates/solidcore/src/mass/integrator/properties.rs, solidcore/crates/solidcore/src/mass/enclosure.rs |
B-rep integration closes face boundaries onto edge curves and vertices. It adds signed volume and moment contributions from closure strips and corner fans. |
Measured-body dump and capture solidcore/crates/goldens/src/dump.rs, solidcore/crates/goldens/src/{jobs.rs,lib.rs,main.rs,runner.rs}, solidcore/crates/goldens/src/units/... |
The goldens CLI accepts --dump-smb. The runner scopes per-case output, and measurement units submit bodies before computing mass properties. The dump module supports ASCII SMB files and in-memory B-rep copies. |
Leak diagnostics and targeted regressions solidcore/crates/solidcore/tests/support/volume_leak.rs, solidcore/crates/goldens/tests/issue_16735_*.rs, solidcore/crates/solidcore/tests/issue_16735_*.rs, solidcore/crates/solidcore/tests/issue_880_half_arc_rim_chamfer.rs, solidcore/crates/solidcore/tests/wr_407_swept_arc_walls_join_without_fold.rs, solidcore/crates/solidcore/tests/wr_450_box_minus_rational_cylinder.rs |
Test support measures volume, origin spread, and prior leak bounds. Added tests cover trims past surface domains, golden-body measurements, corpus B-reps, and half-arc chamfers. |
Existing volume regression updates solidcore/crates/solidcore/tests/*.rs, solidcore/crates/solidcore/tests/kernel_cases/*, solidcore/crates/solidcore-ops/src/split/tests.rs, solidcore/crates/solidcore-ops/tests/*.rs |
Existing tests use revised volume expectations, closed-form calculations, and leak-bound comparisons. Operations tests add case-specific closed-gap volume references. |
Golden measurement baselines solidcore/crates/goldens/expected/*.jsonl |
Blend fixtures are added. Blend, Boolean, corpus-parity, and offset expected measurements are updated. |
Estimated code review effort: 5 (Critical) | ~120 minutes
Severity of issue fixed: Medium
Merge Risk: 
Moderate · previous review 7188e
-
This change makes volume measurement close tolerant-edge gaps, so measured volumes of many bodies shift slightly toward the correct values. The continuation guard can be skipped when out-of-bounds evaluation is already enabled, and the edge nearest-point solve can silently stall, so some bodies could still report origin-dependent volumes. Several moved test pins are justified only by sampled estimates. Address these before merging; the risk is limited to volume and mass measurement accuracy and is easy to roll back.
Security architecture risk: 
Low · up to 7188e
-
Temporary evaluation settings may affect other calculations using shared geometry. Normal cleanup is protected, but isolation during overlapping calculations remains unresolved. No expansion of privileges or remotely exposed access was established.
Retained concerns
- Low · reliability · inferred: The new continuation guard saves and restores object-level flags without serializing overlapping scopes. Evaluation copies can share lazy analytic geometry, so separate Breps do not necessarily establish independent evaluation state. Overlap on a shared base could restore another calculation's settings prematurely or leave continuation enabled afterward. Reachability through the guard's analytic helper remains partially traced; this is an inferred ownership and restoration risk, not an established exploit.
Security review details
-
Security Blast Radius
- inferred — The demonstrated effects concern measured geometry and files written by an explicitly enabled local harness. Any cross-calculation effect of continuation state would follow shared geometry identity; the inspected evidence does not establish tenant-wide, service-wide, or privileged exposure.
Trust Boundaries and Controls
- observed — The dump directory comes from command-line input, while the runner supplies unit and case identities. Character filtering is not a general filesystem sandbox: dots remain allowed and body labels are interpolated directly. No inspected caller established an untrusted source crossing into this file-writing authority.
Resilience and Maintainability Implications
- observed — The runner catches case errors and panics, clears the dump target, and only then invokes the result callback. The broad capture regression similarly takes captured state after catch_unwind. A separate test helper uses manual capture/take pairing without unwind cleanup; that limitation is confined to the inspected test path.
Hardening Proposals
- proposed — Make continuation mode invocation-local, or isolate the evaluated base before toggling it, so restoration does not depend on calculations over shared geometry never overlapping.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "solidcore: close tolerant edges' gaps in brep_volume (
#16735)" names the main change: brep_properties now closes volume-bounding faces onto their edge curves and vertices to fix volume error from tolerant-edge gaps. It is specific and matches the changeset and linked issue#16735. The title is a single sentence, but it uses an internal crate prefix and an issue number, which is acceptable.
Full details: Linked Issues check
-
Explanation
Linked issue
#16735asks for brep_volume on tolerant solids to reach O(tol²) accuracy, or to report an error bound. The PR changes gap_closure in mass/integrator/properties.rs. Each face closes onto its edge curves and vertices through ruled strips and corner fans, so neighbouring faces share the same boundary. The issue_880 tests assert the cut cylinder against 250√5π within the tolerance-volume estimate plus 1e-10·V (PR measured -1.3e-11, previously -3.6e-4). They assert origin independence (volume ≤ 1.9e-8 across three origins). They assert the half chamfers against#16726's definition volumes (definition build +1.5e-7 and +1.2e-7; previously -3.8e-4 and -2.4e-4). The e9 case origin spread falls from 2.9e-4 to 9.7e-9 (MEASURED in the PR). Limits, stated in the PR and not fully closed: (a) B-spline surfaces in polynomial form whose trims leave the domain stay clamped, and no test covers this case; (b) the error bound for moved results is MEASURED (sampled), not certified; (c) the fillet1v shell volume move of 3.04e-5 sits at 91% of a sampled old-leak bound and is a maintainer decision. The core requirement is implemented and verified by the cited tests. I did not run or inspect the tests in this assessment; the verdict relies on the PR description and the summary of changes.
Full details: Out of Scope Changes check
-
Explanation
Changes outside properties.rs fall into three groups. (1) Support for measurement and verification: tests/support/volume_leak.rs, goldens dump tooling and the golden mass-move harness. These support the volume tests and are listed as expected edits. (2) Consequences of the new volume values: re-pinned volume expectations in issue_880, issue_16735, fork_, issue_1442, issue_1795, issue_2364, wr_, wr685, blend_overflow_first, issue_3012, the kernel_cases peg grading, and regenerated goldens (boolean.api_brep, corpus.parity, offset_executive_p2, blend fillet_executive_p3). These are linked to the volume change. (3) Supporting code for continuation and topology: BSplineSurface continues_past_domain flag, evaluate_simple_first_into change, partials_over visibility, OrientedTrimBoundary.edgeuses. These are needed for the face integral used by the closure, as the PR states. The wr_450 assertion removal and the blend_crossing pin widening weaken existing checks. The PR flags both as maintainer decisions, and each is tied to a measured volume change, so I do not treat them as unrelated changes. I found no demonstrated change unrelated to the volume integration. I did not inspect the diff; the verdict relies on the PR description and summary.
Full details: Description check
-
Explanation
The description is thorough and follows the template. It has a title-like opening, a Change section explaining the fix for
#16735(tolerant-edge gap closure in brep_volume), a 'Changes a default: no' line, a 'Test change:' line with reasons for each moved expectation, and a detailed Validation section with expected and measured values. It links the issue. The template's screenshot section is not applicable because the change is kernel geometry with no UI behavior, and the author gives measured evidence instead. The description is very long and includes a lot of internal merge history, but the required sections and information are present.
Full details: Existing Defaults Unchanged
-
Explanation
The check fails only for a changed UX default (settings, preferences, command default behaviour, UI layout or behaviour, shortcuts). It excludes kernel or geometry results, including anything under solidcore/. Evidence from the PR summary and description: - The main code change is in
solidcore/crates/solidcore/src/mass/integrator/properties.rs. It changesbrep_propertiesvolume, mass and volume-moment results for tolerant-edge solids. This is a kernel result change, and the check excludes it. - The 6 area rows that move are golden kernel outputs. They are also excluded. - The goldens CLI change (--dump-smb <dir>inmain.rs,jobs.rs,runner.rs,dump.rs) is additive. It is off unless the user passes the flag. The summary says dumping is off by default. - Thedump::bodycalls in the golden units do nothing when no dump target is active. - The summary lists no changed default setting, preference, shortcut, UI layout, or default command behaviour. - The description statesChanges a default: no. The description also says "No UX default changes." Nothing in the summary contradicts this. Limit: I did not run tool calls beyond the supplied summary and description. The summary gave no sign of a UX default change. The PR'sanalytic_copy_keeps_parameterizationand retired-flag references concern test or kernel flags, not user-facing defaults.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
… on tolerant edges Claim commit, no changes yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
brep_properties integrated each face over its own UV trims, whose images run within the edge tolerance of the edge curve, so neighbouring faces left gaps and the volume fields leaked through them: the volume was wrong to first order in the tolerance and differently for every origin (the cut cylinder read 3.6e-4 low, the issue_880 half chamfers up to 1.9e-3). Each volume-bounding face is now closed onto its edges' curves and vertices: a ruled strip from the trim's image to the edge curve along every edge use (a piecewise-linear correspondence through the nearest points, so the strip is continuous with an exact derivative and meets the edge curve end to end), and a fan at every loop corner through the trims' ends, the edge curves' ends and the vertex. The faces with their strips and corners share the edge curves and vertices exactly and bound one closed surface, so every volume integral is that region's whatever the origin; the region differs from the solid only inside the tolerance tubes and balls, so the error is at most sum(pi tol^2 L) + sum(4/3 pi tol^3). Tests (fail without the fix): the cut cylinder is 250 sqrt(5) pi to that bound plus the requested accuracy; volumes and first moments agree across three origins; the half chamfers match tangency-labs#16726's volumes by their definitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
1a08940 to
ede2d26
Compare
…-labs#16735) The nearest-point search bounds t by max then min, and the corner loop pairs each edge use with the next by a cycled iterator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…olume_leak.rs) The checks that a volume moved by the tolerant-edge closure is the old integrator's leak: SMB loading, the volume about the bounding box middle and its spread over two other origins, the old leak bound from sampled trim-to-edge gaps, the tolerance-tube bound, and the worst gap over its stored tolerance. A first harness test checks them on an exact box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
|
Heads-up on an overlap. #15946 (draft, opened 2026-11-13, part of #14170) closes the same gaps in the same place: it makes the faces' flux surface closed with strips from each trim image to its edge curve plus corner pieces, so Measured on #15946's patch (solidcore swarm, current main a71e5e0): the issue_880 half-arc rim (setbacks 1-1) reads 1741.1794325 patched vs 1741.1776985 on main, against #16726's converged quadrature 1741.1795727. That is 1.4e-4 off, against main's 1.87e-3. One of the two should give way rather than both landing. #15946 is being re-cut onto current main now (it conflicts after 112 commits). Could you compare the two? If #16737's construction is the one to keep, we'll fold #15946's bound and tests into it, or the other way round. I'm happy to go with whichever you and jyviko prefer. |
…ncy-labs#16735) The 116 corpus.parity files whose volume moved when brep_volume began closing tolerant edges' gaps, read and round-tripped (232 rows), each checked by volume_leak::moved_by_the_old_leak: the new value reproduces, the move is within the old leak bound (sum of g L max|z - o_z| over edge uses) plus the quadrature's own share, the volume is origin-independent, and either the new error bound with the sampled gaps is below the old one or the move lies inside the tolerance tube. Topology and status are unchanged on every row (checked before the harness). The tube clause covers 30 rows whose gaps are far inside their tolerances (worst gap / tol 0.000): there the tube's width is the larger bound and the moves (1e-14 to 1e-9) lie inside it. Ignored by default (heavy, needs upstream/TestFiles); run with cargo test --profile goldens -p solidcore \ --test issue_16735_volume_moves_are_the_old_leak -- --ignored Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
Each pin that held the old integrator's leak (tangency-labs#16735) now holds the closed form where one exists, else the new value with the move checked by volume_leak::assert_moved_by_the_old_leak on the body (within the old leak bound, origin-independent). No tolerance is loosened; several are tightened. Closed forms (the leak was the whole difference): - issue_2364_alpha1_ends, issue_2656, ops blend_overflow_first: plate 1681.903758348 (1.2e-11) and notched block 10198.718038816 (5.8e-12), 1e-9 -> 1e-10 - issue_453: round 6382.568731366 and chamfer 6316.944424728 (3e-10), 1e-8 -> 1e-9 absolute - fork_4a58f3d: removed volume 1.85e-7 from its closed form (fork 1.8e-6) - issue_1453: 1.1e-12 from the closed form - issue_1058 / issue_1061: union + intersection and the marched rim are now exact (1.8e-10, -2.7e-14); the asserted shortfall was the leak - issue_3012 (ops): the sliver is 300 dx exactly (the outline less its translate); the "5 dx^2 missing" was the caps' trims. Volume held to the closed form within 0.02 dx^2 + 1e-8; the area check takes the caps' measured face areas instead of V / h. New values, harness-checked on the body: fork_eb883ad (8), fork_smlib104, issue_1442, issue_1795, issue_2176/2223 rim, issue_2364 round ending (in turn and together now agree to 2.8e-12), wr300 (2), wr512 (both C++ figures within the leak bound of one closed-gap value), wr579, wr603, wr685 (5), wr697 (3), wr_578, wr_593. New values without a body in scope (ARGUED: same family, topology unchanged): issue_1480 union, issue_1950 (4; wr_578's body is one of them), issue_2358 (3), issue_2431 (2403's three-together, now 1e-11 apart), ops split cup (rig 1.3e-9 below). Kernel rig references: the four round pegs' rig volumes and d2's known_failing message take the new values (step 1 showed each move within the old leak bound and origin-free). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…16735) gap_closure took the trim's knots with unwrap_or_default, so a trim whose knots cannot be read (a B-spline without its NURB, Curve::knots' only error) closed its strip on the grid alone. Such a trim is malformed: its error is now the volume's, as every other evaluation error in the closure is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…y-labs#16735) Review of tangency-labs#16737: the tube bound assumed every strip segment and fan point within tolerance without checking it. - Strip widths are now measured along the closure's own correspondence t(tau) (properties::nearest_on_edge's grid of 64 nearest points, linear between, mirrored step for step), sampled at 8 points per grid segment with a stated 1.1x margin for peaks between samples. - Corner fans: the trim end images and edge ends are measured against their vertices; the bound takes max(reach, tolerance). - old_bound is documented as low (peaks between grid points and corner holes are not counted), so the gate it makes is strict. - The origin spread shifts z (0, 0, 100) instead of x: the integrand is z n_z, so an x shift tested nothing. - The gate is reproduces + within the old leak bound + origin-free. The tube clause is reported, not gated; the tube bound is labelled ARGUED. - difference_moved_by_the_old_leak: the same gate for a removed volume (before - after), each body's own leak bound counted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
Review of tangency-labs#16737 (0d2ed6d's claim "none loosened" was wrong for two sites; fixed here): - fork_4a58f3d: the 5e-10 pin is back, on the new value, beside the closed-form check. - issue_3012: the volume is the derived closed form, the sliver's section 30 dx less the two end pieces the body cuts off under the translated fillets (dx^3 / 12 each, ARGUED from the measured cut), held to the 1e-8 the volume is asked for (residuals -2.3e-9, -2.3e-9, -2.0e-9 MEASURED); the fitted 0.02 dx^2 is gone. The caps are that closed-form section, not face_area; the area routine's caps over their trims are dx^2 / 2 short each (MEASURED, not derived: the same class of defect the volume had), so the area is checked as the faces less 20 dx less dx^2 at the old tolerance. - issue_2364 plate and notched block: the closed forms are computed in the test from SolidCraft's derivations (5158, 1080 expected.method), reproducing 1681.903758348255 and 10198.718038815705. The 3.1e-7 discrepancy was the capped figure, a fork measurement with its leak, not a closed form. Held to 1e-10 relative. - issue_453: the closed forms are computed in the test (the capi's exact integrals, Simpson at 800 spans, Richardson error ~4e-11 and 8e-11); the bodies agree to 3e-10 and 1.5e-10, so the end rib's share is below that (MEASURED, not derived). - Body checks for the ARGUED sites: issue_1950 (4, assert_moved on each shelled body), issue_2358 (4, the removed volume's move within both bodies' old leak bounds), issue_1480 (the union). issue_2176's rim and wr603 now check the difference the same way instead of assuming the part before the blend unmoved. - Kernel rig: the four pegs' rig records are restored as measured. The rig grader takes CLOSED_GAP_VOLUMES per case instead, and checks each move from the rig's value on the result body with volume_leak::moved_by_the_old_leak. d2's known-failing line moved 3.3e-6 (9383.373309486477 -> 9383.373306185718); 0.077 is its distance from the rig's value, unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
Maintainer decision. Without analytic_copy_keeps_parameterization the box-minus-rational-cylinder result is invalid by this same test's own check (ValidatePointers fails, BREP 59 and 82): the split faces' copies are reparameterised, their trims point up to 0.78 off their edges, and the edges carry tolerances up to that to cover it. Such a body's volume is defined only up to its tolerance tubes, sum pi tol^2 L + sum 4/3 pi tol^3, which measures 57.7 here (about 7e-3 of V = 8492.58, the closed form). The old integrator took the trims and landed on the closed form; the closure onto the edges gives 8502.78 (1.2e-3 over), inside the tube. Neither is derivable to the 1e-6 the test asserted, so that one assertion is dropped for fix = false only. The fix = true volume (closed form to 1e-6), the invalidity, the worst edge tolerance and the exact check failures are all still asserted. No flag changes (tangency-labs#15956 kept this flag back with evidence). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
- volume_leak: WIDTH_MARGIN is labelled ARGUED, no bound derived; it feeds only the informational tube figures. - volume_leak: difference_moved_by_the_old_leak reproduces the removed volume to 1e-9 of itself (plus a 1e-14 rounding floor on the larger body), not to 1e-9 of the larger body. - issue_453: the closed forms' Simpson rule at 10^4 spans (2000 for the round's inner integral), its error about 1e-12; the 1e-9 each body is held to is labelled MEASURED (the end rib's term), not a closed-form bound. - issue_3012: the area check's trims shortfall links tangency-labs#16854. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…bs#16735) `goldens --dump-smb <dir>` writes every body a runner measures, just before the measure, to `<dir>/<unit>/<case>.<label>.<n>.smb` (ASCII, as the kernel rig's KERNEL_CASES_SMB), so a test can load the bodies the goldens measured. `goldens::dump::capture` keeps exact in-memory copies (`clone_standing_for_self`) of the same bodies for a test that runs the cases itself. Off by default: a run without either produces exactly what it did before. `--jobs` forwards the flag to its children. The hooks: blend.fillet_executive_p3's mass record (`mass`) and fillet-then-shell record (`shell_mass`), boolean.api_brep's and offset.offset_executive_p2's `brep_volume` (`volume`). An .smb file is not always the measured body exactly (MEASURED on these units: 66 of 307 measured bodies read back to the bit-identical record, the rest within 1e-12 of the scale but one, sweep5-letter_g-e1-r1.0, whose area reads back 2.2e-7 off), which `goldens::dump`'s docs say; the capture is exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…tegrator's leak goldens/tests/issue_16735_golden_mass_moves.rs runs blend.fillet_executive_p3, boolean.api_brep and offset.offset_executive_p2 in process with goldens::dump's capture, and for every measured body (exact copies): - new: the runner's own call reproduces the case's output (to 1e-12 of the component's scale); - old: the pre-tangency-labs#16735 brep_properties (the same face_properties calls, no gap_closure) through estimate's post-processing; the golden row (topology, statuses, every other value) matches the output with old or with new values; - the leak bound per mass-record component: every volume integral is the flux of F_c = e_z int_{m_z}^z f_c dzeta (f_c: 1 for volume and mass, (x_a - c_a)/V' for the centroid, y^2+z^2 ... for the inertia and yz ... for the products about 0), so |new - old| <= sum over the closure's pieces (strips between sampled trim points and edge nearest points, corner polygons) of area * sup|F_c| (gaps sampled: MEASURED), plus a 1e-12 noise floor; - origin independence at accuracy 1e-10, per component within 1e-9 (1 + A |o - m| / V) of its scale, about m, 0 and m + diag (0.37, -0.21, 0.55); - reported only: the gaps and corner points against the stored tolerances and the tube bound. With ISSUE_16735_INVENTORY (the PR's [unit, case, field, old, new] diff) every row is gated against its component's bound and checked against the recomputed values. #[ignore]d (it re-runs three golden units, ~8 min optimised): run with cargo test --profile goldens -p goldens --test issue_16735_golden_mass_moves -- --ignored Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…ectations) The single expectations commit of tangency-labs#16735: goldens/expected only, blessed on af2c260 (identical to an independent bless of the same head). Rows moved (cases / values; cases beyond the goldens' 1e-9 in brackets): - blend.fillet_executive_p3: 261 / 2,317 [106]: mass_properties [1..11] (volume, mass, centroid, inertia and products about 0; the area [0] does not move) and 4 cases' shell_mass_properties [1..2]. - boolean.api_brep: 25 / 27 [12]: measures[1] (brep_volume) and two cases' measures blocks (their sums carry the volume). - offset.offset_executive_p2: 1 / 1 [1]: volumes[1]. - corpus.parity: 115 / 232 [50]: volume, rt_volume. Proof (MEASURED gaps, bound derived per component): - the first three units: goldens/tests/issue_16735_golden_mass_moves.rs. On exact copies of every measured body, each moved value is reproduced and within its component's old leak bound (the closure's flux, |new - old| <= sum area * sup|F_c|), and the golden rows otherwise match. 2,353 of the 2,356 diff rows are gated by key as well; the other 3 are the blocks sums of issue1059_grazing_bar_union_alpha-1.0_beta30 (its volume moved 4e-16 relative, checked on its body) and issue1036's measures[3] (an area, stale as below). - corpus.parity: solidcore/tests/issue_16735_volume_moves_are_the_old_leak.rs (piece A). Not blessed: blend.fillet_executive_p3 stubs4-degenerate-brepForFillet2-e9-r0.5 keeps its old line. Its moves are within the old leak bound (9% of it), but its new volume is not origin-free: 4.1e-5 (1.5x the allowance) between origins at accuracy 1e-10 and 1e-12 alike, so not quadrature; the old integrator's spread there is 1.0e-4 to 1.4e-4. boolean.api_brep issue1036_coincident_skins_intersection_measured: its old golden is stale (blessed before a change that moved it within the goldens' 1e-9); today's old integrator gives the new value to 5e-12, so its move (and measures[3]'s, an area the closure never touches) is the refresh of a stale golden, not the closure's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
|
Thanks for pointing out #15946. We compared the two, read-only, and ran one small test. Here is what we found and what we're doing. What each does
Where #15946 is ahead Same result Plan
If that doesn't make e9 origin-free, #15946 is the better base, and we'll say so here and give way. Written by Claude Code (Anthropic) on behalf of @brett19. |
…omain (tangency-labs#16735) stubs4-degenerate-brepForFillet2-e9-r0.5 was not origin-free: a shift of 100 in z moved its volume by 2.9e-4. Measured per face, every face's integral matched its trims' line integral, and every face's strips matched the edge path less the trims, except face 4. That B-spline wall's trim runs 3.3e-6 past u = 1. With clamping, the trim's image there is the domain edge's point but its derivative is the edge's partials, so the face's Green integral and the strip along that trim integrate different curves. The strips came out 2.9e-6 short in z. Adapted from tangency-labs#15946 by @bherbruck: - close_loops / gap_segment: brep_properties integrates each face it closes over its loops closed with uv lines where create_oriented_trim_boundary leaves a gap within its |d|^2 <= EFF_ZERO (1 + |p|) test. gap_closure closes those lines as cones onto the corner's vertex (the edge-use record of each boundary curve, OrientedTrimBoundary::edgeuses). - Unclamped / trims_past / continuation_certified: brep_properties integrates the face, and gap_closure builds its strips, on the surface continued past the domain its evaluation clamps to. This applies where the trims' control points leave that domain and the continuation is certified (a plane or a non-rational NURB; a rational one whose weights enclosure::partials_over proves positive). Otherwise it stays clamped. BSplineSurface::continues_past_domain is the scope's flag. - face_properties itself is unchanged (upstream's clamped, open-loop integral). e9: the shift of 100 in z now moves the volume by 9.7e-9 (was 2.9e-4); the origin_allowance is 1.48e-4. The volume moves 3616.232796 -> 3616.232732. Tests: issue_16735_e9_wall_past_its_domain (goldens, the exact captured body); issue_16735_trims_past_domain (tangency-labs#15946's open cube +/-1e-6, plane cut short of its trims, NURB trimmed past its knots, 2907c hull about six origins); issue_1476_volume_is_origin_independent. The tube figures are relabelled diagnostic: their widths are sampled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…ectations) blend.fillet_executive_p3: 43 of the 50 rows fadb9fa moves past the goldens' tolerance are re-blessed, and the bless rewrites the sub-tolerance last bits of the others. Proof per row (MEASURED, issue_16735_golden_mass_moves, --ignored, with ISSUE_16735_INVENTORY = every value of this file that differs from main 9f4b446, 2230 values in 261 cases): - reproduces: each captured body measures the case's output exactly (worst_reload 0); - every inventory value is the old integrator's (main's) and the new one's, to the noise floor (worst_inventory 0); - every moved component is within its old leak bound, sum over the strips and fans of area x sup|F_c| plus the 1e-12 floor of the component's scale (an absolute bound, so the near-zero moments are judged by it, not by their relative move: bottle m[9] -8.28e-8 -> -9.28e-8, e9 m[10]); - every body is origin-free: worst 4.4e-12 of its scale about three origins. Not blessed (their 063387b rows are kept, so goldens fails on them): - 6 rows move the area (mass_properties[0] / shell_mass_properties[0]), whose leak bound is 0: stubs4-delete-edge-sphere_diff_3cylinders-e1/e4-r0.1/r0.5 (2.4e-4 / 2.0e-4 of 3.8e4), source-file-corner_box-edge13 (1.1e-7 of 364), issue-880-half-arc-rim-0-setbacks-1-2 (2.2e-9 of 845), real-box-fillet1v-r3-shell-closed (3.7e-6 of 3516). brep_properties now integrates each face, area included, over its closed loops on its continued surface. - real-box-fillet1v-r3-shell-closed's volume moves 4.14e-5, past its strips' old leak bound of 3.34e-5. The bound does not count the clamped integration's own error. boolean.api_brep, offset.offset_executive_p2 and corpus.parity are unchanged. Pins (moved by fadb9fa; none loosened): - fork_eb883ad_keep_features: 8 bit-exact pins re-pinned bit-exact on the new values. Each move from its pre-tangency-labs#16735 figure passes assert_moved_by_the_old_leak on the body (cylinder boss r8 3.40e-5 vs bound 3.86e-4, hole r8 4.75e-5 vs 5.79e-4, cone boss 3.40e-5 vs 3.86e-4, pit 6.12e-5 vs 3.80e-4, lean 19 3.96e-5 vs 4.45e-4, origin spreads <= 2.3e-8 against allowances of 5.3e-4). The prism boss and pocket and the r 1.9 hole are back on their pre-tangency-labs#16735 figures exactly. - wr685 2 -> 50: 4693.608885930817 -> 4693.608894404652 (1.8e-9 rel). There is no closed form; the test still checks the fork's figure against it within the old leak bound on the body. - issue_1476 with SolidCraft's fixes: 1299.482314966473 -> 1299.4830955384534. Cross-validated by tangency-labs#15946's independent pin of the same case, 1299.4830955384505 (2.2e-15 relative). Its edges_on_analytics_exact variant still fails on a line count (16 vs 18), which no changed code path reaches. Test change: yes. 43 fillet golden rows re-blessed with the per-row proof above; 7 rows not blessed (reported); 8 eb883ad pins, wr685's 2 -> 50 pin and the two issue_1476 pins re-pinned on proven moves (bit-exact stays bit-exact, no tolerance loosened). wr_407_default_join_loses_the_folded_cover is not changed (see the PR). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…ncy-labs#16735) The loop's next curve is `get(i + 1)` or the first, not `(i + 1) % n`; the pending gap lines are taken with `mem::take`, not `drain(..)` (check_panic_sites). The eb883ad cylinder pins are formatted as rustfmt lays them out. No result changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…ness (expectations) The 7 fillet rows 1bd5b86 left unblessed are blessed here, each with proof. - Cause: all their moves come from close_loops, not from the continued surface. Their faces' trim boundaries leave sub-1e-6 uv gaps open, 5 to 11 per face (the continuation acts there only at rounding level). The old integral ran iso-u lines from the base v0, so it lost each gap's region down to v0: a second leak of the old integrator, which the closure-strip bound did not count. - Independent check per face (a probe, not committed): each inserted line's Green term int F(u, v(u)) du, with F = int_{v0}^{v} J dv by composite 8-point Gauss-Legendre (512 panels; the error is the 256 -> 512 change) and 8 points along the line, against brep_properties' new - old face integral at accuracy 1e-12: sphere_diff_3cylinders-e1-r0.1 area 2.382280876e-4 vs 2.382280884e-4 (err 7.0e-12) sphere_diff_3cylinders-e4-r0.1 area 1.979153266e-4 vs 1.979153220e-4 (err 1.6e-11) sphere_diff_3cylinders-e1-r0.5 area 2.382281032e-4 vs 2.382281043e-4 (err 7.0e-12) sphere_diff_3cylinders-e4-r0.5 area 1.979153172e-4 vs 1.979153149e-4 (err 1.6e-11) source-file-corner_box-edge13 area 1.145026971e-7 vs 1.145026911e-7 issue-880-half-arc-rim-0-setbacks-1-2 area 2.16784235e-9 vs 2.16786593e-9 real-box-fillet1v-r3-shell-closed area 3.6670537682e-6 vs 3.6670537065e-6; volume shadow -1.1001040e-5 (Green -1.1001040e-5), leaving -3.04e-5 of its -4.14e-5 move to the strips, within their bound of 3.34e-5. The magnitudes agree within the Green quadrature error plus the faces' 1e-12 accuracy (MEASURED). - issue_16735_golden_mass_moves counts the shadows in every component's bound (`shadow_pieces`: area sum |F| |du|; box of the iso-u lines from v0, padded). For the area, a shadow's own area bounds its move. Re-run with ISSUE_16735_INVENTORY (2230 values vs main 9f4b446, all gated): - blend.fillet_executive_p3: 294 bodies, worst_reload 0, worst_inventory 0, worst origin 4.4e-12 of scale, 0 failures; - boolean.api_brep: worst leak ratio now 0.52 (was 16.5); - offset.offset_executive_p2: unchanged. wr_407_default_join_loses_the_folded_cover: the +7744 mm3 it asserted was the clamped integration of wall A's top, whose trims run 1.7 in v past the B-spline's knot domain, so it was never a valid witness. It now asserts: - the defect directly: a fix = false trim lies more than 1.5 past its surface's domain (a sampled point proves the lower bound); - the contrast: with the fix, no trim leaves its domain by more than 1e-9; - the volume: within 1 mm3 of the closed form, the bound the fix's own test uses for the radial faces' approximation (MEASURED 1.6e-5). Test change: yes. 7 more fillet golden rows are blessed (all 50 now), with the independent per-face proof above. The goldens harness's bound gains the open gaps' shadows, with a proof of the term. wr_407's fix = false test replaces its clamped-volume witness with a direct assertion of the defect (trims past the domain, contrasted with the fix) and a closed-form volume check. This strengthens it: the old assertion measured an integration artifact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…; wr_407 derived witness (tangency-labs#16735) Delta-review fixes: - gap_closure takes each boundary curve's side by the edge use create_oriented_trim_boundary records for it, not by its position in the loop; a curve of no edge use of its loop is an error. - continuation_certified polls cancellation once per box (at most 2^16). - wr_407_default_join_loses_the_folded_cover: the underived 1 mm3 allowance becomes the two bodies' tolerance volumes (sum A_f tol_f + sum pi tol_e^2 L_e + sum 4/3 pi tol_v^3, from their stored tolerances): |V(fix=false) - V(fix=true)| = 1.67e-5 against 3.25e3 + 0.40. The fix = true domain check reads the trims' control points (homogeneous, w > 0, inside the domain +- 1e-9) instead of 257 samples per trim. The stale "7744 mm3 too large" header line is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
…by partial_cmp (tangency-labs#16735) gap_closure keeps each loop's sides as Option and takes the edge use's side from its slot (a second curve of the same edge use finds it gone and is an error), so no panic-prone Vec::swap_remove; a side left in its slot is an edge use the boundary lost, as before. The wr_407 test's weight check uses partial_cmp (clippy neg_cmp_op_on_partial_ord); NaN still fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
Conflicts in the goldens of blend.fillet_executive_p3 and corpus.parity were resolved by regenerating both units on the merged tree (`goldens --bless` of the two units, starting from main's files), not by picking either side. Against main's files only mass values differ: no topology, status or error entry moves, and no row goes to 1001. - blend.fillet_executive_p3: 1298 values in 119 rows differ from main. 95 rows are this PR's moves exactly as on the branch. 2 (brepForFillet2 e5/e9) equal the branch's within 6e-16. 22 are rows main moved since the old base (tangency-labs#16961's corner3x2/stubs3 setbacks, the sphere_diff_3cylinders bodies), with this PR's closure acting on main's new bodies. All 1298 values pass issue_16735_golden_mass_moves with that inventory (old = main, new = merged): each within its component's old leak bound, the old integrator reproducing main's value and the new one the merged value (worst 3.8e-16). - corpus.parity: 50 rows differ from main, all volume and rt_volume. Each equals the branch's value within 6.6e-10 relative (inside the goldens' 1e-9). sphere_diff_3cylinders is the one main also moved: merged 169499.15077 against the branch's 169499.15079. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
|
The merge of main is done locally and its catch-up gate is running now. I'll comment again once it's pushed. Written by Claude Code (Anthropic) on behalf of @brett19. |
…-labs#17483, tangency-labs#17045) into volume-strips-16735 Conflicts only in the goldens of blend.fillet_executive_p3 and boolean.api_brep. Main's retired flags are not referenced on this branch. All 283 golden units were re-blessed on the merged tree and the result is committed as produced. Against main, every moved row in this PR's 4 units is this PR's own row, unchanged, except 4 rows that main moved and the closure moves again: big-radius-box_diff_cyl_big_rad-r28-edge12 (main now builds it), issue_2020_mitred_put_back_d9_full, real-box-high-corner-setback-zero- control and issue2177_crescent_on_top_of_rim_measured. issue_16735_golden_ mass_moves, with main's values as old, gates all 36 moved values of these 4 rows, and all pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
…-labs#17013, tangency-labs#16290, tangency-labs#16908 and others) into volume-strips-16735 Conflicts: - wr512_singular_start_inside_direction.rs: tangency-labs#17326 retired ssi_singular_start_inside_direction. Main's flag-free tests are kept, with this PR's closed-volume assertion (BOTH_ROUNDS_CLOSED, C++ figures within the old leak bound). The flag-off refusal test and its helper go with the flag. - blend.fillet_executive_p3.jsonl: all 283 golden units were re-blessed on the merged tree and committed as produced. Against main, every moved row in this PR's 4 units is this PR's own row, unchanged, except 6 law rows that main moved (tangency-labs#17013) and the closure moves again. issue_16735_golden_mass_moves, with main's values as old, gates all 71 of their moved values, and all pass. Two of them, law-cube20-e0-deg2-smooth-{4-2-4,g2}, also differ from main's golden in result_geometry by 2.6e-10 relative. A build of main (2225309) gives the merged tree's geometry bit for bit, so main's committed rows are stale (within the 1e-9 check) and this PR does not move the geometry. Main's retired flags are not referenced on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
|
Merged main and pushed 0003798 (plain merges; four catch-ups as main moved: c7b230a, 3b9503a, ae5610c, 0003798). Catch-up gates pass on each.
Written by Claude Code (Anthropic) on behalf of @brett19. |
|
I've taken this out of the merge queue: merged with current main, it doesn't compile: crates/solidcore/tests/issue_1476_swept_bar_shell.rs: error[E0425]: cannot find function, tuple struct or tuple variant |
…opped from issue_1476_swept_bar_shell.rs The origin-independence test this PR adds builds PropertyAttributes with key_of returning ObjectKey(0); main's merge narrowed the file's import to AttributeStore only, so the test target did not compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
|
Merged current main (20bbdfb) and fixed the compile error in 7df5712. The cause: main's #17064 narrowed Written by Claude Code (Anthropic) on behalf of @brett19. |
# Conflicts: # solidcore/crates/goldens/expected/blend.fillet_executive_p3.jsonl # solidcore/crates/solidcore/tests/wr_593_nx1_tangent_corner_edge.rs
…6735) main's tangency-labs#16880 added fillets/16654-fillet-tube-joint-across-a-chamfer-crease-r1, whose rig volume 112506.83949124035 was measured with the old integrator. With tolerant edges' gaps closed the result body measures 112506.83897489308 (5.2e-4 below, 4.6e-9 relative). It joins CLOSED_GAP_VOLUMES: the rig record stays as measured, the case is graded on its volume now, and moved_from_the_rig checks the move within the old leak's bound on the result body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
# Conflicts: # solidcore/crates/solidcore/tests/issue_1476_swept_bar_shell.rs # solidcore/crates/solidcore/tests/issue_1950_shell_analytic_edges_face_owned.rs
moved_from_the_rig wrote the result body to SMB and read it back with Kernel::default(). Case 16654's round is kept as its definition (fillet_round_as_definition, in the rig's fixes), so it writes a procedural blend surface, which the default reader refuses, and the unwrap in volume_leak::read_smb panicked. The check now builds its kernel with session::fixes(), the case thread's own. 16654: moved 5.163e-4, within the old leak bound 8.368e-3, origin-free. The four pegs still pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
# Conflicts: # solidcore/crates/solidcore/tests/wr_407_swept_arc_walls_join_without_fold.rs
… past-domain claim With main's queries passing their statuses on (tangency-labs#16957), the default join's cover no longer leaves its B-spline's knot domain (the farthest sampled trim point lies inside), so the PR's "trims run about 1.7 past the domain" check no longer describes the body. main's level-2 "NonMonotonic CPts" check stays as the fold's witness. The PR's other checks still hold: with the fix every trim lies inside its domain, and the two joins' volumes agree within their tolerance volumes (both 223932.7243484, 0.40 slack). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
goldens --all --bless on the merged tree (main 5d3d908). The catch-up row check against the PR's proven set: 189 rows moved vs main. Of those, 7 are combined rows, where main also moved the row and the merged value differs: corner3x2-union-overhang-corner-edges6-12/6-13-r1, stubs3-union-overhang-corner-edges14-22/15-22-r1, stubs3-union-overhang-front-edges14-22-r1, law-box10x20x30-e0-deg1-edge-map-degenerate and boolean.api_brep/issue1517_tube_ends_union_measured. Four of the PR's earlier moves are absent: issue_2020_mitred_put_back_d9_full, law-cube20-e0/e7-deg3-asymmetric and real-box-high-corner-setback-zero-control keep main's values. Committed exactly as blessed. The combined rows' mass moves are checked by issue_16735_golden_mass_moves (PR body). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
|
Caught up with main again. The head is now dbd56e9, and CI is running.
Written by Claude Code (Anthropic) on behalf of @brett19. |
Conflict only in the issue1517_tube_ends_union_measured golden row, which tangency-labs#17429 (now on main) and this PR both move; main's side is taken here and the row is re-blessed on the merged tree in the following expectations commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
The catch-up merge took main's whole boolean.api_brep.jsonl; the bless on the merged tree restores this PR's 11 proven rows unchanged. Against main, issue1517_tube_ends_union_measured and issue2177_crescent_on_top_of_rim_measured no longer move (main's tangency-labs#17429 trim fix and this PR now give main's values). issue383_seed4_box_intersection_tangent_torus keeps this PR's volume and moves measures[7] by 2.3e-14 relative, checked with issue_16735_golden_mass_moves against main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdcgEtsWyH5fjgiavRsRdt
|
Caught up with main (#17429) at 311397f, with goldens re-blessed in 7f52f37. The only conflict was the Written by Claude Code (Anthropic) on behalf of @brett19. |
Conflicts: the properties.rs module docs (both paragraphs kept: tangency-labs#16735's gap closure and tangency-labs#17362's exact-box origin; the closure runs inside brep_properties_in_box, so every request takes it) and blend.fillet_executive_p3.jsonl, re-blessed on the merged tree in the following expectations commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
… the old leak (tangency-labs#16735) upstream_holes_clear_of_the_sides_still_offset_unmerged (from main's tangency-labs#17522) pinned main's volumes at 1e-9; brep_volume's gap closure moves them. Main's values stay the reference, and each move is now gated by volume_leak::assert_moved_by_the_old_leak at the test's accuracy 1e-6, the check this PR's other re-pinned volume tests use (wr697, wr_407, blend_crossing). All 8 pass (move / old leak bound; origin spread): hole f0 9.446e-1 / 6.832e0; 1.4e-8 hole f1 3.043e0 / 1.337e1; 5.6e-9 tan f0 3.418e-2 / 2.020e0; 4.8e-7 tan f1 9.729e-2 / 1.810e0; 4.2e-7 tan f2 2.012e-2 / 2.048e0; 5.0e-7 tan2 f0 1.921e-1 / 6.018e0; 1.0e-6 tan2 f1 4.681e-1 / 4.752e0; 1.0e-6 tan2 f2 6.596e-1 / 7.515e0; 9.2e-7 The leak bound uses sampled gaps (MEASURED), as for the PR's other leak rows. The Level 2 check, the manifold check and the inputs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
…sure's own box (tangency-labs#17362) Since tangency-labs#17362, brep_mass_properties integrates about the middle of the body's exact box and scales each face's error by that box; brep_volume keeps the loose box. The mass-moves harness's old path (and its origin-independence check) still took the loose box for every kind, so its "old" no longer reproduced main's goldens (e.g. big-radius-box r28 volume 1496769.2382982 against main's 1496769.2514803). The old path, new_raw and about_origins now take the box the kind's measure takes, through brep_properties_in_box, and a non-finite box fails the test instead of passing every comparison silently. With the combined inventory (1068 mass_properties rows in 101 cases of blend.fillet_executive_p3, old = main's goldens), every row reproduces and moves within its certified old leak bound (inventory_gated 1068, stale 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
… with tangency-labs#16735's closure (expectations) 101 lines (1068 mass_properties rows in 101 cases) combine main's exact-box mass properties (tangency-labs#17362) with the gap closure (tangency-labs#16735). Each row's old value is main's golden; issue_16735_golden_mass_moves reproduces it and checks every row's move within its component's certified old leak bound: 1068/1068 pass, 0 stale. No status, count, topology or validity value changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
wr_407: main (tangency-labs#17453) retired cover_refuses_folded_continuation and with it the without-fix join; the PR's comparison of the two joins has nothing left to compare. Its surviving check, every trim of the default join inside its surface's natural domain (to 1e-9, on its control points), stays as wr_407_default_join_keeps_its_trims_in_their_domains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUqX4Moqx5bbkSocgEbsSV
Fixes #16735.
brep_volumeintegrated each face over its own UV trims, whose images run within the edge tolerance of the edge curve, not on it. Neighbouring faces therefore left gaps, and the volume fields leaked through them: the volume was wrong to first order in the tolerance, and wrong differently for every origin. The cut cylinder read 3.6e-4 low, and the issue_880 half chamfers up to 1.9e-3 low.What the code does
brep_propertiescloses every volume-bounding face (a separating faceuse withdo_volume) onto its edges' own curves and vertices. The work is ingap_closureinmass/integrator/properties.rs.close_loopscloses an open uv loop or a face is continued (below), and those move the area and its moments too: 6 area rows move in the goldens.evaluate_simple_first_intowith the integrand's flags).brep_propertiesintegrates the face itself, and builds its strips, the same way:Closed loops. The face goes over its loops closed by
close_loops/gap_segment. These are uv lines across gaps thatcreate_oriented_trim_boundaryleaves open, within its|d|² ≤ EFF_ZERO(1+|p|)test. An open loop loses the gap's shadow down to the integration's base.gap_closurecloses each such line as a cone onto the corner's vertex, usingOrientedTrimBoundary::edgeuses, which records the edge use of each boundary curve.Continued surfaces. The face is evaluated on its surface continued past the domain its evaluation clamps to. This applies where the trims' control points leave that domain and the continuation is certified (
Unclamped,trims_past,continuation_certified,BSplineSurface::continues_past_domain):enclosure::partials_overproves positive.Otherwise the face stays clamped, as upstream integrates it.
continuation_certifiedpolls cancellation once per box (at most 2^16).Coverage gap: B-splines in polynomial form (
BSplineSurfaceForm::Polynomial) stay clamped.evaluate_simple_first_intosends them throughevaluate_simple, which clamps whatever the scope says. A polynomial-form face whose trims leave its domain is integrated clamped, as on main, and its strips are built on the same clamped evaluation. No golden or test reaches this case.Known limit, documented on
brep_propertiesandUnclamped::where_trims_may_leave: a face whose trims leave its domain but whose continuation is not certified stays clamped, as upstream integrates it. That covers a rational surface whose weights are not proved positive, a polynomial-form B-spline, and a kind with no B-spline part. Such a face keeps the clamped integration's first-order, origin-dependent error, and no bound is computed or reported. Refusing would turn a read-only measurement that works today into an error. No test pins this: no fixture reaches it.The scope sets and restores both flags on their own. An out-of-bounds flag that is already on no longer skips the continuation (test:
a_nurb_trimmed_past_its_knots_with_out_of_bounds_on_is_integrated_unclamped).The strip correspondence's nearest-point solve no longer returns its guess silently. Before, that could map a whole strip onto one edge point. An evaluation error or a missing derivative is now a typed error. A zero or non-finite derivative at an iterate means a parametric singularity, as at the end of fork_cd47efd's sqrt(s) rib edge. The strip builder then solves again from the grid point's share of the edge interval, and refuses with
SolidError::Massif that seed is singular too. A plain refusal on the first singular seed broke fork_cd47efd's valid volume.The closure matches each boundary curve to its side by the edge use
create_oriented_trim_boundaryrecords for it, not by position in the loop; a curve of no edge use of the loop is an error.Public
face_propertiesis unchanged.e9: what was not closed (MEASURED)
stubs4-degenerate-brepForFillet2-e9-r0.5moved 2.9e-4 for a shift of 100 in z. Every face's integral matched its trims' line integral, and every face's strips matched the edge path less the trims, except face 4. Face 4 is a B-spline wall whose trim runs 3.3e-6 past u = 1. With clamping, that trim's image is the domain edge's point, but its derivative is the edge's partials. So the face's Green integral and the strip along that trim integrate different curves, and the strips came out 2.9e-6 short in z. On the continued surface, the shift moves the volume by 9.7e-9, against an allowance of 1.48e-4. Its uv loops were closed exactly:close_loopsalone left e9 bit-identical.Folded from #15946:
close_loops;Unclampedscope;issue_16735_trims_past_domain.rs,issue_1476_volume_is_origin_independent).Not folded:
VolumeClosure/ClosureRefusaland the cap bound. The strips here meet the edge curves exactly and leave no opening to cap. mass: close the faces' flux surface: whole-body volume is origin-independent, with a proved bound #15946's outward-rounded bound, (L²/4)·max|f| over the openings, is a proved one; this PR has no counterpart.Why it is right
volume_leak::leak: the closure's own grid, 8 samples per segment, a stated 1.1× margin for peaks between samples). Before, the error was O(tol·L).Tests (fail on main; all three FAILED with the old
properties.rs)In
tests/issue_880_half_arc_rim_chamfer.rs:issue_16735_the_original_part_is_its_closed_formissue_16735_the_volume_does_not_depend_on_the_originissue_16735_the_half_chamfers_match_their_definitionsMoved results: the evidence
The harness (
tests/support/volume_leak.rs). For a volume that moved fromoldtonew, the gate is:brep_volumegivesnewto 1e-9;The tube bounds, widest strip and farthest fan are reported, not gated.
difference_moved_by_the_old_leakapplies the same gate to a removed volume (before − after), each body's own leak counted.Step 1 (round pegs, kernel rig). main's peg volumes equal the rig's; each of the four moves (2e-4 to 7e-4) is within its body's old leak bound and origin-free (MEASURED, gist https://gist.github.com/brett19/5740cf69bdcc24d0c4299aa4b40f6a4a). The rig's records stay as measured; the grader takes
CLOSED_GAP_VOLUMESper case and checks each move on the result body (4/4 pass). The d2 chamfer case (known failing, solidcraft#13755) moved 3.3e-6; its 0.077 is the distance from the rig's value, unchanged.corpus.parity (
issue_16735_volume_moves_are_the_old_leak,#[ignore], about 8 min; run withcargo test --profile goldens -p solidcore --test issue_16735_volume_moves_are_the_old_leak -- --ignored): the 116 moved files, read and round-tripped, 232/232 pass, with topology and status unchanged on every row.The 41 pinned tests. Each moved pin now holds:
No tolerance is loosened; several are tightened (1e-9 → 1e-10 for the closed forms, issue_3012's volume to 1e-8).
Goldens.
issue_16735_golden_mass_moves(--ignored) was run withISSUE_16735_INVENTORYset to every value that differs from main: 2230 values in 261 fillet cases. Each moved body passed four gates:boolean.api_brep and offset.offset_executive_p2 keep 063387b's expectations. After fadb9fa:
close_loops, not from the continued surface. These faces' trim boundaries leave sub-1e-6 uv gaps open (5 to 11 per face). The old integral lost each gap's region down to the integration base, which is a second leak of the old integrator. The continuation acts on these faces only at rounding level.close_loopsgap rule (|d|² ≤ EFF_ZERO(1+|p|)oncreate_oriented_trim_boundary's curves). It is close toshadow_piecesinissue_16735_golden_mass_moves.rs, which the harness does commit and gate on.shadow_pieces, 65 samples per iso-line, padded by the largest step), so a gap peaking between samples is not counted. A proven bound needs an enclosure of |P(τ) − E(t(τ))| along each strip, which neither the closure nor the harness computes yet. This is acceptable because the move has the old leak's sign and size, and the closure's volume is origin-independent. A maintainer may prefer to hold the row until a certified width bound exists.issue_16735_golden_mass_movesnow counts these shadows (shadow_pieces: area Σ|F||du| and the box of the iso-u lines from v0) in every component's bound. For the area, a shadow's own area bounds its move. Re-run results: see the commit message.Pins after the fold-in:
close_loopsand continuation, so the two share those mechanisms. The stronger witness isissue_1476_volume_is_origin_independent(issue_16735_trims_past_domain.rs): the volume does not move with the origin, which a leaking boundary would.wr_407_walls_join_to_the_closed_form_with_the_fix, 1 mm³, unchanged from main) stays.analytic_copy_keeps_parameterizationthe box-minus-rational-cylinder result is invalid by the test's own check (ValidatePointers fails, BREP 59 and 82; edge tolerances up to 0.78 cover trims pointing off their edges). Its volume is now held to the closed form within the body's tolerance volume, the same bound as wr_407 (volume_leak::tolerance_volume, moved into the shared support file; computed from the body's own faces, edges, vertices and stored tolerances): |8502.7837 − 8492.5793| = 10.20 ≤ 57.70 (MEASURED; premise ARGUED as for wr_407). The fix = true 1e-6 closed-form check, the invalidity, the worst edge tolerance and the exact check failures stay asserted.…with_solidcraft_fixes_and_edges_on_analytics_exact(ignored) fails on origin/main b0a5b08 too, with volume 1299.48231 vs its pin and 16 lines vs 18 asserted. On this branch only the volume pin is updated; the line count fails as on main. Nothing is filed yet.Choices made, and their evidence
A maintainer is welcome to propose an alternative for any of these if one is warranted.
blend.fillet_executive_p3stubs4-degenerate-brepForFillet2-e5-r0.5,mass_properties[0], the area (combined with main's solidcore: chamfers and rounds build at near-straight arc-to-spline corners again (#13911) #17022/solidcore: fillet removal failures carry typed causes: refusals classed 130 and 131, the rest StageFailed (#15019) #17163 fillet changes, merge 3b9503a). Choice: keep the blessed value, 1440.251651995584 (main: 1440.2516519941298; move 1.454e-9, 1.0e-12 relative, 1000x inside the goldens' 1e-9 check).issue_16735_golden_mass_movesgates the other 70 combined values. This one exceeds its allowance (6.96e-14 + 1.440e-9) by 1%, because that allowance's floor is a fixedNOISE= 1e-12 of the area: a stated quadrature share, not a bound derived for the body. Its exceedance by 1e-14 relative therefore indicates no defect. This is acceptable because the move is 1e-12 relative, the quadrature's own order, and no construction step of this PR touches face area.mass::enclosurecertifies the volume flux, whose integrand is polynomial in the surface's partials, with Taylor models. The area integrand |S_u x S_v| is a square root and needs its own enclosure (a lower bound on the norm on each cell). That is a separate piece of work and is not attempted here. Separately, the harness notes a sampled gap 7.97 times its edge tolerance in main's new fillet body (face 7, edge 16); that comes from main's geometry, not from this PR.a_round_ending_at_a_crease_is_not_refused_over_rounds_it_never_reaches(Fillet: a round that stops at a crease is no longer refused as overlapping rounds it never reaches (#16729) #16856's pin; its own commit). Choice: re-pin at 4183.7694497031225 ± 1e-8 (the issue's 4183.769446 ± 2e-6 was measured with the leaking integrator; the new value is 3.70e-6 above it). Evidence: still gated here are the closed forms of before, A and C (1e-9), the sum A B C = A + B C − before (1e-9), origin independence (spread 5.2e-9 against 1.8e-4), and the topology and face-kind counts. Measured-only: the pin itself (B and C's corner patch has no closed form) and the old-leak figure (3.90e-5, gaps sampled, printed only), which the 3.7e-6 move lies inside. This is acceptable because the closed-form and origin gates fix everything but the corner patch, and no enclosure of the trim-to-edge width exists yet.the_fuzz_round_near_a_focal_distance_builds_within_its_budget(solidcore: a G^n section certificate has a work budget of halvings and refuses past it as not certified (#14846) #14832's pin; commit e5c03db). Choice: re-pin the input body b27's volume at 5,577.325341277863 (1e-9; was 5,577.325354466 with the leaking integrator). Evidence: origin independence (spread 9.5e-8 against 2.6e-4), andvolume_leak::assert_moved_by_the_old_leakon the body: the 1.32e-5 move is inside the old-leak figure, 1.70e-4 + 3.6e-6. Measured-only: that figure (sampled gaps). This is acceptable because the pin only checks that the fuzz round receives the expected input body, and the round's own checks are unchanged.Merged main (#14102, #16931; merge eb43bd9, head e5c03db). Only the goldens of
blend.fillet_executive_p3andboolean.api_brepconflicted. This PR's 4 golden units were re-blessed on the merged tree from main's files. Against main, every row that moves (by the goldens' 1e-9 check) is this PR's own move, 181 rows, except one row where the two combine:issue_2176_tabbed_plate_tab_top_r0_5. There #14102 moved the product of inertia by −4.3e-12 (its tabbed-plate scalar), and the merged row is that plus this PR's mass move. 13boolean.api_breprows that this PR re-blessed below the 1e-9 check keep main's lines. Main's other 32 golden units pass unchanged. One combined test: main's #14832 addedthe_fuzz_round_near_a_focal_distance_builds_within_its_budget, which pins the input body at 5,577.325354466 (old integrator). With the gaps closed it reads 5,577.325341277863. It is re-pinned at the same 1e-9 tolerance and gated byvolume_leak::assert_moved_by_the_old_leakon the body. The move is 1.32e-5, within the old leak bound of 1.70e-4 + 3.6e-6, with origin spread 9.5e-8 (allowance 2.6e-4).Gate (catch-up, server2, merge eb43bd9): core fmt, clippy, panic sites, wasm; craft fmt, clippy, wasm; intersection tests (solidcraft-kernel, ui-egui, goldens, 44 solidcore targets); and 34 golden units all pass. solidcore-ops failed one test, the fuzz round's input pin above. After e5c03db the whole
blend_overflow_firstpasses (3/3) andclippy -p solidcore-ops --all-targets -D warningsis clean.Merged main again (c7b230a: #17099, #17101, #16653, #16954, #17061, #16997; 3b9503a: #17205, #17163, #16443, #17022, #17136 and others; ae5610c: #16964, #16445, #17483, #17045; 0003798: #16963, #17326, #17013, #16290, #16908 and others). Main's retired flags stay retired; none is referenced here. c7b230a: the only conflict was
issue_880_half_arc_rim_chamfer.rs, where both sides appended tests, and both are kept. 3b9503a: the only conflict wasblend.fillet_executive_p3.jsonl. All 283 golden units were re-blessed on the merged tree and committed as produced. Against main, every moved row in this PR's 4 units is this PR's own row, unchanged (boolean.api_brep12,corpus.parity50,offset.offset_executive_p21,fillet_executive_p3114), except 5fillet_executive_p3rows that combine with main. The twolaw-box10x20x30-e0-deg2-edge-map-{reversed,sub-range}rows are separable: main movedresult_geometry, this PRmass_properties, which equal this PR's pre-merge values exactly. The threestubs4-degenerate-brepForFillet2-e{5,7,9}-r0.5rows had their mass moved by main and are moved again by the closure.issue_16735_golden_mass_moves, run with main's values as old, gates the 60 combined values. All pass except e5's area (see "Choices made"). Merge ae5610c (#16964, #16445, #17483, #17045): the conflicts were in the goldens ofblend.fillet_executive_p3andboolean.api_brep, re-blessed on the merged tree and committed as produced. 4 more rows combine with main:big-radius-box_diff_cyl_big_rad-r28-edge12(main now builds it),issue_2020_mitred_put_back_d9_full,real-box-high-corner-setback-zero-controlandissue2177_crescent_on_top_of_rim_measured. The same harness, with main's values as old, gates all 36 of their moved values, and all pass. Merge 0003798 (#16963, #17326, #17013, #16290, #16908 and others) had two conflicts. Inwr512_singular_start_inside_direction.rs, #17326 retiredssi_singular_start_inside_direction: main's flag-free tests are kept with this PR's closed-volume assertion, and the flag-off refusal test goes with the flag.blend.fillet_executive_p3was re-blessed in full and committed as produced. 6lawrows that main moved (#17013) are moved again by the closure, and the harness gates all 71 of their moved values (all pass). Two of them,law-cube20-e0-deg2-smooth-{4-2-4,g2}, also differ from main's golden inresult_geometry, by 2.6e-10 relative. A build of main at 2225309 gives the merged tree's geometry bit for bit, so main's committed rows are stale (within the 1e-9 check) and this PR does not move that geometry.Gate (catch-up): at c7b230a, all 13 steps pass (core fmt, clippy, panic sites, wasm; craft fmt, clippy, wasm; intersection tests solidcraft-cli, solidcraft-engine, goldens, solidcore, solidcore-ops; 34 golden units). At 3b9503a, all 13 steps pass (core fmt, clippy, panic sites, wasm; craft fmt, clippy, wasm; intersection tests solidcraft-io, goldens, solidcore, solidcore-convert, solidcore-ops; golden units). At ae5610c, all 11 steps pass (core fmt, clippy, panic sites, wasm; craft fmt, clippy, wasm; intersection tests goldens, solidcore, solidcore-ops; 34 golden units). At 0003798 (the pushed head), all 12 steps pass (core fmt, clippy, panic sites, wasm; craft fmt, clippy, wasm; intersection tests solidcraft-engine, goldens, solidcore, solidcore-ops; golden units).
wr512_singular_start_inside_directionpasses on the merged tree (2/2). Main has since gained #16998 and others, which merge cleanly.Review fix (head 21aa203, test-only):
wr_450_box_minus_rational_cylinderandwr_407_swept_arc_walls_join_without_foldpass (goldens profile);cargo fmt --checkandclippy -p solidcore --all-targets -D warningsare clean. No library code changed, so no goldens or rig re-run.Merged main again (311397f: #17429 and others; goldens 7f52f37). The only conflict was the
issue1517_tube_ends_union_measuredrow inboolean.api_brep.jsonl, which #17429 also moves; the file was re-blessed on the merged tree and committed as blessed. This PR's other rows are unchanged. Against main:issue1517_tube_ends_union_measuredandissue2177_crescent_on_top_of_rim_measuredno longer move (the merged tree gives main's values).issue383_seed4_box_intersection_tangent_toruskeeps this PR's volume, andissue_16735_golden_mass_moveswith main as old passes it (leak ratio 0.24, origin spread 7.0e-13). Itsmeasures[7], one face's area, moves 2.57e-12 (112.49071884178262 to 112.49071884178005, 2.3e-14 relative). That is MEASURED only, as for the area rows above: it is the area quadrature running on the closed loops' cells after #17429's trims, and it is eight orders inside the unit'sAREA_ACCURACY(1e-4) and the goldens' 1e-9 check. The harness does not gate face-area measures.Merged main again (f4f4d88: #17362, #17522 and others).
issue_865_whole_offset_of_holed_plate's clear-hole test (#17522) keeps main's 8 volumes as its reference and gates each move withassert_moved_by_the_old_leak, as this PR's other re-pinned volume tests do (af84742). All pass: the largest move is 3.04 against an old leak bound of 13.4, with an origin spread of at most 1.0e-6.Merged main again (22f4b7c, main 707d066: #17453, #17507 and others), with #17362's exact box in the harness (101dfe9) and the combined bless (fbec9a8). #17362 makes
brep_mass_propertiesintegrate about the exact box's middle, so the harness's old path now takes the box each measure takes (exact for mass, loose forbrep_volume). Before this change its "old" was the loose-box value, not main's, which is where the 906 failures came from (big-radius-box r28 volume: harness 1496769.2382982, main 1496769.2514803, PR 1496769.2515786). With main's goldens as old, all 1068 combinedmass_propertiesrows in 101fillet_executive_p3cases reproduce, and each one moves within its certified old leak bound (inventory_gated 1068, stale 0). The only failure in the run is the e5 area point above.wr_407: #17453 retiredcover_refuses_folded_continuation, which leaves nothing to compare the default join against. Its trims-in-domain check stays aswr_407_default_join_keeps_its_trims_in_their_domains.Changes a default: no
No UX default changes. The kernel result does: the volume, mass and volume moments of every solid with tolerant edges move toward the closed region (and 6 area rows move where open uv loops are now closed).
Test change: yes, moved mass expectations re-pinned to closed forms or harness-checked values, wr_450's invalid-body volume assertion moved from 1e-6 of the closed form to the body's tolerance volume (as wr_407), wr_407's witness replaced with a direct one, blend_overflow_first's fuzz-round input pin (from #14832) moved from 5,577.325354466 to 5,577.325341277863 (MEASURED; see "Choices made"), and blend_crossing's #16856 pin moved from the issue's 4183.769446 ± 2e-6 to the new 4183.7694497031225 ± 1e-8 (MEASURED; still gated there: closed forms 1e-9, sum 1e-9, origin independence, counts; the choice is under "Choices made"), plus 15 golden rows that combine with main after merging main (14 in
fillet_executive_p3, 1 inboolean.api_brep; e5's area: see "Choices made"), andwr512's tests follow #17326's flag retirement.fillet_executive_p3rows combine with main (above).stubs4-degenerate-brepForFillet2-e5-r0.5's area moves 1.454e-9 from main's value, which is over the harness's fixed floor and MEASURED only (see "Choices made").blend_overflow_first's fuzz-round input pin moves from 5,577.325354466 to 5,577.325341277863 (same 1e-9), with the move gated on the body by the old-leak check.issue_2176_tabbed_plate_tab_top_r0_5's golden row combines Geometry: reject solutions from failed equation evaluations (#13764) #14102's −4.3e-12 product-of-inertia move with this PR's mass move.🤖 Generated with Claude Code
https://claude.ai/code/session_01MNXLXhx1aCDM9CwvrWhzzR
Summary by CodeRabbit
Improvements
New Features