Skip to content

fix: keep generic-blend vertex contacts within body tolerance (#1999) - #2530

Merged
bherbruck merged 9 commits into
tangency-labs:mainfrom
ChrisNourse:fix/1999-blend-split-classification
Nov 3, 2026
Merged

bherbruck merged 9 commits into
tangency-labs:mainfrom
ChrisNourse:fix/1999-blend-split-classification

Conversation

@ChrisNourse

@ChrisNourse ChrisNourse commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

A shallow-crease fillet can report success and a manifold solid while a retained crease vertex lies outside the finished body's vertex/face incidence tolerance. Under the generic blend, vertex intersection now requires that body-level bound as well as the existing curve/vertex bound. An incompatible contact is rejected before topology insertion splits the arc at the old vertex.

Fixes #1999. Follow-up to superseded #2003: this changes construction-time contact acceptance, rather than moving vertices after filleting. It changes no source curve or entity tolerance. The default path, non-fillet classifications and direct UV-space classification retain their previous behavior.

Units: intersect.curve_class_p5; blend.fillet_executive_p3, query.face_p2 and boolean.topology_intersector_p3 are caller-verification targets.
In scope: SmCurveClassification::IntersectVertices / intersect_vertices_in, under the existing fillet_blend_corner flag; regression tests and WR-723.
Expected edits: the classification routine, its focused test, the flag documentation, issue regression tests and findings.
Related PRs / dependencies: #2003 (superseded repair), #2243 (generic blend). #2381's closed-teardrop pseudo-topology allocation is outside this change.
Available follow-ups: successful multi-edge corner construction; this change does not implement it.

The regression covers the three reported failures, valid controls, model/tolerance scaling, several crease angles across both tolerance boundaries, and entity tolerances larger than the body's. The focused classification test checks the flag-off and non-fillet paths, strict boundary behavior and different body tolerances. The original regression was committed before the fix in ef2beae.

Pre-fix evidence on main e64c1de: all three reported single-crease cases return invalid success with both generic-blend and broad-fixes profiles; gaps 2.85635e-5, 2.74159e-5 and 4.28399e-5 exceed 2e-5. The 36-case log and reproduction are recorded in the finding. Default C++ reproduction is the evidence from #2003, not a new fork-parity claim.

Validation on linuxbox (CARGO_BUILD_JOBS=2, nice -n 10, difftest profile with CARGO_PROFILE_DIFFTEST_OPT_LEVEL=1):

  • Full cargo test --profile difftest -p solidcore: 4,414 passed, 0 failed, 37 ignored. Started with the fix on base 2e995abcd; the later main merge was tested separately as below. The ignored cases are existing tests and diagnostic helpers; none were added by this PR.
  • Focused classification unit test: passed (flag-off, non-fillet, strict boundary and different body tolerances).
  • cargo clippy --workspace --all-targets -- -D warnings and wasm32 check: passed again after the latest-main merge.
  • After merging main bba2309b3, at PR head 424b06bee: all four issue Fillet: a round within tolerance of a shallow crease returns Ok with an invalid body (old crease vertex kept) #1999 integration tests passed (80 fillet cases); wr573_offset_wave_export passed 3 tests and wr697_end_and_join passed 7 tests. Formatting, record IDs and frozen-archive checks passed.
  • Native affected-unit checks passed again after the merge: all four units passed, with zero relative error, no failures or deferrals.
  • Full native --green --jobs 4 sweep on 424b06bee: 280 units passed, 0 partial, 0 failed. Of 592,431 cases, 591,650 passed, 762 were rejected, and 19 were parked for recorded upstream defects; 0 failed or deferred. Wall time 1,600.4 seconds. Rejected and parked cases are not counted as successful comparisons.
PASS intersect.curve_class_p5 cases=1411 passed=1409 failed=0 deferred=0 max_rel_err=0e0 rejected=2
PASS blend.fillet_executive_p3 cases=788 passed=786 failed=0 deferred=0 max_rel_err=0e0 rejected=2
PASS query.face_p2 cases=1401 passed=1401 failed=0 deferred=0 max_rel_err=0e0
PASS boolean.topology_intersector_p3 cases=271 passed=271 failed=0 deferred=0 max_rel_err=0e0
Operation Implementation Evidence Remaining gap
SmCurveClassification::IntersectVertices during generic-blend insertion Reject contacts outside the existing body incidence bound before splitting Focused unit test and successful 8-face rounds, Level2/manifold checks, endpoint gaps below 1e-9 * scale; existing default native cases match New opt-in behavior has Rust regression evidence, not fork-native parity evidence
Existing classification and affected callers Default behavior retained Native summary above Successful multi-edge corner construction is outside this change

Status: local validation complete; ready for maintainer review. GitHub CI still requires maintainer approval before jobs run; no successful GitHub CI result is claimed. Final logs were collected after SSH access was restored.

ChrisNourse and others added 4 commits November 3, 2026 01:21
…y-labs#1999)

Known failing matrix captured before the construction fix; run explicitly with --ignored.

Co-Authored-By: Codex <noreply@openai.com>
Reject incompatible contacts during classification before topology splitting; retain the default and non-fillet paths. Add boundary, scaled-model and entity-tolerance regressions.

Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@ChrisNourse
ChrisNourse force-pushed the fix/1999-blend-split-classification branch from b4a1acb to cf9a439 Compare November 3, 2026 09:54
@ChrisNourse ChrisNourse changed the title fix: shallow-crease split topology in the generic blend (#1999) fix: keep generic-blend vertex contacts within body tolerance (#1999) Nov 3, 2026
ChrisNourse and others added 5 commits November 3, 2026 01:59
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@jyviko

jyviko commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Thanks @ChrisNourse, this is a careful fix. Rejecting a contact the finished body can't resolve, before the arc is split at the old vertex, fixes the cause; moving vertices afterwards (#2003) only hid it. The focused test over flag × filleting × distance pins the boundary well.

Three asks before it lands:

  1. Each round face is a definition. Every blend PR now checks this (the S→B contract, The procedural blend's definition kept through SolidCraft's record: a round reopened or split is still solved on S, not its net solidcraft#13822/Check: every face a blend makes is a definition, with a shrinking ledger (#2489) #2505). In new_blend_constructs_valid_shallow_crease_rounds, assert that the round face's surface reports procedural_blend() (an exact round with its bound). If one can't yet, add a Check: every face a blend makes is a definition, with a shrinking ledger (#2489) #2505 ledger entry naming it.
  2. The volume against its closed form, for at least one crease angle. Two planes meeting at interior angle θ, rounded with radius r along a straight edge, lose r²(cot(θ/2) − (π − θ)/2) of cross-section per unit length. Valid, manifold and 8 faces hold for a round that is the wrong size; the volume doesn't. Gate at part-scale rounding.
  3. Rename the test file. issue_1999_current_main_probe.rs describes how it was found, not what it checks. Something like issue_1999_shallow_crease_round_contacts.rs fits the other files. current_main_shallow_crease_matrix is the same, if it stays as a test rather than a probe.

@bherbruck bherbruck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by the automated first-pass review: CI green, mergeable, no CI/build/dependency file changes, no red-flag patterns in added code (process/network/env/unsafe outside FFI/blobs/hidden unicode), 0 known-mismatch entries added. Logic is gated by CI and the difftest merge queue.

@bherbruck
bherbruck merged commit d5455fe into tangency-labs:main Nov 3, 2026
13 checks passed
@jyviko

jyviko commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

@ChrisNourse this merged before my three asks above were in. Could you do them in a small follow-up PR: assert the round face's definition (or add a #2505 ledger entry), check one crease angle's volume against the closed form, and rename the probe file? Thanks again for the fix.

bherbruck added a commit that referenced this pull request Nov 3, 2026
plan: give #2530's record WR-731; WR-723 was already taken, which turned main's CI red
ablasik pushed a commit to ablasik/solidcore that referenced this pull request Nov 3, 2026
…angency-labs#2480's planar-section record)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
bherbruck pushed a commit that referenced this pull request Nov 3, 2026
Address the three post-merge review requests on PR #2530, including descriptive regression names.

Co-Authored-By: Codex <noreply@openai.com>
bherbruck added a commit that referenced this pull request Nov 3, 2026
…view

test: validate shallow crease round definitions and volume (#2530 follow-up)
@jyviko jyviko added this to the Blends complete milestone Nov 6, 2026
@jyviko jyviko moved this to Done in Blends Sprint Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fillet: a round within tolerance of a shallow crease returns Ok with an invalid body (old crease vertex kept)

3 participants