mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 10:35:58 +00:00
cli: the rig and the oracle reach MeshTolerance through the engine
solidcraft-cli depends on the engine, not the kernel: solidcraft_kernel::MeshTolerance did not resolve; it is solidcraft_engine::kernel::MeshTolerance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt
This commit is contained in:
@@ -235,7 +235,7 @@ fn check_case(dir: &str, dumps: Option<&std::path::Path>) -> Value {
|
||||
shells += m.shells as u64;
|
||||
if want["watertight"].as_bool() == Some(true) {
|
||||
let tol = want["tolerance"]["mesh_mm"].as_f64().unwrap_or(MESH_TOL);
|
||||
let (open, over) = match b.body.mesh(&solidcraft_kernel::MeshTolerance::chord(tol)) {
|
||||
let (open, over) = match b.body.mesh(&solidcraft_engine::kernel::MeshTolerance::chord(tol)) {
|
||||
Ok(mesh) => open_edges(&mesh.positions, &mesh.triangles, want["tolerance"]["weld_mm"].as_f64().unwrap_or(1e-4)),
|
||||
Err(e) => {
|
||||
c.push("watertight", json!(format!("{}: {e}", b.name)), json!("no open edges"), false);
|
||||
|
||||
@@ -187,7 +187,7 @@ fn step_export_check(s: &solidcraft_engine::Session, volume: f64) -> (bool, Stri
|
||||
fn our_mesh(s: &solidcraft_engine::Session) -> Result<Vec<Tri>, String> {
|
||||
let mut ours: Vec<Tri> = Vec::new();
|
||||
for b in &s.world_state().bodies {
|
||||
let m = b.body.mesh(&solidcraft_kernel::MeshTolerance::chord(MESH_TOL)).map_err(|e| e.to_string())?;
|
||||
let m = b.body.mesh(&solidcraft_engine::kernel::MeshTolerance::chord(MESH_TOL)).map_err(|e| e.to_string())?;
|
||||
let p = |i: u32| m.positions.get(i as usize).map(|v: &Vec3| [v.x, v.y, v.z]);
|
||||
for t in &m.triangles {
|
||||
if let (Some(a), Some(b), Some(c)) = (p(t[0]), p(t[1]), p(t[2])) {
|
||||
|
||||
Reference in New Issue
Block a user