Match Vertical geometric constraint behavior

1) VCONSTRAINT (and the new GCVERTICAL name) uses the axis constraint flow:
   "Select an object or [2Points] <2Points>:", 2Points mode with the
   reference's re-prompts and messages, and the same object types as
   Horizontal — line, polyline segment, text, MText, ellipse axis.
2) Object mode turns the object about its first vertex; a two-point relation
   across two objects slides the second object rigidly onto the axis.
3) Re-applying an axis constraint reports that the constraint already
   exists; Vertical follows the UCS Y direction.
4) The constraint bar draws Vertical as the reference's axis mark, with the
   point marker for a two-point relation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Fable 5.1 committed 2026-09-18 18:19:49 +03:00
1 parent 2b38f798c0
commit 26e458d6f7
6 files changed
+271 -75

No files matched your search

+16 -1
View File
@@ -863,6 +863,19 @@ impl ConstraintKind {
}
}
/// Vertical draws the reference bar's axis mark (`src/ui/overlay.rs`): the
/// plain symbol for an object, this variant — with the point marker — for a
/// two-point relation.
pub(crate) const VERTICAL_POINTS_GLYPH: &str = "│·";
pub(crate) fn vertical_glyph_label(constraint: &ParametricConstraint) -> &'static str {
if constraint.refs.len() == 2 {
VERTICAL_POINTS_GLYPH
} else {
ConstraintKind::Vertical.glyph_symbol()
}
}
/// The full glyph text for one constraint: its symbol, plus the driving
/// value for a dimensional kind (Distance/Angle/Radius).
pub(crate) fn glyph_label(constraint: &ParametricConstraint) -> String {
@@ -1659,7 +1672,9 @@ impl super::Scene {
})
.flat_map(|c| {
let is_conflicting = set.conflicts.iter().any(|(id, _)| *id == c.id);
let label = if show_values {
let label = if c.kind == ConstraintKind::Vertical {
vertical_glyph_label(c).to_string()
} else if show_values {
glyph_label(c)
} else {
c.kind.glyph_symbol().to_string()