Equal follow-ups: one glyph per object, unshown Multiple bars, typed object picks

- An object that carries several Equal relations shows a single "="
  badge, as the reference does, instead of one stacked badge per relation.
- A pick made in the Multiple flow leaves its new constraint bar unshown
  until the object is selected or bars are shown, matching the reference;
  the single flow still shows the bar at once.
- A typed coordinate at the Fix `Select object:` prompt and at the
  Horizontal/Vertical `Select an object or [2Points]` prompt picks the
  object under that point, like a click, instead of being read as a point.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
ramox81andClaude Fable 5.1 committed 2026-09-21 09:18:40 +03:00
1 parent fd2062bdec
commit ad6f902ed7
4 files changed
+32 -3

No files matched your search

+3 -1
View File
@@ -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
+4
View File
@@ -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
}
+4
View File
@@ -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
}
+21 -2
View File
@@ -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::<Vec<_>>()
})
.collect()
.collect::<Vec<_>>();
// 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<iced::Point> = 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