Skip to content

Fillet: round the rim of an extruded teardrop, whose rail runs past the corner at its tip - #2499

Merged
bherbruck merged 3 commits into
tangency-labs:mainfrom
khanahmad4527:fix-2498-teardrop-rim
Nov 3, 2026
Merged

bherbruck merged 3 commits into
tangency-labs:mainfrom
khanahmad4527:fix-2498-teardrop-rim

Conversation

@khanahmad4527

@khanahmad4527 khanahmad4527 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rounding the rim of an extruded teardrop failed because the blend's overflow check took the round's rail, where it runs on past the corner at the teardrop's tip, for a rail running off the face. The check now knows where the corner at a closed edge's own vertex cuts the rail, so the rim is rounded: a clean body whose volume matches the closed form of a round mitred at the tip.

Evidence

The failing test was committed first (ae5cd30), then the fix (9e3fda9).

  • a_closed_convex_rim_meeting_itself_at_an_angle_is_rounded in crates/solidcore/tests/wr697_end_and_join.rs: the teardrop prism (one closed cubic B-spline, swept 10 up z) has its top rim rounded r 0.5 and r 1 with every fix but geometric_g2_continuity on. Before: do_fillet fails with "edge without primary edge use". After: a body clean at check level 2, 5 faces, volume against the closed form 10 A - L r^2 (1 - pi/4) + (3 pi/4 + 1) r^3 (5/3 - pi/2). The profile's area A and length L are computed in the test with its own Cox-de Boor and Gauss-Legendre, not by the kernel.
r volume closed form relative
0.5 1217.172410518837 1217.173343116084 -7.7e-7
1 1210.854023851367 1210.854252217567 -1.9e-7

The test gates at 1e-6. A corner built other than as a mitre (a ball or a setback) would move the volume by about 0.3 r^3, which is 3.3e-5 of it at r 0.5.

  • Every integration test that turns a generic-blend flag on (87 files that set fillet_blend_corner, fillet_gn_section_generator, fillet_cliff_overflow, fillet_overflow_trim_at_creases, fillet_refuse_rails_leaving_faces, or all flags) was run in release with --nocapture --test-threads=1, with and without the fix. With timings left out, the outputs are identical apart from the new test. Three tests fail locally in release on both sides, so they are not caused by this change: fork_smlib104_setback_corner (three volumes differ at about 1e-9 relative), issue_1945_fork_1207_step4::step4_round_upstream_solve_keeps_short_trim_span, and issue_2371_gn_section_cancel::a_token_fired_from_another_thread_stops_the_boss_root_round_soon (a timing test).
  • cargo test --release -p solidcore --lib blend::: 468 passed.
  • cargo fmt --all --check, cargo clippy -p solidcore --all-targets -- -D warnings, cargo check -p solidcore --target wasm32-unknown-unknown, python3 -I scripts/ci/check_record_ids.py and scripts/ci/check-frozen-archives.sh: clean.
  • With the default flags, and with every fix but fillet_blend_corner, the rim also builds (5 faces, clean). The default flags never reach this check.

Merge danger

Low. The change only applies when fillet_refuse_rails_leaving_faces is on and the rounded edge is closed (both ends at one vertex), and only to the first or last stretch of a rail that runs off its face. It accepts a stretch the old check refused only when that stretch lies beyond the corner's cutting plane, so a closed rim really too wide for its face is still taken as an overflow. No other test output changed. This is a solidcore change to a fork function; the fork at v1.1.0-alpha has the same flaw. It is recorded in a findings addendum, like the earlier changes to this check (#1580, #2175).

Details

