diff --git a/src/app/command_driver.rs b/src/app/command_driver.rs index 0e21a8e6e..453754747 100644 --- a/src/app/command_driver.rs +++ b/src/app/command_driver.rs @@ -3429,10 +3429,12 @@ impl OpenCADStudio { .scene .parametric_constraint_set_mut(scope) .add(ConstraintKind::Equal, vec![first, *follower], None); + // A Multiple pick leaves its new bar unshown, as the + // reference does; the single flow shows it at once. self.tabs[i].scene.note_parametric_constraint_applied( scope, id, - self.constraint_bar_display, + if multiple { 0 } else { self.constraint_bar_display }, ); } let changes = touched diff --git a/src/modules/parametric/fixed.rs b/src/modules/parametric/fixed.rs index c4c641500..2860ac772 100644 --- a/src/modules/parametric/fixed.rs +++ b/src/modules/parametric/fixed.rs @@ -104,6 +104,10 @@ impl CadCommand for FixConstraintCommand { true } + fn typed_point_picks_entity(&self) -> bool { + matches!(self.step, Step::Object) + } + fn entity_pick_highlights_hover(&self) -> bool { true } diff --git a/src/modules/parametric/horizontal.rs b/src/modules/parametric/horizontal.rs index b4b98911b..ca2aea80f 100644 --- a/src/modules/parametric/horizontal.rs +++ b/src/modules/parametric/horizontal.rs @@ -269,6 +269,10 @@ impl CadCommand for HorizontalConstraintCommand { true } + fn typed_point_picks_entity(&self) -> bool { + matches!(self.step, Step::ObjectOrTwoPoints) + } + fn entity_pick_highlights_hover(&self) -> bool { true } diff --git a/src/scene/parametric_constraints.rs b/src/scene/parametric_constraints.rs index 0ab068550..4c9e87d34 100644 --- a/src/scene/parametric_constraints.rs +++ b/src/scene/parametric_constraints.rs @@ -1859,7 +1859,8 @@ impl super::Scene { let cam = self.camera.borrow(); (cam.view_proj_rte(bounds), cam.eye()) }; - set.constraints + let mut placements = set + .constraints .iter() .filter(|c| c.enabled) .filter(|c| { @@ -1952,7 +1953,25 @@ impl super::Scene { }) .collect::>() }) - .collect() + .collect::>(); + // The reference marks an object once for Equal however many + // relations of that kind it carries; the stacked duplicates only + // repeated the same badge. + let mut equal_anchors: Vec = Vec::new(); + placements.retain(|(_, point, _, label, _, _)| { + if label != "=" { + return true; + } + if equal_anchors + .iter() + .any(|seen| (seen.x - point.x).abs() < 0.5 && (seen.y - point.y).abs() < 0.5) + { + return false; + } + equal_anchors.push(*point); + true + }); + placements } /// Hit-tests screen point `p` (same coordinate space as `p_full` in the