Kernel rig: inspect cases, the overlap volume of two boxes, none where they only touch, a box inside a box

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-29 17:10:20 -04:00
committed by Irakli Kourtis
parent 311b57bb72
commit 58b384d7d9
6 changed files with 194 additions and 0 deletions
@@ -0,0 +1,27 @@
{
"sources": [],
"what": "a box wholly inside another",
"source": "analytic",
"method": "box 40 x 30 x 20 with a corner at the origin and a box 10 x 10 x 10 from (5,5,5) inside it: the overlap is the small box: V 1000, centre (10,10,10)",
"results": [
{
"command": 2,
"pointer": "/count",
"value": 1
},
{
"command": 2,
"pointer": "/interferences/0/volume_mm3",
"value": 1000.0
},
{
"command": 2,
"pointer": "/interferences/0/center",
"value": [
10,
10,
10
]
}
]
}
@@ -0,0 +1,33 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "A",
"operation": "new"
}
},
{
"command": "solid.box",
"params": {
"length": 10,
"width": 10,
"height": 10,
"body_name": "B",
"operation": "new",
"corner": [
5,
5,
5
]
}
},
{
"command": "inspect.interference",
"params": {}
}
]
}
@@ -0,0 +1,18 @@
{
"sources": [],
"what": "two boxes that only touch along a face",
"source": "analytic",
"method": "box 40 x 30 x 20 with a corner at the origin and a box 40 x 30 x 20 from (40,0,0): they share the face x = 40 and no volume: no interference",
"results": [
{
"command": 2,
"pointer": "/count",
"value": 0
},
{
"command": 2,
"pointer": "/interferences",
"value": []
}
]
}
@@ -0,0 +1,33 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "A",
"operation": "new"
}
},
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "B",
"operation": "new",
"corner": [
40,
0,
0
]
}
},
{
"command": "inspect.interference",
"params": {}
}
]
}
@@ -0,0 +1,50 @@
{
"sources": [],
"what": "the overlap of two boxes",
"source": "analytic",
"method": "box 40 x 30 x 20 with a corner at the origin and a box 40 x 30 x 20 from (30,20,10): they share the cube x 30..40, y 20..30, z 10..20: V 1000, A 600, centre (35,25,15)",
"results": [
{
"command": 2,
"pointer": "/count",
"value": 1
},
{
"command": 2,
"pointer": "/interferences/0/volume_mm3",
"value": 1000.0
},
{
"command": 2,
"pointer": "/interferences/0/area_mm2",
"value": 600.0
},
{
"command": 2,
"pointer": "/interferences/0/center",
"value": [
35,
25,
15
]
},
{
"command": 2,
"pointer": "/interferences/0/bbox/min",
"value": [
30,
20,
10
]
},
{
"command": 2,
"pointer": "/interferences/0/bbox/max",
"value": [
40,
30,
20
]
}
]
}
@@ -0,0 +1,33 @@
{
"commands": [
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "A",
"operation": "new"
}
},
{
"command": "solid.box",
"params": {
"length": 40,
"width": 30,
"height": 20,
"body_name": "B",
"operation": "new",
"corner": [
30,
20,
10
]
}
},
{
"command": "inspect.interference",
"params": {}
}
]
}