Cause. RailsFitTheirFaces lets a rail leave its face only past an end of the filleted edge: across the face's side edge at that end, or where the edge point nearest the rail is the end (LeavesPastAnEnd). A closed edge that meets itself at an angle has one vertex for both ends, and the top face it bounds alone has no side edge there. Untrimmed, the rail of one end's blend runs on past the two rails' crossing, which is where the corner cuts it, and crosses the rim's other stretch r / sin(a) from the tip (a is the corner's interior angle). The edge point nearest that crossing is the crossing itself, not an end. So the round was taken for a cliff overflow. TrimAtCreases then imprinted the side face's rail, which runs from the seam round to the seam, without splitting the face, and left an edge with no edge use.

Fix. In crates/solidcore/src/blend/fillet_solver/p5/rails_fit.rs, past_closed_corner also counts a first or last off-face stretch as past an end when the filleted edge is closed and the stretch lies beyond the plane on which the corner at its vertex cuts the rail. That plane goes through the vertex, normal to T0 + T1, the sum of the edge's unit tangents at its start and end (for a G1 closure it is the cross section there). Where the rail comes onto the face it still has to cross that plane, and where it leaves the face it has already crossed it.

Generic blend. The overflow check is the rim event of the generic blend (docs/generic-blend.md §3: a rail reaching its face's boundary), so the fix is in the new path, not in old code. The corner at the tip is still SmFilletNx1ClosedCorner, as in the fork at v1.1.0-alpha, and builds the mitre. The closed edge's own corner event that replaces it is tangency-labs/solidcraft#13828, and it keeps this check. No case of SolidCraft's kernel rig changes, so docs/generic-blend.md §7 is unchanged.

Not fixed here. Imprinting a closed rail that runs from a face's seam round to the same seam does not split the face (merge_curves_on_surface). It is no longer reached in this case, which no longer goes to TrimAtCreases.

Record: plan/findings/blend.fillet_solver_p5--fork-rails-fit-their-faces--addendum-2026-11-03-closed-edge-past-its-corner.md.

Related: #2436 (the concave foot of the same teardrop), tangency-labs/solidcraft#13828, #2381, #2243.

Fixes #2498

khanahmad4527 and others added 3 commits November 3, 2026 10:38
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tangency-labs#2498)

The teardrop prism's top rim is one closed convex edge meeting itself at a
right angle at the tip. Rounded r 0.5 and r 1 with every generic-blend flag
on, it should be a clean body of five faces whose volume matches the closed
form of a round mitred at the tip (the profile's inner parallel sets, its area
and length computed in the test). It fails today in do_fillet with "edge
without primary edge use".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gency-labs#2498)

The overflow check (RailsFitTheirFaces) lets a rail leave its face past an
end of the filleted edge: across the face's side edge at that end, or where
the edge point nearest the rail is the end. A closed edge that meets itself
at an angle has one vertex for both ends, and the face it bounds alone has no
side edge there. The rail of one end's blend runs on past the rails' crossing,
where the corner cuts it, and crosses the edge's other stretch near the
vertex; the nearest edge point is that crossing, not an end. So a teardrop's
rim was taken for a cliff overflow, and the trim at its creases then failed
with "edge without primary edge use".

A first or last run off the face is now also past an end when the edge is
closed and the run lies beyond the plane on which the corner at its vertex
cuts the rail: through the vertex, normal to the sum of the edge's end
tangents. The rail comes onto the face still to cross that plane, or leaves
it having crossed it. Runs on the blend's own side of the plane are judged
as before. Only reached with fillet_refuse_rails_leaving_faces.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@khanahmad4527 khanahmad4527 changed the title Rounding the rim of an extruded teardrop (a closed edge meeting itself at an angle) Fillet: round the rim of an extruded teardrop, whose rail runs past the corner at its tip Nov 3, 2026
@khanahmad4527
khanahmad4527 marked this pull request as ready for review November 3, 2026 06:16

@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 fb937dd into tangency-labs:main Nov 3, 2026
13 checks passed
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 3, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 5, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 5, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 6, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 6, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Karl-VonRichter added a commit to Karl-VonRichter/solidcore that referenced this pull request Nov 6, 2026
Exercise the sharper teardrop through solver geometry under defaults and the new-blend flags after tangency-labs#2499. Check both split vertices retain zero tolerance and unlinked ownership, and keep the valid small-radius body control in both profiles. Record the relationship to the right-angle overflow regression, the fork allocation contract, the tests-first history and fresh post-rebase verification without changing geometry or tolerances.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Karl Von Richter<karl@embeint.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fillet: rounding the rim of an extruded teardrop (one closed B-spline edge) fails with "edge without primary edge use"

2 participants