kernel-cases: fillets refusal, fit and straight-edge cases from #190, #199, #324, #896, #1668, #2752, #2852, #3369, #3435, #4141, #4143

Rounds with their own right answers: a radius larger than the ring it runs along (refused), a pick on a smooth seam (refused), a far edge pick (refused), a round that uses up an end face or a wall, a round over a hole, rounds on both sides of a thin wall and concentric with an inner one, a round on a sphere's flat cut, an edge ending on a tangent seam, and rims on B-spline ramps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Brennen Herbruck
2026-10-21 06:08:47 -04:00
committed by jyviko
parent aefca34522
commit 18af04b919
26 changed files with 1167 additions and 0 deletions
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#1668",
"tangency-labs/solidcraft#1720"
],
"what": "an R5 round on an outer top edge and the matching inner (concave) edge of a 2 mm wall in one feature fits, as it does one after the other",
"source": "analytic",
"method": "box 100x60x40 shelled outward 2 mm with the bottom face open: outer box 104x64x42 minus the 100x60x40 cavity = 39552. The outer round (convex, length 104) removes (1-pi/4) 25 x 104; the inner round (concave, length 100) adds (1-pi/4) 25 x 100. The two quarter-circle arcs (centres (y=27,z=37) and (25,35)) stay 2.8 mm apart at their closest, so the wall never breaks through and nothing overlaps. V = 39552 - 21.46 = 39530.5.",
"body_count": 1,
"volume_mm3": 39530.53981633975
}
@@ -0,0 +1,52 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"corner": [
-50,
-30,
0
],
"length": 100,
"width": 60,
"height": 40,
"body_name": "Case"
}
},
{
"command": "solid.shell",
"params": {
"body": "Case",
"faces": [
[
0,
0,
0
]
],
"thickness": 2,
"direction": "outside"
}
},
{
"command": "solid.fillet",
"params": {
"body": "Case",
"radius": 5,
"edges": [
[
0,
32,
42
],
[
0,
30,
40
]
]
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#190",
"tangency-labs/solidcraft#318"
],
"what": "an R2 round of the top edge of a disc 2 mm high (the round is as tall as the wall, so it meets the bottom face)",
"source": "analytic",
"method": "disc R13 x 2: V0 = pi 169 * 2. R2 on the top circle: (1-pi/4) r^2 (2 pi R - 2 pi x r) with x r = r (5/6-pi/4)/(1-pi/4) = 0.4465 the spandrel centroid offset (Pappus) = 67.706 removed; the round is a quarter torus from the top face down to the bottom face, so the wall is used up. V = 994.152.",
"body_count": 1,
"volume_mm3": 994.1518798118414
}
@@ -0,0 +1,24 @@
{
"commands": [
{
"command": "solid.cylinder",
"params": {
"radius": 13,
"height": 2
}
},
{
"command": "solid.fillet",
"params": {
"radius": 2,
"edges": [
[
13,
0,
2
]
]
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#199",
"tangency-labs/solidcraft#317"
],
"what": "an R3 round on the four vertical edges of a 14x6x10 box: the two rounds on each 6 mm end face meet exactly (the face is used up)",
"source": "analytic",
"method": "box 14x6x10, R3 = half the end width on the four vertical edges: the two rounds of each end meet in a half cylinder, the section is a stadium: area 14*6 - (4-pi)*3^2 = 76.274, V = 762.74.",
"body_count": 1,
"volume_mm3": 762.7433388230814
}
@@ -0,0 +1,40 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 14,
"width": 6,
"height": 10
}
},
{
"command": "solid.fillet",
"params": {
"radius": 3,
"edges": [
[
0,
0,
5
],
[
14,
0,
5
],
[
14,
6,
5
],
[
0,
6,
5
]
]
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#2752",
"tangency-labs/solidcraft#2787"
],
"what": "an R1 round round the rim of a radius-2 sphere cut flat at z=1",
"source": "analytic",
"method": "sphere R2 with everything above z=1 cut away: V = 32 pi/3 - pi h^2 (3R - h)/3 with h=1 -> 32 pi/3 - 5 pi/3. The R1 rolling ball is tangent to the plane z=1 and (inside) to the sphere: its centre is on the circle of radius 1 at z=0 (distance R-r=1 from the origin), so the round is a torus piece. Removed = revolve of the region between z=0..1, sphere rho^2 = 4 - z^2 and the round rho = 1 + sqrt(1 - z^2): pi * integral over z in 0..1 of [4 - z^2 - (1 + sqrt(1-z^2))^2] dz = pi * integral of [2 - 2 sqrt(1-z^2)] = 2 pi (1 - pi/4) = 1.348. V = 28.274 - 1.348 = 26.9260.",
"body_count": 1,
"volume_mm3": 26.92595077567323
}
@@ -0,0 +1,41 @@
{
"commands": [
{
"command": "solid.sphere",
"params": {
"radius": 2,
"body_name": "Ball"
}
},
{
"command": "solid.box",
"params": {
"length": 6,
"width": 6,
"height": 3,
"corner": [
-3,
-3,
1
],
"operation": "cut",
"targets": [
"Ball"
]
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
1.7320508075688772,
0,
1
]
],
"radius": 1
}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#2852"
],
"what": "an R18 round on the outside top edges of a 3 mm thick upside-down U, concentric with the R15 round of its inside edges",
"source": "analytic",
"method": "box 245x218x236 with a 239 wide cut from below up to z=233: walls 3 mm, top 3 mm, V0 = 245*218*236 - 239*218*233. R15 on the two inside top edges (concave, length 218) adds (1-pi/4) 225 x 218 each; R18 on the two outside top edges (convex) removes (1-pi/4) 324 x 218 each. The two rounds have the same centre (18, 218 in x,z), so the wall stays exactly 3 mm thick and nothing overlaps: V = V0 + 2 (1-pi/4) 218 (225 - 324) = 455730.93.",
"body_count": 1,
"volume_mm3": 455730.92632488743
}
@@ -0,0 +1,66 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 245,
"width": 218,
"height": 236,
"body_name": "U"
}
},
{
"command": "solid.box",
"params": {
"corner": [
3,
-1,
-1
],
"length": 239,
"width": 220,
"height": 234,
"operation": "cut",
"targets": [
"U"
]
}
},
{
"command": "solid.fillet",
"params": {
"radius": 15,
"edges": [
[
3,
109,
233
],
[
242,
109,
233
]
]
}
},
{
"command": "solid.fillet",
"params": {
"radius": 18,
"edges": [
[
0,
109,
236
],
[
245,
109,
236
]
]
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#324",
"tangency-labs/solidcraft#1885"
],
"what": "a 4 mm fillet on a top edge whose round overlaps the rim of a through hole (the hole breaks into the round)",
"source": "analytic",
"method": "block 40x20x10 minus a through hole of r=3 centred (20,14.5), then R4 on the top long edge at y=20 (round covers y=16..20, removes 40*(16-4pi) = 137.35 from the plain block). Where the hole reaches into the round (y>16) the two removals overlap: that volume is counted twice by 137.35 + 282.74, so add it back: overlap = integral over y from 16 to 17.5 of [4 - sqrt(16-(y-16)^2)] (height removed by the round) x 2 sqrt(9-(y-14.5)^2) (chord of the hole) dy = 0.3758 (Simpson, 40000 steps). V = 8000 - 9*pi*10 - 40*(16-4*pi) + overlap = 7580.287.",
"body_count": 1,
"volume_mm3": 7580.287315360674
}
@@ -0,0 +1,60 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"corner": [
0,
0,
0
],
"length": 40,
"width": 20,
"height": 10,
"body_name": "Block"
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "H"
}
},
{
"command": "sketch.circle.center",
"params": {
"center": [
20,
14.5
],
"radius": 3
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "H",
"distance": "10 mm",
"operation": "cut"
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
10,
20,
10
]
],
"radius": "4 mm"
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#3369",
"tangency-labs/solidcraft#3922"
],
"what": "an R2 round on a straight edge whose ends sit on the tangent seam between a flat top and a rounded end",
"source": "analytic",
"method": "bar with a stadium cross-section (rectangle 25 x 19 and two half discs of R9.5, area 25*19 + pi*9.5^2) extruded 14 along X; a slot x 3.5..9.5 cuts away the y<0 half of the round end (half disc, pi*9.5^2/2 * 6); the sharp edge left between the flat top and the slot floor (length 6) is rounded with R2, removing (1 - pi/4) r^2 L = (1 - pi/4)*4*6. V = 14*(475 + pi*90.25) - 6*pi*90.25/2 - 24*(1 - pi/4). The round ends on the slot walls, where only the 6 mm strip is affected.",
"body_count": 1,
"volume_mm3": 9763.665662772806
}
@@ -0,0 +1,113 @@
{
"commands": [
{
"command": "sketch.create",
"params": {
"plane": "YZ",
"name": "Stadium"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
0,
-9.5
],
[
25,
-9.5
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
25,
0
],
"start": [
25,
-9.5
],
"end": [
25,
9.5
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
25,
9.5
],
[
0,
9.5
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
0,
0
],
"start": [
0,
9.5
],
"end": [
0,
-9.5
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Stadium",
"distance": 14
}
},
{
"command": "solid.box",
"params": {
"corner": [
3.5,
-12,
-10
],
"length": 6,
"width": 12,
"height": 20,
"operation": "cut"
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
6.5,
0,
9.5
]
],
"radius": 2
}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#3435",
"tangency-labs/solidcraft#3441"
],
"what": "a fillet of radius 6.9 on a cylinder rim whose flat top ring (round the joined boss) is only 4.3 mm wide must be refused, not grow the part",
"source": "invariants",
"method": "cylinder radius 7, boss radius 2.7 flush on its top face: the flat ring round the boss is 7 - 2.7 = 4.3 mm wide, and a rolling-ball round of radius 6.9 needs 6.9 mm of top face (for a convex rim the round consumes r of each neighbouring face). No such round exists, so the right answer is a clean refusal; accepting it produced a body larger than before the fillet (a round only removes material).",
"outcome": "refused"
}
@@ -0,0 +1,37 @@
{
"commands": [
{
"command": "solid.cylinder",
"params": {
"radius": 7,
"height": 48.2
}
},
{
"command": "solid.cylinder",
"params": {
"radius": 2.7,
"height": 2,
"base": [
0,
0,
48.2
],
"operation": "join"
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
7,
0,
48.2
]
],
"radius": 6.9
}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#3779",
"tangency-labs/solidcraft#3804"
],
"what": "a 0.1 mm fillet on all eight top-rim spans of a 20 x 20 pillow whose four sides are fit splines (two cubic spans each)",
"source": "invariants",
"method": "closed profile of four fit-point splines, each through (0,0), (10,-3), (20,0) and its quarter-turn rotations about (10,10), extruded 10: the rim is a smooth chain of eight spline spans meeting at the four corners. A 0.1 mm equal setback is tiny against every face (10 mm tall walls, a 20 mm top), so it must build, and the body stays one closed valid solid. The area inside the splines has no closed form here (the spline end conditions are not fixed by the construction), so only validity is graded.",
"body_count": 1
}
@@ -0,0 +1,145 @@
{
"commands": [
{
"command": "sketch.create",
"params": {
"plane": "XY"
}
},
{
"command": "sketch.spline.fit_point",
"params": {
"points": [
[
0,
0
],
[
10,
-3
],
[
20,
0
]
]
}
},
{
"command": "sketch.spline.fit_point",
"params": {
"points": [
[
20,
0
],
[
23,
10
],
[
20,
20
]
]
}
},
{
"command": "sketch.spline.fit_point",
"params": {
"points": [
[
20,
20
],
[
10,
23
],
[
0,
20
]
]
}
},
{
"command": "sketch.spline.fit_point",
"params": {
"points": [
[
0,
20
],
[
-3,
10
],
[
0,
0
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"distance": 10,
"body_name": "Pillow"
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
4.8592,
-2.0044,
10
],
[
15.1408,
-2.0044,
10
],
[
22.0044,
4.8592,
10
],
[
22.0044,
15.1408,
10
],
[
15.1408,
22.0044,
10
],
[
4.8592,
22.0044,
10
],
[
-2.0044,
15.1408,
10
],
[
-2.0044,
4.8592,
10
]
],
"radius": 0.1
}
}
]
}
@@ -0,0 +1,9 @@
{
"sources": [
"tangency-labs/solidcraft#4141"
],
"what": "an R5 round on the corner edge left by a wedge cut through a body vertex next to a B-spline face",
"source": "invariants",
"method": "plate with a cubic B-spline ramp, a tapered wedge cut through all, then R5 on the sharp vertical corner edge the wedge leaves at (-28,39): a plain convex edge with room for R5 (the wedge walls are 5.5 mm and more). A retried boolean must not leave a micro-edge that makes the round fail. One closed valid solid is the only thing graded.",
"body_count": 1
}
@@ -0,0 +1,153 @@
{
"commands": [
{
"command": "sketch.create",
"params": {
"name": "Side",
"plane": "YZ"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
-39,
5
],
[
-39,
0
],
[
60,
0
],
[
60,
10
]
]
}
},
{
"command": "sketch.spline.control_point",
"params": {
"points": [
[
60,
10
],
[
49.5,
10
],
[
49.5,
5
],
[
39,
5
]
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
39,
5
],
[
-39,
5
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"body_name": "Plate",
"direction": "symmetric",
"distance": 56,
"name": "Pad",
"sketch": "Side"
}
},
{
"command": "sketch.create",
"params": {
"name": "Wedge",
"plane": "XY"
}
},
{
"command": "sketch.line",
"params": {
"closed": true,
"points": [
[
-28,
39
],
[
-23.5,
55
],
[
-23.5,
66
],
[
-29,
66
],
[
-29,
39
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"direction": "symmetric",
"name": "TaperCut",
"operation": "cut",
"sketch": "Wedge",
"targets": [
"Plate"
],
"through_all": true
}
},
{
"command": "solid.fillet",
"params": {
"body": "Plate",
"edges": [
[
-28,
39,
2.5
]
],
"name": "CornerFillet",
"radius": 5
}
}
]
}
@@ -0,0 +1,9 @@
{
"sources": [
"tangency-labs/solidcraft#4143"
],
"what": "an R4 round on the rim of an R5 notch where its cylinder meets an extruded B-spline ramp, both ends running into a square wall",
"source": "invariants",
"method": "a plate extruded from a profile with a cubic B-spline ramp, a 30 mm slot with an R5 half-round relief notch cut through it; the edge where the notch cylinder meets the ramp is an ordinary smooth-surface convex edge with room for R4 (the same fillet works on a flat top and in another CAD). No closed form for the removed volume, so only validity is graded: one closed valid solid.",
"body_count": 1
}
@@ -0,0 +1,184 @@
{
"commands": [
{
"command": "sketch.create",
"params": {
"name": "Side",
"plane": "YZ"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
-39,
5
],
[
-39,
0
],
[
60,
0
],
[
60,
10
]
]
}
},
{
"command": "sketch.spline.control_point",
"params": {
"points": [
[
60,
10
],
[
49.5,
10
],
[
49.5,
5
],
[
39,
5
]
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
39,
5
],
[
-39,
5
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"body_name": "Plate",
"direction": "symmetric",
"distance": 56,
"name": "Pad",
"sketch": "Side"
}
},
{
"command": "sketch.create",
"params": {
"name": "Slot",
"plane": "XY"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
-15,
66
],
[
-15,
50
],
[
-5,
50
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
0,
50
],
"end": [
5,
50
],
"start": [
-5,
50
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
5,
50
],
[
15,
50
],
[
15,
66
],
[
-15,
66
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"direction": "symmetric",
"name": "SlotCut",
"operation": "cut",
"sketch": "Slot",
"targets": [
"Plate"
],
"through_all": true
}
},
{
"command": "solid.fillet",
"params": {
"body": "Plate",
"edges": [
[
0,
45,
5.72
]
],
"name": "NotchFillet",
"radius": 4
}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#783",
"tangency-labs/solidcraft#820"
],
"what": "a fillet whose edge pick is 15 mm from the nearest edge must be refused, not applied to some other edge",
"source": "invariants",
"method": "box 20x20x10 and a pick at (10,-15,10): the nearest edge is the top front edge, 15 mm away, so the pick names no edge. The right answer is a clean refusal (never silently rounding the nearest edge).",
"outcome": "refused"
}
@@ -0,0 +1,25 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 20,
"width": 20,
"height": 10
}
},
{
"command": "solid.fillet",
"params": {
"edges": [
[
10,
-15,
10
]
],
"radius": 1
}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#896",
"tangency-labs/solidcraft#936"
],
"what": "a fillet picked on the seam where a rounded edge runs tangent into the flat top has no corner to round and is refused as an invalid pick",
"source": "invariants",
"method": "box 40x30x20 with all 12 edges rounded R3 (faces: 6 planes, 12 quarter cylinders, 8 sphere octants). The line at y=3 along the top where the flat top meets the R3 round tangentially is a smooth edge (dihedral 180 degrees): there is no corner to fillet, so the pick is refused with a clean error, never a result.",
"outcome": "refused"
}
@@ -0,0 +1,93 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20
}
},
{
"command": "solid.fillet",
"params": {
"radius": 3,
"edges": [
[
20,
0,
0
],
[
20,
30,
0
],
[
20,
0,
20
],
[
20,
30,
20
],
[
0,
15,
0
],
[
40,
15,
0
],
[
0,
15,
20
],
[
40,
15,
20
],
[
0,
0,
10
],
[
40,
0,
10
],
[
0,
30,
10
],
[
40,
30,
10
]
]
}
},
{
"command": "solid.fillet",
"params": {
"radius": 1,
"edges": [
[
20,
3,
20
]
]
}
}
]
}