Retest: joints mate face to face and Drive Joints takes the keyboard (4c3a5d9): s07/s20 type the angle straight away and check B sits on A's top (z 10..20); harness bbox check measures bodies as placed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
6653db806e
commit
3d384c7de7
3 files changed
+32
-17
No files matched your search
@@ -446,6 +446,21 @@ pub fn check(h: &mut Harness, e: &Value) -> Result<(), String> {
|
|||||||
return Err(format!("named views: got {n}, want {v}"));
|
return Err(format!("named views: got {n}, want {v}"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"bbox" => {
|
||||||
|
// {body, min?: [x|null, y|null, z|null], max?: […]}: where a body is (±1e-3 mm).
|
||||||
|
let name = v["body"].as_str().unwrap_or_default();
|
||||||
|
// Where it is in the assembly (measured as placed).
|
||||||
|
let m = h.call("engine.execute", json!({"command": "MeasureCommand", "params": {"bodies": [name]}}))["result"].clone();
|
||||||
|
let b = m["bodies"].as_array().and_then(|a| a.first()).cloned().ok_or_else(|| format!("no body {name}: {m}"))?;
|
||||||
|
for side in ["min", "max"] {
|
||||||
|
for (i, want) in v[side].as_array().into_iter().flatten().enumerate() {
|
||||||
|
let (Some(w), Some(g)) = (want.as_f64(), b["bbox"][side].get(i).and_then(Value::as_f64)) else { continue };
|
||||||
|
if (w - g).abs() > 1e-3 {
|
||||||
|
return Err(format!("{name} bbox {side}[{i}]: got {g}, want {w}"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
"home" => {
|
"home" => {
|
||||||
if ui["home"] != *v {
|
if ui["home"] != *v {
|
||||||
return Err(format!("start page open: got {}, want {v}", ui["home"]));
|
return Err(format!("start page open: got {}, want {v}", ui["home"]));
|
||||||
|
|||||||
@@ -187,16 +187,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"expect": {
|
||||||
|
"bbox": {
|
||||||
|
"body": "Body2",
|
||||||
|
"min": [
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"max": [
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
20
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"start": "FusionMoveJointsCommand"
|
"start": "FusionMoveJointsCommand"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"widget": "0 deg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "A",
|
|
||||||
"cmd": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"text": "90"
|
"text": "90"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -192,9 +192,6 @@
|
|||||||
"plane": "XZ"
|
"plane": "XZ"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"debug": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "Enter"
|
"key": "Enter"
|
||||||
},
|
},
|
||||||
@@ -210,13 +207,6 @@
|
|||||||
{
|
{
|
||||||
"start": "FusionMoveJointsCommand"
|
"start": "FusionMoveJointsCommand"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"widget": "0 deg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "A",
|
|
||||||
"cmd": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"text": "90"
|
"text": "90"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user