forked from 1b-agent/opencadstudio-upstream
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
64c020293a
commit
aab42e2aa9
11 files changed
+516
-87
No files matched your search
@@ -1891,10 +1891,20 @@ impl OpenCADStudio {
|
||||
self.tabs[i].active_cmd = Some(Box::new(command));
|
||||
}
|
||||
|
||||
"DCONSTRAINT" | "DCRADIUS" | "DCDIAMETER" => {
|
||||
if cmd == "DCRADIUS" {
|
||||
self.dim_constraint_last = "Radius";
|
||||
} else if cmd == "DCDIAMETER" {
|
||||
"DCRADIUS" => {
|
||||
use crate::modules::parametric::{DimConstraintAxis, DimConstraintCommand};
|
||||
use crate::scene::parametric_constraints::next_radial_parameter_name;
|
||||
// Run on its own it leaves DIMCONSTRAINT's default alone.
|
||||
let name = next_radial_parameter_name(self.tabs[i].scene.named_parameters());
|
||||
// The circle or arc is picked inside the command.
|
||||
self.tabs[i].scene.deselect_all();
|
||||
let command = DimConstraintCommand::new(DimConstraintAxis::Radius, name);
|
||||
self.command_line.push_info(&command.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(command));
|
||||
}
|
||||
|
||||
"DCONSTRAINT" | "DCDIAMETER" => {
|
||||
if cmd == "DCDIAMETER" {
|
||||
self.dim_constraint_last = "Diameter";
|
||||
}
|
||||
let handles = self.tabs[i].scene.selected_handles_in_order();
|
||||
|
||||
Reference in new issue
Block a user