Aligned dimensional constraint: Point & line, 2Lines, value and property parity

DCALIGNED opens with `[Object/Point & line/2Lines] <Object>`. Point & line
asks `Specify constraint point or [Line] <Line>:` then `Select line:` (or the
line first and `Select constraint point:`), measures perpendicular to the
line from the constraint point to the line end nearest to it, and stores a
directed distance with the line as direction reference. 2Lines asks
`Select first line:` and `Select second line to make parallel:`, adds a
Parallel constraint solved with the first line pinned, then measures on the
solved geometry between the nearest ends. Unsupported line picks report the
reference's message; the same measurement again reports `The constraint
already exists on the selected objects.` and ends the command; an invalid
expression reports both reference lines and asks again.

The offered default and seeded expression carry twelve significant digits;
a typed value moves the second point (or the other object) while the first
point and its measured line stay, negative values keep their sign in the
parameter and use their magnitude, zero folds the points together, and the
dynamic dimension's origins follow every solve. The lock mark sits after the
text, a selected dynamic dimension shows triangle grips at its points and the
text square, and its Properties show the Constraint section (Name and
Expression editable) plus Text rotation.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
ramox81andClaude Fable 5.1 committed 2026-09-21 14:52:37 +03:00
1 parent 971abe64a4
commit 6969c19746
8 files changed
+855 -64

No files matched your search

+20
View File
@@ -1625,10 +1625,22 @@ pub enum CmdResult {
second_point: DVec3,
location: DVec3,
axis: DVec3,
/// Aligned's Point & line / 2Lines: the line the distance is
/// measured perpendicular to.
direction: Option<crate::scene::parametric_constraints::ParametricRef>,
name: String,
expression: String,
label: &'static str,
},
/// Aligned's 2Lines: makes `second_line` parallel to `first_line` (whose
/// ends stay put), then hands the second line's solved ends back through
/// `CadCommand::accept_parallel_line`.
MakeParallel {
first_line: crate::scene::parametric_constraints::ParametricRef,
first_ends: [crate::scene::parametric_constraints::ParametricRef; 2],
second_line: crate::scene::parametric_constraints::ParametricRef,
second_ends: [crate::scene::parametric_constraints::ParametricRef; 2],
},
/// Adds a point or object symmetry relation around a picked line. The
/// first reference and axis remain fixed during initial placement.
AddSymmetricConstraint {
@@ -2482,6 +2494,14 @@ pub trait CadCommand: Send {
CmdResult::NeedPoint
}
/// The second line's ends after a `MakeParallel` solve.
fn accept_parallel_line(
&mut self,
_ends: [(crate::scene::parametric_constraints::ParametricRef, DVec3); 2],
) -> CmdResult {
CmdResult::NeedPoint
}
/// Include filled hatch / DXF SOLID regions in the entity hit-test.
///
/// Most entity-pick commands operate on curve geometry and intentionally