feat:(BEDIT) : add Polar Stretch block action authoring and evaluation

Enable Polar Stretch actions through the authoring palette and BACTION command. Persist native action data, edit target selections and frames, and evaluate parameter-driven displacement on block references.
This commit is contained in:
Karim Jerbi committed 2026-10-17 23:24:20 +01:00
1 parent 4aa4b72d17
commit bbf5afe53d
8 files changed
+263 -32

No files matched your search

+1 -1
View File
@@ -95,7 +95,7 @@ impl OpenCADStudio {
};
if !args.is_empty() && kind.is_none() {
self.command_line.push_error(
crate::t!("Supported actions: Move, Scale, Stretch, Rotate, Flip, Array. Other action types are not wired yet.")
crate::t!("Supported actions: Move, Scale, Stretch, Polar Stretch, Rotate, Flip, Array. Other action types are not wired yet.")
.as_ref(),
);
return Task::none();
+5 -2
View File
@@ -181,7 +181,10 @@ impl OpenCADStudio {
return Task::none();
}
}
if matches!(cmd.split(' ').next(), Some("BACTION" | "BACTIONTOOL" | "BARRAY")) {
if matches!(
cmd.split(' ').next(),
Some("BACTION" | "BACTIONTOOL" | "BARRAY")
) {
let args = if cmd == "BARRAY" || cmd.starts_with("BARRAY ") {
"ARRAY"
} else {
@@ -190,7 +193,7 @@ impl OpenCADStudio {
if !args.is_empty() && crate::scene::block_actions::Kind::parse(args).is_none() {
self.command_line.push_error(
crate::t!(
"Supported actions: Move, Scale, Stretch, Rotate, Flip, Array. Other action types are not wired yet."
"Supported actions: Move, Scale, Stretch, Polar Stretch, Rotate, Flip, Array. Other action types are not wired yet."
)
.as_ref(),
);
+1
View File
@@ -416,6 +416,7 @@ impl OpenCADStudio {
self.action_error(Some(crate::scene::block_actions::Kind::Rotate)),
self.action_error(Some(crate::scene::block_actions::Kind::Flip)),
self.action_error(Some(crate::scene::block_actions::Kind::Stretch)),
self.action_error(Some(crate::scene::block_actions::Kind::PolarStretch)),
self.action_error(Some(crate::scene::block_actions::Kind::Array)),
)
}