SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Oracle replayer: features with fusion_effective_extent replay the extent Fusion actually used (63: its through-all is sized from vertices); noted per case in docs/oracle.md
bherbruck9c03f4bf328d
diff --git a/apps/solvecraft-cli/src/oracle.rs b/apps/solvecraft-cli/src/oracle.rsindex 9052410e5f..7ebf37d9a6 100644--- a/apps/solvecraft-cli/src/oracle.rs+++ b/apps/solvecraft-cli/src/oracle.rs@@ -65,6 +65,19 @@ fn check_case(dir: &str) -> Value {if let Some((_, _, why)) = approx {out["note"] = json!(why);}+ let effective: Vec<String> = recipe["features"]+ .as_array()+ .into_iter()+ .flatten()+ .filter(|f| f.get("fusion_effective_extent").is_some())+ .map(|f| f["name"].as_str().unwrap_or("?").to_string())+ .collect();+ if !effective.is_empty() {+ out["note"] = json!(format!(+ "known Fusion difference: {} replayed with the extent Fusion actually used (its through-all is sized as 1.1 × the farthest vertex, so curved tops stop it short; SolveCraft's through-all goes truly through)",+ effective.join(", ")+ ));+ }out}diff --git a/apps/solvecraft-cli/src/recipe.rs b/apps/solvecraft-cli/src/recipe.rsindex 727660b87a..706bc8e0cb 100644--- a/apps/solvecraft-cli/src/recipe.rs+++ b/apps/solvecraft-cli/src/recipe.rs@@ -85,6 +85,14 @@ fn sketch_cmds(f: &Value, out: &mut Vec<Value>) -> Result<(), String> {/// Extent parameters for the Extrude command.fn extent(f: &Value, p: &mut Value) {+ // Where Fusion's own result differs from the geometric meaning (its through-all is sized+ // from vertices), the recipe records the extent Fusion actually used: replay that.+ if let Some(fx) = f.get("fusion_effective_extent").filter(|x| x.get("type").and_then(Value::as_str) == Some("distance")) {+ let dir = fx.get("direction").and_then(Value::as_str).unwrap_or("positive");+ p["distance"] = fx.get("distance").cloned().unwrap_or(Value::Null);+ p["direction"] = json!(if dir.starts_with("negative") { "negative" } else { "positive" });+ return;+ }let e = f.get("extent").cloned().unwrap_or(Value::Null);let ty = e.get("type").and_then(Value::as_str).unwrap_or("distance");let dist = e.get("distance").cloned().or_else(|| f.get("distance").cloned()).unwrap_or(Value::Null);diff --git a/xtask/src/main.rs b/xtask/src/main.rsindex d1b190e8f6..7b33570c4f 100644--- a/xtask/src/main.rs+++ b/xtask/src/main.rs@@ -160,6 +160,9 @@ fn cmd_oracle() -> Result<(), String> {if let Some(e) = r["error"].as_str() {notes.push(e.replace('|', "/"));}+ if let Some(n) = r["note"].as_str() {+ notes.push(n.replace('|', "/"));+ }md += &format!("| {} | {status} | {} |\n", r["case"].as_str().unwrap_or(""), notes.join("; "));}std::fs::write(root().join("docs/oracle.md"), md).map_err(|e| format!("docs/oracle.md: {e}"))?;