forked from 1b-agent/opencadstudio-upstream
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:
1 parent
4aa4b72d17
commit
bbf5afe53d
8 files changed
+263
-32
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
|
||||
@@ -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)),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user