DCRADIUS: reference radial dimensional constraint with a dynamic radial dimension

Select arc or circle / Dimension text / dimension line location / value or
name prompts with a radN parameter, invalid-selection, miss, duplicate and
invalid-expression messages, negative values as magnitudes, a dynamic radial
dimension on the constraints layer drawn as the reference does (mid-radius
text on the center-to-rim line, no hook, no center mark, one text grip), the
stored text position following the radius, center-anchored resizing, the
Properties title and Constraint section, DIMCONSTRAINT's Radius default,
the small-button Dimensional ribbon grid and tooltip descriptions.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
ramox81andClaude Fable 5.1 committed 2026-09-22 13:09:47 +03:00
1 parent 64c020293a
commit aab42e2aa9
11 files changed
+516 -87

No files matched your search

+8 -7
View File
@@ -996,14 +996,15 @@ fn resolved_target(params: &ParameterTable, constraint: &ParametricConstraint) -
// A dimensional distance keeps its sign in the parameter but measures
// its magnitude, as the reference does (`d1=-50` shortens the line to
// 50; `0` folds the points together).
if constraint.kind == ConstraintKind::Distance {
return Some(value.abs());
// A radius or diameter likewise (`rad1=-20` is a radius of 20); zero is
// no circle at all.
match constraint.kind {
ConstraintKind::Distance => Some(value.abs()),
ConstraintKind::Radius | ConstraintKind::Diameter => {
(value != 0.0).then(|| value.abs())
}
_ => Some(value),
}
let must_be_positive = matches!(
constraint.kind,
ConstraintKind::Radius | ConstraintKind::Diameter
);
(!must_be_positive || value > 0.0).then_some(value)
}
fn oriented_distance(target: f64, current_projection: f64) -> f64 {