mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 10:35:58 +00:00
Kernel rig: inspect cases, the centre of mass and volume of a box, of a box and cylinder, and an unknown body refused
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "the centre of mass of a box and a cylinder together",
|
||||
"source": "analytic",
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin (V 24000 at (20,15,10)) and a cylinder r 5, h 10 on (60,0,0) (V 250 pi = 785.40 at (60,0,5)): the volume-weighted mean (21.2675, 14.5247, 9.8416), V = 24000 + 250 pi",
|
||||
"results": [
|
||||
{
|
||||
"command": 2,
|
||||
"pointer": "/center",
|
||||
"value": [
|
||||
21.267517524987444,
|
||||
14.524680928129708,
|
||||
9.84156030937657
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"pointer": "/volume",
|
||||
"value": 24785.398163397447
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"pointer": "/bodies/1/center",
|
||||
"value": [
|
||||
60,
|
||||
0,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 2,
|
||||
"pointer": "/bodies/1/volume",
|
||||
"value": 785.3981633974482
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 40,
|
||||
"width": 30,
|
||||
"height": 20,
|
||||
"body_name": "Box",
|
||||
"operation": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "solid.cylinder",
|
||||
"params": {
|
||||
"base": [
|
||||
60,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"radius": 5,
|
||||
"height": 10,
|
||||
"body_name": "Cyl",
|
||||
"operation": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "inspect.center_of_mass",
|
||||
"params": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "the centre of mass of a box",
|
||||
"source": "analytic",
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin: the middle (20,15,10), V = 40 x 30 x 20 = 24000",
|
||||
"results": [
|
||||
{
|
||||
"command": 1,
|
||||
"pointer": "/center",
|
||||
"value": [
|
||||
20,
|
||||
15,
|
||||
10
|
||||
]
|
||||
},
|
||||
{
|
||||
"command": 1,
|
||||
"pointer": "/volume",
|
||||
"value": 24000.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 40,
|
||||
"width": 30,
|
||||
"height": 20,
|
||||
"body_name": "Box",
|
||||
"operation": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "inspect.center_of_mass",
|
||||
"params": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"sources": [],
|
||||
"what": "the centre of mass of a body that is not there",
|
||||
"source": "analytic",
|
||||
"method": "box 40 x 30 x 20 with a corner at the origin; no body `Nope`: refused",
|
||||
"outcome": "refused",
|
||||
"refusal": "no such bodies"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"commands": [
|
||||
{
|
||||
"command": "solid.box",
|
||||
"params": {
|
||||
"length": 40,
|
||||
"width": 30,
|
||||
"height": 20,
|
||||
"body_name": "Box",
|
||||
"operation": "new"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "inspect.center_of_mass",
|
||||
"params": {
|
||||
"bodies": [
|
||||
"Nope"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user