Command ids are SolveCraft's own: 173 ids that were another product's internal command ids become dotted, lower-case ids (<area>.<thing>[.<variant>]: solid.extrude, sketch.rectangle.two_point, sheet.flange, joint.drive, ...), in the registry, toolbar, dialogs, shortcuts, palette, control channel, MCP, examples, scenarios and docs
The old ids live only in crates/engine/src/legacy_ids.rs (the legacy migration table): find_command maps them, so old scripts, recipes and control calls keep working, and saved shortcuts, recent and pinned commands are migrated on load (designs store no command ids). Parity maps the observed catalog ids to ours through xtask/data/fusion-ids.tsv. The agent rule now reads: our own dotted id, never another product's. Cargo.toml's repository points at github.com/bherbruck/solvecraft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
740360d7c3
commit
d10312b7fd
158 files changed
+3611
-3205
No files matched your search
@@ -3,7 +3,7 @@
|
||||
//! drags, toolbar starts) the way a person would use it, with checks on the result.
|
||||
//!
|
||||
//! A scenario is a JSON list of steps:
|
||||
//! - `{"start": "Extrude"}`: a toolbar click; `{"key": "E", "shift"?, "cmd"?}`; `{"text": "20"}`
|
||||
//! - `{"start": "solid.extrude"}`: a toolbar click; `{"key": "E", "shift"?, "cmd"?}`; `{"text": "20"}`
|
||||
//! - `{"widget": "Revolute", "near"?: "Type"}`: click a dialog field, choice or button by its
|
||||
//! text (with `near`: the one in that label's row)
|
||||
//! - `{"click": AT, "double"?, "shift"?, "ctrl"?, "button"?}`, `{"move": AT}`,
|
||||
@@ -650,7 +650,7 @@ pub fn check(h: &mut Harness, e: &Value) -> Result<(), String> {
|
||||
// {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 m = h.call("engine.execute", json!({"command": "inspect.measure", "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() {
|
||||
@@ -682,7 +682,7 @@ pub fn check(h: &mut Harness, e: &Value) -> Result<(), String> {
|
||||
"body_volume" => {
|
||||
// {body, volume}: one body's volume.
|
||||
let name = v["body"].as_str().unwrap_or_default();
|
||||
let m = h.call("engine.execute", json!({"command": "MeasureCommand", "params": {"bodies": [name]}}))["result"].clone();
|
||||
let m = h.call("engine.execute", json!({"command": "inspect.measure", "params": {"bodies": [name]}}))["result"].clone();
|
||||
let got = m["bodies"][0]["volume_mm3"].as_f64().unwrap_or(f64::NAN);
|
||||
approx(got, &v["volume"], &format!("{name} volume"))?;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user