kernel-cases: sheet-metal flange and cut-out cases from #416, #529, #570, #601, #634, #659, #702, #978

A flange beside the leg of an L, along what a cut-out leaves of an edge,
beside a ledge as tall as its setback, a return on a flange's far edge, a
round hole, a slanted slot and an ellipse across a bend, a hundred slots with
four folds, and the refusal of rule values sheet.flange would ignore.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Brennen Herbruck
2026-10-21 05:54:30 -04:00
committed by jyviko
parent b13155cbbf
commit 943a7d66b4
20 changed files with 2510 additions and 0 deletions
@@ -0,0 +1,13 @@
{
"sources": [
"tangency-labs/solidcraft#416",
"tangency-labs/solidcraft#425",
"tangency-labs/solidcraft#1797",
"tangency-labs/solidcraft#1799"
],
"what": "a 160 x 100 plate with a 90 degree flange, unfolded, a 20 mm round hole and a 10 x 24 slot turned 30 degrees cut across the bend zone, refolded: the cut-out walls fold to curves on the bend's cylinder",
"source": "analytic",
"method": "T = 2, R = 1, K = 0.5. Flat area: base 160 x (100 - 3) + bend 160*BA with BA = (pi/2)(1 + 1) = pi + flange straight 160*(30 - 3) = 160*(97 + pi + 27). The cut-outs lie wholly inside it: circle pi*10^2, slot 10*24. With K = 0.5 the neutral axis is the mid-surface, so a through cut of flat area A removes A*t of bent material exactly. V = 2*(160*(124 + pi) - 100*pi - 240)",
"body_count": 1,
"volume_mm3": 39576.99111843078
}
@@ -0,0 +1,126 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "AL2",
"thickness": "2 mm",
"active": true,
"bend_radius": "1 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Plate"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
160,
100
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Plate"
}
},
{
"command": "sheet.flange",
"params": {
"type": "edge",
"edges": [
[
80,
100,
2
]
],
"height": 30,
"angle": 90
}
},
{
"command": "sheet.unfold",
"params": {}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Cuts"
}
},
{
"command": "sketch.circle.center",
"params": {
"center": [
50,
98.570796
],
"diameter": 20
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
116.669873,
85.678491
],
[
125.330127,
90.678491
],
[
113.330127,
111.463101
],
[
104.669873,
106.463101
]
],
"closed": true
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Cuts",
"through_all": true,
"direction": "symmetric",
"operation": "cut"
}
},
{
"command": "sheet.refold",
"params": {}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,12 @@
{
"sources": [
"tangency-labs/solidcraft#529",
"tangency-labs/solidcraft#430",
"tangency-labs/solidcraft#964"
],
"what": "a 200 x 300 panel with a hundred 4.4 x 20 slots and four 90 degree folds (one per side tab): the flat geometry ran out of its processing budget above 77 slots",
"source": "analytic",
"method": "T = 2.5, R = 2.5, K = 0.44. Blank: 200*300 + 2*200*20 + 2*300*20 = 80000 mm2; a slot of overall length 20 and width 4.4 has area 4.4*(20 - 4.4) + pi*2.2^2 = 83.8453; flat volume (80000 - 100*slot)*2.5; the four folds of widths 200, 200, 300 and 300 add theta*w*t^2*(1/2 - K) each, in all (pi/2)*1000*6.25*0.06",
"body_count": 1,
"volume_mm3": 179627.72151170447
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#570",
"tangency-labs/solidcraft#594",
"tangency-labs/solidcraft#572"
],
"what": "sheet.flange given thickness, k_factor and bend_radius, which the rule alone defines, used to ignore them silently and build the 2.5 mm default",
"source": "invariants",
"method": "a base flange asked for a 0.8 mm sheet must either build 0.8 mm (V = 100*60*0.8 = 4800) or refuse; it must never succeed with another thickness. The engine's documented behaviour is the refusal (the rule is the only source of thickness, k-factor and radius), so the right answer here is a clean refusal",
"outcome": "refused"
}
@@ -0,0 +1,37 @@
{
"commands": [
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Base"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
100,
60
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"sketch": "Base",
"thickness": 0.8,
"k_factor": 0.3,
"bend_radius": 0.8
}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#593",
"tangency-labs/solidcraft#601"
],
"what": "an edge flange stands on the far edge of another edge flange (a lip turned in over the base), both 90 degrees",
"source": "analytic",
"method": "T = 2, R = 2, K = 0.5, setback R + T = 4 at each 90 degree bend. Base 100 x 60 trimmed to 100 x 56; wall 20 high to its outer face: straight 20 - 4 (its own bend) - 4 (the return's setback) = 12; return 10 high: straight 10 - 4 = 6; every panel 100 wide. Two 90 degree bends, each (pi/2)((R+T)^2 - R^2)*100/2 = 942.478. V = 2*100*(56 + 12 + 6) + 2*942.478",
"body_count": 1,
"volume_mm3": 16684.955592153878
}
@@ -0,0 +1,77 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel 2",
"thickness": "2 mm",
"active": true,
"bend_radius": "2 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Base"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
100,
60
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Base"
}
},
{
"command": "sheet.flange",
"params": {
"type": "edge",
"edges": [
[
50,
0,
2
]
],
"height": 20
}
},
{
"command": "sheet.flange",
"params": {
"type": "edge",
"edges": [
[
50,
2,
20
]
],
"height": 10
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,21 @@
{
"sources": [
"tangency-labs/solidcraft#634"
],
"what": "the same bar with its leg and a 15 mm inside flange on the bar's top edge, folded",
"source": "analytic",
"method": "the leg stays: bbox y 0..60; the flange stands on the top face of the bar from the base's underside z = 0 to its height 15 (x 0..160 covers the bar and the leg)",
"body_count": 1,
"bbox": {
"min": [
0,
0,
0
],
"max": [
160,
60,
15
]
}
}
@@ -0,0 +1,83 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel 2",
"thickness": "2 mm",
"active": true,
"bend_radius": "1 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Blank"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
0,
0
],
[
160,
0
],
[
160,
30
],
[
20,
30
],
[
20,
60
],
[
0,
60
]
],
"closed": true
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Blank"
}
},
{
"command": "sheet.flange",
"params": {
"edges": [
[
90,
30,
2
]
],
"height": 15,
"angle": 90,
"position": "inside"
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,21 @@
{
"sources": [
"tangency-labs/solidcraft#634"
],
"what": "a 160 x 30 bar with a 20 x 30 leg past its top edge at the left end, and a 90 degree 15 mm inside flange on the bar's top edge (x 20..160), unfolded: the flange's trim cut the leg away",
"source": "analytic",
"method": "T = 2, R = 1, K = 0.5, BD(90) = 2*3 - pi = 2.8584. The setback strip is taken off the flange's own edge only, so the leg (y up to 60) stays and the flat reaches 15 - BD = 12.1416 past the bar's top edge, which is below the leg's top: bbox x 0..160, y 0..60, z 0..2",
"body_count": 1,
"bbox": {
"min": [
0,
0,
0
],
"max": [
160,
60,
2
]
}
}
@@ -0,0 +1,87 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel 2",
"thickness": "2 mm",
"active": true,
"bend_radius": "1 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Blank"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
0,
0
],
[
160,
0
],
[
160,
30
],
[
20,
30
],
[
20,
60
],
[
0,
60
]
],
"closed": true
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Blank"
}
},
{
"command": "sheet.flange",
"params": {
"edges": [
[
90,
30,
2
]
],
"height": 15,
"angle": 90,
"position": "inside"
}
},
{
"command": "sheet.unfold",
"params": {}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#659",
"tangency-labs/solidcraft#692"
],
"what": "a 160 x 100 plate with a 90 degree flange, unfolded, a 24 x 12 ellipse cut across the bend zone and refolded: the cut's wall folds to a curve on the bend's cylinder",
"source": "analytic",
"method": "T = 2, R = 1, K = 0.5: flat area 160*(97 + pi + 27) as in the round-hole case; the ellipse (semi-axes 12 and 6, area 72*pi) lies inside the flat. With K = 0.5 a through cut of flat area A removes A*t of the folded part: V = 2*(160*(124 + pi) - 72*pi)",
"body_count": 1,
"volume_mm3": 40232.92030703181
}
@@ -0,0 +1,106 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "AL2",
"thickness": "2 mm",
"active": true,
"bend_radius": "1 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Plate"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
160,
100
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Plate"
}
},
{
"command": "sheet.flange",
"params": {
"type": "edge",
"edges": [
[
80,
100,
2
]
],
"height": 30,
"angle": 90
}
},
{
"command": "sheet.unfold",
"params": {}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Ellipse"
}
},
{
"command": "sketch.ellipse",
"params": {
"center": [
80,
98.570796
],
"major": [
92,
98.570796
],
"minor_radius": 6
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Ellipse",
"through_all": true,
"direction": "symmetric",
"operation": "cut"
}
},
{
"command": "sheet.refold",
"params": {}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#659",
"tangency-labs/solidcraft#692"
],
"what": "a 20 x 12 ellipse cut through a 100 x 60 x 2.5 sheet: it became 0.001 mm chords, one face each",
"source": "analytic",
"method": "semi-axes 10 and 6: area pi*10*6 = 60*pi; V = 100*60*2.5 - 60*pi*2.5 = 15000 - 150*pi",
"body_count": 1,
"volume_mm3": 14528.76110196153
}
@@ -0,0 +1,83 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel (mm)",
"thickness": "2.5 mm",
"active": true,
"bend_radius": "2.5 mm",
"k_factor": 0.44
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Base"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
100,
60
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Base"
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Ellipse"
}
},
{
"command": "sketch.ellipse",
"params": {
"center": [
50,
30
],
"major": [
60,
30
],
"minor_radius": 6
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Ellipse",
"through_all": true,
"direction": "symmetric",
"operation": "cut"
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#702"
],
"what": "a 200 x 100 plate whose bottom-left 100 x 60 is cut away, and a 90 degree 40 mm inside flange picked on what is left of the bottom edge (x 100..200)",
"source": "analytic",
"method": "T = 2, R = 1, K = 0.5. The flange runs only along the 100 mm the cut leaves of the edge. Plate 200*100 - 100*60 = 14000, less the 3 mm setback (R + T) strip along that stretch 100*3 = 300: 13700. Flange: bend flat BA = (pi/2)(R + K t) = pi, straight 40 - (R+T) = 37, both 100 wide: 100*(pi + 37). With K = 0.5 the neutral axis is the mid-surface, so the folded volume is the flat area times t: V = 2*(13700 + 100*(pi + 37))",
"body_count": 1,
"volume_mm3": 35428.31853071796
}
@@ -0,0 +1,97 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel 2",
"thickness": "2 mm",
"active": true,
"bend_radius": "1 mm",
"k_factor": 0.5
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Plate"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
200,
100
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Plate"
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Cut"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
-10,
-10
],
"p1": [
100,
60
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Cut",
"through_all": true,
"direction": "symmetric",
"operation": "cut"
}
},
{
"command": "sheet.flange",
"params": {
"edges": [
[
150,
0,
2
]
],
"height": 40,
"angle": 90,
"position": "inside"
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,9 @@
{
"sources": [
"tangency-labs/solidcraft#978"
],
"what": "a 90 degree inside flange of radius 1 on an edge that has a ledge beside it exactly as tall as the flange's setback (3 mm): sew failed with a degenerate edge",
"source": "invariants",
"method": "T = 2, flange R = 1: setback R + T = 3 and the ledge (x 97..100, y 0..3) is exactly that tall, so the trim line runs along the ledge's top; the right answer is one valid closed body (the ledge goes with the setback strip), with no graded volume because the flange's extent along the ledge has no single reading",
"body_count": 1
}
@@ -0,0 +1,84 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Rule",
"thickness": "2 mm",
"active": true,
"bend_radius": "2 mm"
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Outline"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
0,
0
],
[
100,
0
],
[
100,
3
],
[
97,
3
],
[
97,
60
],
[
0,
60
]
],
"closed": true
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Outline"
}
},
{
"command": "sheet.flange",
"params": {
"type": "edge",
"edges": [
[
50,
0,
2
]
],
"height": 20,
"radius": 1,
"position": "inside",
"body": "Body1"
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}