SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Motion analysis: a check that runs out before its first step says so, Contact sets offered only when one is active
MateuszSychXplf96aaa2a9852
diff --git a/crates/engine/src/cmd/motion_analysis.rs b/crates/engine/src/cmd/motion_analysis.rsindex 34e030ecb1..d842d9c9c8 100644--- a/crates/engine/src/cmd/motion_analysis.rs+++ b/crates/engine/src/cmd/motion_analysis.rs@@ -391,6 +391,10 @@ pub(super) fn interference(s: &mut Session, p: &Value) -> Result<Value> {}Ok(true)})?;+ // Nothing checked is not clear.+ if truncated && checked == 0 {+ return Err(bad(cmd, "the check ran out of its work budget before its first step: check fewer parts (occurrences, against)"));+ }let mut list: Vec<(&(u64, u64), &Collision)> = found.iter().collect();list.sort_by_key(|(_, c)| c.samples.first().copied().unwrap_or(usize::MAX));let mut booleans = MAX_BOOLEANS;diff --git a/crates/ui-egui/src/dialogs_motion_plot.rs b/crates/ui-egui/src/dialogs_motion_plot.rsindex f0a6f144ab..28929992a8 100644--- a/crates/ui-egui/src/dialogs_motion_plot.rs+++ b/crates/ui-egui/src/dialogs_motion_plot.rs@@ -248,7 +248,9 @@ fn collision_rows() {// Collisions over the whole study: of the picked components (against the other picks, if// any), else among all components or in the contact sets.- let sets = !app.session.doc.assembly.contact_sets.is_empty() || app.session.doc.assembly.contact_all;+ // Offered when there is a set to check (suppressed ones don't count).+ let assembly = &app.session.doc.assembly;+ let sets = assembly.contact_all || assembly.contact_sets.iter().any(|c| !c.suppressed);a.among = if sets { a.among.min(1) } else { 0 };let (parts, against) = (picked_occurrences(&app.session, inputs, 1), picked_occurrences(&app.session, inputs, 2));let among = if !parts.is_empty() {