SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Sketch: hash sets for the stale-pattern check before each solve (#10493)
kaltenbrunnermarkusfcb0a925e204
diff --git a/crates/sketch/src/pattern.rs b/crates/sketch/src/pattern.rsindex efa3650b0f..92ebc1d4e0 100644--- a/crates/sketch/src/pattern.rs+++ b/crates/sketch/src/pattern.rs@@ -306,9 +306,9 @@ impl Sketch {if self.patterns.is_empty() {return;}- let curves: std::collections::BTreeSet<_> = self.curves.iter().map(|c| c.id.as_str()).collect();- let points: std::collections::BTreeSet<_> = self.points.iter().map(|p| p.id.as_str()).collect();- let constraint_ids: std::collections::BTreeSet<_> = self.constraints.iter().map(|c| c.id.as_str()).collect();+ let curves: std::collections::HashSet<_> = self.curves.iter().map(|c| c.id.as_str()).collect();+ let points: std::collections::HashSet<_> = self.points.iter().map(|p| p.id.as_str()).collect();+ let constraint_ids: std::collections::HashSet<_> = self.constraints.iter().map(|c| c.id.as_str()).collect();let retired: Vec<_> = self.patterns.iter()