Assembly collision
Call
curl --fail-with-body --silent --show-error --request POST --header 'Content-Type: application/json' --header 'Accept: application/json' --data-raw '{"parts":[{"name":"base","model":{"type":"union","children":[{"type":"difference","children":[{"type":"union","children":[{"type":"difference","children":[{"type":"box","size":[80,60,30]},{"type":"translate","vector":[2,2,2],"child":{"type":"box","size":[76,56,30]}}]},{"type":"translate","vector":[10,10,1],"child":{"type":"cylinder","radius":3.5,"height":9,"segments":32}},{"type":"translate","vector":[70,10,1],"child":{"type":"cylinder","radius":3.5,"height":9,"segments":32}},{"type":"translate","vector":[10,50,1],"child":{"type":"cylinder","radius":3.5,"height":9,"segments":32}},{"type":"translate","vector":[70,50,1],"child":{"type":"cylinder","radius":3.5,"height":9,"segments":32}}]},{"type":"translate","vector":[34,-1,12],"child":{"type":"box","size":[12,4,6]}},{"type":"translate","vector":[10,10,4],"child":{"type":"cylinder","radius":1.25,"height":7,"segments":24}},{"type":"translate","vector":[70,10,4],"child":{"type":"cylinder","radius":1.25,"height":7,"segments":24}},{"type":"translate","vector":[10,50,4],"child":{"type":"cylinder","radius":1.25,"height":7,"segments":24}},{"type":"translate","vector":[70,50,4],"child":{"type":"cylinder","radius":1.25,"height":7,"segments":24}}]},{"type":"translate","vector":[40,30,1],"child":{"type":"cylinder","radius":3.5,"height":13,"segments":32}}]},"role":"solid"},{"name":"lid","model":{"type":"union","children":[{"type":"translate","vector":[0,0,30],"child":{"type":"box","size":[80,60,2]}},{"type":"translate","vector":[2.25,2.25,27],"child":{"type":"box","size":[75.5,55.5,3]}}]},"role":"solid"},{"name":"pcb_keepout","model":{"type":"translate","vector":[6,6,10.25],"child":{"type":"box","size":[68,48,13.75]}},"role":"keepout"}],"min_clearance_mm":0.25,"pair_rules":[{"part_a":"base","part_b":"lid","allow_contact":true}],"insertion_checks":[{"part":"lid","direction":[0,0,1]},{"part":"lid","direction":[0,0,-1]}]}' https://cad.burgeonads.com/v1/check/assembly-fit
Input
{
"insertion_checks": [
{
"direction": [
0,
0,
1
],
"part": "lid"
},
{
"direction": [
0,
0,
-1
],
"part": "lid"
}
],
"min_clearance_mm": 0.25,
"pair_rules": [
{
"allow_contact": true,
"part_a": "base",
"part_b": "lid"
}
],
"parts": [
{
"model": {
"children": [
{
"children": [
{
"children": [
{
"children": [
{
"size": [
80,
60,
30
],
"type": "box"
},
{
"child": {
"size": [
76,
56,
30
],
"type": "box"
},
"type": "translate",
"vector": [
2,
2,
2
]
}
],
"type": "difference"
},
{
"child": {
"height": 9,
"radius": 3.5,
"segments": 32,
"type": "cylinder"
},
"type": "translate",
"vector": [
10,
10,
1
]
},
{
"child": {
"height": 9,
"radius": 3.5,
"segments": 32,
"type": "cylinder"
},
"type": "translate",
"vector": [
70,
10,
1
]
},
{
"child": {
"height": 9,
"radius": 3.5,
"segments": 32,
"type": "cylinder"
},
"type": "translate",
"vector": [
10,
50,
1
]
},
{
"child": {
"height": 9,
"radius": 3.5,
"segments": 32,
"type": "cylinder"
},
"type": "translate",
"vector": [
70,
50,
1
]
}
],
"type": "union"
},
{
"child": {
"size": [
12,
4,
6
],
"type": "box"
},
"type": "translate",
"vector": [
34,
-1,
12
]
},
{
"child": {
"height": 7,
"radius": 1.25,
"segments": 24,
"type": "cylinder"
},
"type": "translate",
"vector": [
10,
10,
4
]
},
{
"child": {
"height": 7,
"radius": 1.25,
"segments": 24,
"type": "cylinder"
},
"type": "translate",
"vector": [
70,
10,
4
]
},
{
"child": {
"height": 7,
"radius": 1.25,
"segments": 24,
"type": "cylinder"
},
"type": "translate",
"vector": [
10,
50,
4
]
},
{
"child": {
"height": 7,
"radius": 1.25,
"segments": 24,
"type": "cylinder"
},
"type": "translate",
"vector": [
70,
50,
4
]
}
],
"type": "difference"
},
{
"child": {
"height": 13,
"radius": 3.5,
"segments": 32,
"type": "cylinder"
},
"type": "translate",
"vector": [
40,
30,
1
]
}
],
"type": "union"
},
"name": "base",
"role": "solid"
},
{
"model": {
"children": [
{
"child": {
"size": [
80,
60,
2
],
"type": "box"
},
"type": "translate",
"vector": [
0,
0,
30
]
},
{
"child": {
"size": [
75.5,
55.5,
3
],
"type": "box"
},
"type": "translate",
"vector": [
2.25,
2.25,
27
]
}
],
"type": "union"
},
"name": "lid",
"role": "solid"
},
{
"model": {
"child": {
"size": [
68,
48,
13.75
],
"type": "box"
},
"type": "translate",
"vector": [
6,
6,
10.25
]
},
"name": "pcb_keepout",
"role": "keepout"
}
]
}
Output
{
"distance_search_mm": 60.0,
"fit_ok": false,
"insertion_results": [
{
"blocking_parts": [],
"clear": true,
"collisions": [],
"direction": [
0.0,
0.0,
1.0
],
"part": "lid"
},
{
"blocking_parts": [
"base",
"pcb_keepout"
],
"clear": false,
"collisions": [
{
"part": "base",
"point_mm": [
26.666666666666668,
20.0,
1.0000000000000002
]
},
{
"part": "pcb_keepout",
"point_mm": [
28.666666666666668,
22.0,
17.125
]
}
],
"direction": [
0.0,
0.0,
-1.0
],
"part": "lid"
}
],
"pair_results": [
{
"allow_contact": true,
"clearance_ok": true,
"closest_points_mm": [
[
0.0,
0.0,
30.0
],
[
0.0,
0.0,
30.0
]
],
"gap_ok": true,
"intersection_bbox": null,
"intersection_volume_mm3": 0.0,
"intersects": false,
"max_gap_mm": null,
"min_distance_mm": 0.0,
"part_a": "base",
"part_b": "lid",
"required_clearance_mm": 0.0,
"witness_point_mm": null
},
{
"allow_contact": false,
"clearance_ok": false,
"closest_points_mm": [
[
38.9221405454035,
30.446464004425934,
12.125
],
[
38.9221405454035,
30.446464004425934,
12.125
]
],
"gap_ok": true,
"intersection_bbox": {
"max_mm": [
43.5,
33.5,
14.0
],
"min_mm": [
36.5,
26.5,
10.25
]
},
"intersection_volume_mm3": 143.39138668185436,
"intersects": true,
"max_gap_mm": null,
"min_distance_mm": 0.0,
"part_a": "base",
"part_b": "pcb_keepout",
"required_clearance_mm": 0.25,
"witness_point_mm": [
38.9221405454035,
30.446464004425934,
12.125
]
},
{
"allow_contact": false,
"clearance_ok": true,
"closest_points_mm": [
[
6.0,
54.0,
27.0
],
[
6.0,
54.0,
24.0
]
],
"gap_ok": true,
"intersection_bbox": null,
"intersection_volume_mm3": 0.0,
"intersects": false,
"max_gap_mm": null,
"min_distance_mm": 3.0,
"part_a": "lid",
"part_b": "pcb_keepout",
"required_clearance_mm": 0.25,
"witness_point_mm": null
}
],
"status": "ok",
"verified": true
}
Geometric verification only. Not structural or safety certification. Provided as-is without warranty.