forked from 1b-agent/opencadstudio-upstream
feat(block-editor): wire Rotation, Alignment and Flip parameter placement
Enable the existing palette rows and BPARAMETER choices. Rotation accepts a center, picked or numeric radius, and picked or numeric default angle. Alignment places a tangent direction from its base point. Flip places a reflection line and state label, with native grip and state expressions. Extend shared graph append/capacity checks for Flip's additional state node while preserving existing subgraphs. Keep Polar/Rotation angle labels unique in either placement order. Add editor graphics, extents and definition reframing through the existing overlay/history/save paths. This milestone implements native parameter placement and persistence. Rotate/Flip action association, reference alignment/grip editing, parameter property editing and parameter sets remain separate work. Validation covers command and palette placement, cancellation, local/parent undo, save/discard, native DWG/DXF objects, existing graph preservation and the 17 research fixtures. Broader block/dock regressions and editor renders are also checked.
This commit is contained in:
1 parent
6dab5a7229
commit
72c762e944
19 files changed
+1483
-25
No files matched your search
@@ -28,7 +28,7 @@ impl CadCommand for VisibilityParameterCommand {
|
||||
fn prompt(&self) -> String {
|
||||
if self.choosing_type {
|
||||
crate::t!(
|
||||
"BPARAMETER Enter parameter type [Point/Linear/Polar/XY/Visibility] <Visibility>:"
|
||||
"BPARAMETER Enter parameter type [Point/Linear/Polar/XY/Rotation/Alignment/Flip/Visibility] <Visibility>:"
|
||||
)
|
||||
.into_owned()
|
||||
} else {
|
||||
@@ -43,6 +43,9 @@ impl CadCommand for VisibilityParameterCommand {
|
||||
CmdOption::new(crate::t!("Linear").as_ref(), "L"),
|
||||
CmdOption::new(crate::t!("Polar").as_ref(), "PO"),
|
||||
CmdOption::new(crate::t!("XY").as_ref(), "XY"),
|
||||
CmdOption::new(crate::t!("Rotation").as_ref(), "R"),
|
||||
CmdOption::new(crate::t!("Alignment").as_ref(), "A"),
|
||||
CmdOption::new(crate::t!("Flip").as_ref(), "F"),
|
||||
CmdOption::new(crate::t!("Visibility").as_ref(), "V"),
|
||||
]
|
||||
} else {
|
||||
@@ -68,13 +71,16 @@ impl CadCommand for VisibilityParameterCommand {
|
||||
"L" | "LINEAR" => CmdResult::Dispatch("BPARAMETER LINEAR".into()),
|
||||
"PO" | "POLAR" => CmdResult::Dispatch("BPARAMETER POLAR".into()),
|
||||
"XY" => CmdResult::Dispatch("BPARAMETER XY".into()),
|
||||
"R" | "ROTATION" => CmdResult::Dispatch("BPARAMETER ROTATION".into()),
|
||||
"A" | "ALIGNMENT" => CmdResult::Dispatch("BPARAMETER ALIGNMENT".into()),
|
||||
"F" | "FLIP" => CmdResult::Dispatch("BPARAMETER FLIP".into()),
|
||||
"P" | "POINT" => CmdResult::Dispatch("BPARAMETER POINT".into()),
|
||||
"" | "V" | "VISIBILITY" => {
|
||||
self.choosing_type = false;
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
_ => CmdResult::ReportError(
|
||||
crate::t!("Supported parameter types: Point, Linear, Polar, XY, Visibility.")
|
||||
crate::t!("Supported parameter types: Point, Linear, Polar, XY, Rotation, Alignment, Flip, Visibility.")
|
||||
.into_owned(),
|
||||
),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user