Kernel rig: everyday chamfers of box edges and pocket rims

A box edge chamfered 2 and by two distances (3 and 1, and flipped, told apart by the
centre of mass); a pocket's rim chamfered 1, by two distances, 4.9 (fits), and 5 and
5.5 (refused by the owner's rule on full-width chamfers: built at 5 today).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-30 06:07:18 -04:00
committed by Irakli Kourtis
parent fd571d076a
commit 2f88ca2f62
17 changed files with 526 additions and 0 deletions
+2
View File
@@ -8,6 +8,8 @@
9-fillet-corner-curvature-with-reduce-fit not supported yet: solid.fillet builds corner g2 with the exact fit only
9-fillet-corner-curvature-with-taper-fit not supported yet: solid.fillet builds corner g2 with the exact fit only
every-block-cylinder-crease-top-edge-after-arc-round-r1 the r1 round's contact seam with the block's side face reads 60 degrees (the cylinder wall's normal) at its end on the crease (8.660, 5, 15.284): G0 where the round is built tangent
every-chamfer-pocket-rim-5-5-refused refused naming 5 mm as the largest distance: the full-width chamfer (legs as deep as the 5 mm walls) builds instead of being refused
every-chamfer-pocket-rim-5-full-depth-refused the full-width chamfer (legs as deep as the 5 mm walls) builds instead of being refused
every-hole-top-rim-chamfer-10-full-depth-refused the full-width chamfer (leg as deep as the 10 mm plate) builds instead of being refused
every-hole-top-rim-r12-past-plate-bottom SMLib status 1001: a convex round past its face on the tangent side is not yet built by subtraction
every-pocket-floor-and-rim-edges-r2 a corner patch where two rim rounds meet at each concave pocket corner (23 faces, not 19) instead of the mitre the rounds make running into each other
@@ -0,0 +1,24 @@
{
"sources": [],
"what": "a box's top front edge chamfered 2",
"source": "analytic",
"method": "box 40x30x20, the edge y=0, z=20 chamfered 2: the right triangle of legs 2 (area 2) along 40: V = 24000 - 80 = 23920. Faces 7; creases (G0).",
"body_count": 1,
"volume_mm3": 23920.0,
"faces": 7,
"bbox": {
"min": [
0,
0,
0
],
"max": [
40,
30,
20
]
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,26 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "Part"
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
20,
0,
20
]
],
"distance": 2
}
}
]
}
@@ -0,0 +1,20 @@
{
"sources": [],
"what": "a box's top front edge chamfered by two distances, flipped: 3 down the front and 1 along the top",
"source": "analytic",
"method": "as every-chamfer-box-edge-two-distances-3-1 with `flip`: the front face first, so the triangle (0,20), (1,20), (0,17), area 1.5, V = 23940, its centroid (1/3, 19): centre of mass (20, (360000 - 20)/23940, (240000 - 60 * 19)/23940), graded to 0.0005 mm. Faces 7.",
"body_count": 1,
"volume_mm3": 23940.0,
"faces": 7,
"center_of_mass": [
20.0,
15.036758563074352,
9.977443609022556
],
"tolerance": {
"abs_mm": 0.0005
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,28 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "Part"
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
20,
0,
20
]
],
"distance": 3,
"distance2": 1,
"flip": true
}
}
]
}
@@ -0,0 +1,20 @@
{
"sources": [],
"what": "a box's top front edge chamfered by two distances: 3 along the top (the first face, the one facing up) and 1 down the front",
"source": "analytic",
"method": "box 40x30x20, the edge y=0, z=20: the triangle (0,20), (3,20), (0,19) in (y,z), area 1.5, along 40: V = 24000 - 60 = 23940. Its centroid (1, 59/3) fixes which leg went where: centre of mass (20, (360000 - 60)/23940, (240000 - 60 * 59/3)/23940), graded to 0.0005 mm (flipped, it moves 0.0017 mm in y and z). Faces 7.",
"body_count": 1,
"volume_mm3": 23940.0,
"faces": 7,
"center_of_mass": [
20.0,
15.035087719298245,
9.97577276524645
],
"tolerance": {
"abs_mm": 0.0005
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,27 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "Part"
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
20,
0,
20
]
],
"distance": 3,
"distance2": 1
}
}
]
}
@@ -0,0 +1,24 @@
{
"sources": [],
"what": "a rectangular pocket's four rim edges chamfered 1",
"source": "analytic",
"method": "plate 60x40x10 with the pocket 30x20x5 (x 15..45, y 10..30, floor z = 5, sharp vertical corners): V0 = 24000 - 3000 = 21000. Each convex rim edge loses the triangle d^2/2 along its length (100 in all); at each pocket corner the two chamfers run on past it and meet in a mitre, the quadrant losing what both remove: points (s, t) past both walls with s + u < d and t + u < d (u the depth), int_0^d (d-u)^2 du = d^3/3. d = 1: removed = 50 d^2 + (4/3) d^3 = 51.3333. V = 20948.6667. Faces 15.",
"body_count": 1,
"volume_mm3": 20948.666666666668,
"faces": 15,
"bbox": {
"min": [
0,
0,
0
],
"max": [
60,
40,
10
]
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,58 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 10,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 30,
"width": 20,
"height": 6,
"corner": [
15,
10,
5
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
30,
10,
10
],
[
30,
30,
10
],
[
15,
20,
10
],
[
45,
20,
10
]
],
"distance": 1
}
}
]
}
@@ -0,0 +1,24 @@
{
"sources": [],
"what": "a 5 mm deep pocket's rim edges chamfered 4.9: the legs stop 0.1 short of the floor, so it fits",
"source": "analytic",
"method": "plate 60x40x10 with the pocket 30x20x5 (x 15..45, y 10..30, floor z = 5, sharp vertical corners): V0 = 24000 - 3000 = 21000. Each convex rim edge loses the triangle d^2/2 along its length (100 in all); at each pocket corner the two chamfers run on past it and meet in a mitre, the quadrant losing what both remove: points (s, t) past both walls with s + u < d and t + u < d (u the depth), int_0^d (d-u)^2 du = d^3/3. d = 4.9: removed = 50 d^2 + (4/3) d^3 = 1357.3653. V = 19642.6347. Faces 15.",
"body_count": 1,
"volume_mm3": 19642.634666666665,
"faces": 15,
"bbox": {
"min": [
0,
0,
0
],
"max": [
60,
40,
10
]
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,58 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 10,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 30,
"width": 20,
"height": 6,
"corner": [
15,
10,
5
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
30,
10,
10
],
[
30,
30,
10
],
[
15,
20,
10
],
[
45,
20,
10
]
],
"distance": 4.9
}
}
]
}
@@ -0,0 +1,8 @@
{
"sources": [],
"what": "a 5 mm deep pocket's rim edges chamfered 5.5: the legs would run off the walls over the floor: refused, naming the largest distance that fits",
"source": "invariants",
"method": "owner rule: a chamfer whose leg runs off the face beside its edge over another face is refused, naming the largest size that fits, and a full-width chamfer stays refused. The walls are 5 deep, so every distance below 5 fits (every-chamfer-pocket-rim-4-9-fits) and 5 does not; the search names the largest at the request's three significant digits (step 0.001): 4.999.",
"outcome": "refused",
"refusal": "the largest distance that fits is 4.999 mm"
}
@@ -0,0 +1,58 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 10,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 30,
"width": 20,
"height": 6,
"corner": [
15,
10,
5
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
30,
10,
10
],
[
30,
30,
10
],
[
15,
20,
10
],
[
45,
20,
10
]
],
"distance": 5.5
}
}
]
}
@@ -0,0 +1,8 @@
{
"sources": [],
"what": "a 5 mm deep pocket's rim edges chamfered 5: the legs would use the whole walls: refused, naming the largest distance that fits",
"source": "invariants",
"method": "owner rule: a chamfer whose leg runs off the face beside its edge over another face is refused, naming the largest size that fits, and a full-width chamfer stays refused. The walls are 5 deep, so every distance below 5 fits (every-chamfer-pocket-rim-4-9-fits) and 5 does not; the search names the largest at the request's three significant digits (step 0.001): 4.999.",
"outcome": "refused",
"refusal": "the largest distance that fits is 4.999 mm"
}
@@ -0,0 +1,58 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 10,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 30,
"width": 20,
"height": 6,
"corner": [
15,
10,
5
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
30,
10,
10
],
[
30,
30,
10
],
[
15,
20,
10
],
[
45,
20,
10
]
],
"distance": 5
}
}
]
}
@@ -0,0 +1,24 @@
{
"sources": [],
"what": "a rectangular pocket's rim edges chamfered by two distances: 2 along the top (facing up) and 1 down the walls",
"source": "analytic",
"method": "plate 60x40x10 with the pocket 30x20x5 (x 15..45, y 10..30, floor z = 5, sharp vertical corners): V0 = 24000 - 3000 = 21000. Each rim edge loses the triangle of legs 2 (on the top) and 1 (down the wall), area 1, along 100; at each corner the mitred quadrant loses the points past both walls with s/2 + u < 1 and t/2 + u < 1: int_0^1 (2 (1-u))^2 du = 4/3. Removed = 100 + 16/3 = 105.3333. V = 20894.6667. Faces 15.",
"body_count": 1,
"volume_mm3": 20894.666666666668,
"faces": 15,
"bbox": {
"min": [
0,
0,
0
],
"max": [
60,
40,
10
]
},
"continuity": {
"order": "g0"
}
}
@@ -0,0 +1,59 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 60,
"width": 40,
"height": 10,
"body_name": "Plate"
}
},
{
"command": "solid.box",
"params": {
"length": 30,
"width": 20,
"height": 6,
"corner": [
15,
10,
5
],
"operation": "cut",
"targets": [
"Plate"
]
}
},
{
"command": "solid.chamfer",
"params": {
"edges": [
[
30,
10,
10
],
[
30,
30,
10
],
[
15,
20,
10
],
[
45,
20,
10
]
],
"distance": 2,
"distance2": 1
}
}
]
}