Wave 257/509: Main's new callers of the placing calls that now return their error (and 1 more)

2 commits, squashed; the originals stay reachable from tag archive/merge-main-develop.

- d63aa814f jyviko: threads: main's tapped-hole sizes and shaft turn-down on the reworked thread
- cfc393d68 jyviko: Main's new callers of the placing calls that now return their error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
jyviko
2026-10-26 13:18:38 -04:00
parent 27b8046c6f
commit dc8b5489fc
74 changed files with 354 additions and 289 deletions
@@ -141,7 +141,7 @@ fn portable_job_save_is_host_independent_atomic_and_undoable_without_geometry_ch
assert!(s.render_job_host().is_none());
let original = s.doc.clone();
let model = s.model.state();
let world = s.world_state();
let world = s.world_state().unwrap();
let undo = s.undo.len();
s.evaluations = 0;
let setup: RenderSetup = serde_json::from_value(json!({
@@ -187,7 +187,7 @@ fn portable_job_save_is_host_independent_atomic_and_undoable_without_geometry_ch
);
assert_eq!(s.doc.render.setups["Studio"].exposure_ev, 2.5);
assert!(Arc::ptr_eq(&model, &s.model.state()));
assert!(Arc::ptr_eq(&world, &s.world_state()));
assert!(Arc::ptr_eq(&world, &s.world_state().unwrap()));
assert_eq!(s.evaluations, 0);
}
@@ -79,7 +79,7 @@ pub(super) fn resolve(s: &Session, scene: &ProductScene, bindings: &SurfaceBindi
return Ok(Vec::new());
}
let identities = targets(s, command)?;
let world = s.world_state();
let world = s.world_state()?;
let world_by_name: BTreeMap<_, _> = world.bodies.iter().map(|body| (body.name.as_str(), body)).collect();
let visible: BTreeMap<_, _> = scene.meshes.iter().enumerate().map(|(i, body)| (body.name.as_str(), i)).collect();
let mut result = Vec::new();
@@ -147,7 +147,7 @@ pub(super) fn bind(s: &mut Session, params: &Value) -> Result<Value> {
if matches.next().is_some() {
return Err(bad(command, "surface target is ambiguous"));
}
let world = s.world_state();
let world = s.world_state()?;
let body = world.body(name).ok_or_else(|| bad(command, "surface target disappeared"))?;
let inverse = solidcraft_doc::mat_inverse(&body.source_transform).ok_or_else(|| bad(command, "surface mapping transform is singular"))?;
let frame: PlanarFrame = serde_json::from_value(prepared["texture"]["frame"].clone()).map_err(|e| bad(command, e.to_string()))?;