kernel-cases: sheet-metal convert and hole cases from #774, #1040, #1092, #3316, #541, #542, #560, #955

Plates converted to sheet metal (holes, long thin strips, engraving, a
channel with modelled bends, position kept) and holes and cut-outs
through or into a sheet; volumes by hand from the plate and the holes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Brennen Herbruck
2026-10-21 05:49:22 -04:00
committed by jyviko
parent 3c465e6801
commit a11a736ce8
20 changed files with 966 additions and 0 deletions
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#1040"
],
"what": "a 1200 x 100 x 1 strip (diagonal over 1000 times its thickness) converted to sheet metal: refused with no outline on that face",
"source": "analytic",
"method": "V = 1200*100*1 = 120000 mm3, area 2*1200*100 + 2*(1200+100)*1 = 242600 mm2",
"body_count": 1,
"volume_mm3": 120000.0,
"area_mm2": 242600.0
}
@@ -0,0 +1,28 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 1200,
"width": 100,
"height": 1,
"body_name": "Plate"
}
},
{
"command": "sheet.convert",
"params": {
"body": "Plate",
"face": [
480,
25,
1
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#1040"
],
"what": "a 990 x 100 x 1 strip with holes of 10, 4, 2 and 1 mm: the 1 mm hole fell out of the outline when the mesh sagged by almost the thickness",
"source": "analytic",
"method": "V = 990*100*1 - (pi/4)(10^2 + 4^2 + 2^2 + 1^2)*1 = 99000 - 30.25*pi",
"body_count": 1,
"volume_mm3": 98904.9668222289
}
@@ -0,0 +1,72 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 990,
"width": 100,
"height": 1,
"body_name": "Plate"
}
},
{
"command": "solid.hole",
"params": {
"position": [
100,
50,
1
],
"diameter": 10
}
},
{
"command": "solid.hole",
"params": {
"position": [
300,
50,
1
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
500,
50,
1
],
"diameter": 2
}
},
{
"command": "solid.hole",
"params": {
"position": [
700,
50,
1
],
"diameter": 1
}
},
{
"command": "sheet.convert",
"params": {
"body": "Plate",
"face": [
480,
25,
1
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#1092",
"tangency-labs/solidcraft#1314"
],
"what": "a U channel modelled with its bend radii (R2 inside, R4 outside), a 6 mm hole in one wall and a label engraved 0.2 deep in its web, converted at the bends' outer arcs",
"source": "analytic",
"method": "rule T = 2, R = 2 equals the modelled bends, so the converted sheet is the solid itself. Section: two legs 26 x 2, web 32 x 2, two quarter annuli of radii 2 and 4 (pi(16-4)/4 = 3*pi each): 104 + 64 + 6*pi = 186.850 mm2, over 100 mm; minus the hole pi*3^2*2 and the label 20*10*0.2",
"body_count": 1,
"volume_mm3": 18588.40692438926
}
@@ -0,0 +1,260 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Shop",
"thickness": "2 mm",
"active": true,
"bend_radius": "2 mm",
"k_factor": 0.4
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "U"
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
0,
30
],
[
0,
4
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
4,
4
],
"start": [
0,
4
],
"end": [
4,
0
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
4,
0
],
[
36,
0
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
36,
4
],
"start": [
36,
0
],
"end": [
40,
4
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
40,
4
],
[
40,
30
],
[
38,
30
],
[
38,
4
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
36,
4
],
"start": [
36,
2
],
"end": [
38,
4
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
36,
2
],
[
4,
2
]
]
}
},
{
"command": "sketch.arc.center_point",
"params": {
"center": [
4,
4
],
"start": [
2,
4
],
"end": [
4,
2
]
}
},
{
"command": "sketch.line",
"params": {
"points": [
[
2,
4
],
[
2,
30
],
[
0,
30
]
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "U",
"distance": 100,
"body_name": "Channel"
}
},
{
"command": "solid.hole",
"params": {
"position": [
40,
18,
30
],
"diameter": 6,
"depth": 3
}
},
{
"command": "sketch.create",
"params": {
"plane": "XZ",
"name": "Label"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
10,
-60
],
"p1": [
30,
-70
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Label",
"distance": 0.2,
"operation": "cut"
}
},
{
"command": "sheet.convert",
"params": {
"body": "Channel",
"face": [
20,
0,
20
],
"rule": "Shop",
"bends": [
[
1.172,
1.172,
50
],
[
38.828,
1.172,
50
]
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,12 @@
{
"sources": [
"tangency-labs/solidcraft#1092",
"tangency-labs/solidcraft#1314"
],
"what": "a 60 x 40 x 1 plate with a 20 x 10 x 0.1 engraving in its top face converted to sheet metal (refused as not a plate of even thickness; the engraving becomes a pocket of the sheet)",
"source": "analytic",
"method": "V = 60*40*1 - 20*10*0.1 = 2380; area = top 2400 + bottom 2400 + rim 2*(60+40)*1 = 200 + engraving walls 2*(20+10)*0.1 = 6 (the floor replaces the removed top area) = 5006",
"body_count": 1,
"volume_mm3": 2380.0,
"area_mm2": 5006.0
}
@@ -0,0 +1,45 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 1,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 20,
"width": 10,
"height": 0.1,
"corner": [
20,
15,
0.9
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "sheet.convert",
"params": {
"body": "Plate",
"face": [
30,
20,
0
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,28 @@
{
"sources": [
"tangency-labs/solidcraft#3316"
],
"what": "a 100 x 60 x 2 plate converted from its top face moved down by one thickness (z -2..0 instead of 0..2)",
"source": "analytic",
"method": "the plate stays where it was: box 100 x 60 x 2 from the origin, V = 12000, A = 2*(6000 + 200 + 120) = 12640, centre (50, 30, 1)",
"body_count": 1,
"volume_mm3": 12000.0,
"area_mm2": 12640.0,
"center_of_mass": [
50,
30,
1
],
"bbox": {
"min": [
0,
0,
0
],
"max": [
100,
60,
2
]
}
}
@@ -0,0 +1,28 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 100,
"width": 60,
"height": 2,
"body_name": "Plate"
}
},
{
"command": "sheet.convert",
"params": {
"body": "Plate",
"face": [
40,
15,
2
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#541"
],
"what": "a solid.box cut straight through a 100 x 60 x 2.5 sheet was refused, though the same rectangle as an extrude cut works",
"source": "analytic",
"method": "V = 100*60*2.5 - 10*10*2.5 = 14750",
"body_count": 1,
"volume_mm3": 14750.0
}
@@ -0,0 +1,63 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel",
"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": "solid.box",
"params": {
"corner": [
20,
20,
-1
],
"length": 10,
"width": 10,
"height": 5,
"operation": "cut"
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#542",
"tangency-labs/solidcraft#552"
],
"what": "a 3.2 mm round hole cut through a 100 x 60 x 2.5 sheet, which the flat pattern must report as a circle",
"source": "analytic",
"method": "V = 100*60*2.5 - pi*1.6^2*2.5 = 15000 - 6.4*pi",
"body_count": 1,
"volume_mm3": 14979.893807017026
}
@@ -0,0 +1,83 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Steel",
"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": "Hole"
}
},
{
"command": "sketch.circle.center",
"params": {
"center": [
50,
30
],
"radius": 1.6
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "solid.extrude",
"params": {
"sketch": "Hole",
"through_all": true,
"direction": "symmetric",
"operation": "cut"
}
},
{
"command": "sheet.flat_pattern",
"params": {}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#560",
"tangency-labs/solidcraft#656"
],
"what": "solid.hole square to a flat sheet metal panel was refused as sheet machining that cannot be preserved",
"source": "analytic",
"method": "T = 2: V = 60*40*2 - pi*2.5^2*2 = 4800 - 12.5*pi",
"body_count": 1,
"volume_mm3": 4760.730091830128
}
@@ -0,0 +1,65 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "S",
"thickness": "2 mm",
"active": true,
"bend_radius": "2 mm",
"k_factor": 0.4
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Base"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
60,
40
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Base"
}
},
{
"command": "solid.hole",
"params": {
"position": [
30,
20,
0
],
"direction": [
0,
0,
1
],
"diameter": 5
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,11 @@
{
"sources": [
"tangency-labs/solidcraft#774",
"tangency-labs/solidcraft#977"
],
"what": "a 30 x 30 x 2 plate with nine 4 mm holes converted to sheet metal (refused as not a plate of even thickness: the holes were read as polygons)",
"source": "analytic",
"method": "the plate keeps its thickness 2: V = (30*30 - 9*pi*2^2)*2 = 1800 - 72*pi",
"body_count": 1,
"volume_mm3": 1573.805328941535
}
@@ -0,0 +1,127 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 30,
"width": 30,
"height": 2,
"body_name": "Plate"
}
},
{
"command": "solid.hole",
"params": {
"position": [
6,
6,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
6,
15,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
6,
24,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
15,
6,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
15,
15,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
15,
24,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
24,
6,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
24,
15,
2
],
"diameter": 4
}
},
{
"command": "solid.hole",
"params": {
"position": [
24,
24,
2
],
"diameter": 4
}
},
{
"command": "sheet.convert",
"params": {
"body": "Plate",
"face": [
10.5,
10.5,
2
]
}
},
{
"command": "inspect.measure",
"params": {}
}
]
}
@@ -0,0 +1,10 @@
{
"sources": [
"tangency-labs/solidcraft#955"
],
"what": "a 2 mm hole drilled 10 mm deep into the rim of a 4 mm sheet, along the panel; it is a bore the panel keeps",
"source": "analytic",
"method": "T = 4: V = 60*40*4 - pi*1^2*10 = 9600 - 10*pi (the bore lies inside the 4 mm rim, 1 mm radius at mid thickness)",
"body_count": 1,
"volume_mm3": 9568.584073464102
}
@@ -0,0 +1,70 @@
{
"commands": [
{
"command": "sheet.manage_rules",
"params": {
"name": "Thick",
"thickness": "4 mm",
"active": true,
"bend_radius": "4 mm",
"k_factor": 0.44
}
},
{
"command": "sketch.create",
"params": {
"plane": "XY",
"name": "Base"
}
},
{
"command": "sketch.rectangle.two_point",
"params": {
"p0": [
0,
0
],
"p1": [
60,
40
]
}
},
{
"command": "sketch.finish",
"params": {}
},
{
"command": "sheet.flange",
"params": {
"type": "base",
"sketch": "Base"
}
},
{
"command": "solid.hole",
"params": {
"position": [
30,
0,
2
],
"direction": [
0,
1,
0
],
"diameter": 2,
"depth": 10
}
},
{
"command": "sheet.flat_pattern",
"params": {}
},
{
"command": "inspect.measure",
"params": {}
}
]
}