mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-06 20:02:16 +00:00
Kernel rig: align cases, face onto face as a move, a side face turned onto a top face, and a face onto an offset plane along its normal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a cube's bottom face aligned onto a plate's top face (normals already opposite: a pure move)",
|
||||
"source": "analytic",
|
||||
"method": "the faces' normals are -Z and +Z: no turn; the picked point (105,5,0) goes to (20,20,10): the cube moves by (-85,15,10) to x 15..25, y 15..25, z 10..20. COM z = (16000*5 + 1000*15)/17000",
|
||||
"body_count": 2,
|
||||
"volume_mm3": 17000.0,
|
||||
"center_of_mass": [
|
||||
20,
|
||||
20,
|
||||
5.588235294117647
|
||||
],
|
||||
"bbox": {
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
40,
|
||||
40,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 40,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"body_name": "Base"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 10,
|
||||
"width": 10,
|
||||
"height": 10,
|
||||
"corner": [
|
||||
100,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"body_name": "Block"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.align",
|
||||
"params": {
|
||||
"bodies": [
|
||||
"Block"
|
||||
],
|
||||
"from_face": [
|
||||
105,
|
||||
5,
|
||||
0
|
||||
],
|
||||
"to_face": [
|
||||
20,
|
||||
20,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a post's bottom face aligned onto a plane z=50 away from the picked point in X and Y: it moves along the plane's normal only",
|
||||
"source": "analytic",
|
||||
"method": "onto a plane the point moves along its normal: (0,0,50); the bottom faces -Z, the plane +Z: no turn. The post goes to z 50..70, x and y unchanged",
|
||||
"body_count": 1,
|
||||
"volume_mm3": 2000.0,
|
||||
"bbox": {
|
||||
"min": [
|
||||
100,
|
||||
0,
|
||||
50
|
||||
],
|
||||
"max": [
|
||||
110,
|
||||
10,
|
||||
70
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 10,
|
||||
"width": 10,
|
||||
"height": 20,
|
||||
"corner": [
|
||||
100,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"body_name": "Post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.align",
|
||||
"params": {
|
||||
"bodies": [
|
||||
"Post"
|
||||
],
|
||||
"from_face": [
|
||||
105,
|
||||
5,
|
||||
0
|
||||
],
|
||||
"to_plane": {
|
||||
"origin": [
|
||||
0,
|
||||
0,
|
||||
50
|
||||
],
|
||||
"normal": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "a 10x10x20 post's side face (+X) aligned onto a plate's top face: the post turns 90 deg to lie flat",
|
||||
"source": "analytic",
|
||||
"method": "+X turns onto -Z: 90 deg about +Y through (110,5,10), the post becomes 20 along X, 10 along Z (x 100..120, z 10..20); the point then moves to (20,20,10): x 10..30, y 15..25, z 10..20. Unturned it would reach z 30. COM z = (16000*5 + 2000*15)/18000",
|
||||
"body_count": 2,
|
||||
"volume_mm3": 18000.0,
|
||||
"center_of_mass": [
|
||||
20,
|
||||
20,
|
||||
6.111111111111111
|
||||
],
|
||||
"bbox": {
|
||||
"min": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"max": [
|
||||
40,
|
||||
40,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 40,
|
||||
"width": 40,
|
||||
"height": 10,
|
||||
"body_name": "Base"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 10,
|
||||
"width": 10,
|
||||
"height": 20,
|
||||
"corner": [
|
||||
100,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"body_name": "Post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.align",
|
||||
"params": {
|
||||
"bodies": [
|
||||
"Post"
|
||||
],
|
||||
"from_face": [
|
||||
110,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"to_face": [
|
||||
20,
|
||||
20,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user