forked from 1b-agent/opencadstudio-upstream
feat(blocks): wire Stretch actions and independent reference evaluation
Author a native Stretch action from a Linear, Polar or XY parameter, a two-corner stretch frame, an object selection and a marker. Preview and retain its frame in BEDIT, with selectable and movable action markers. Freeze line and planar lightweight-polyline vertex bindings, preserve curved-segment height, move wholly selected objects, and evaluate independent saved INSERTs from their definition. Retain native DWG/DXF data, copied-reference isolation and undo/redo. Validate with synthetic frame, topology, parameter, history, Test Block, drawing-reference, COPY and roundtrip regressions: 340 block tests pass (6 existing opt-in ignored), plus 41 dock and 27 viewport tests. Other entity types, Polar Stretch, custom multipliers and chaining remain unsupported.
This commit is contained in:
1 parent
94940ad77c
commit
042f26a4cc
14 files changed
+827
-27
No files matched your search
@@ -1244,6 +1244,27 @@ fn block_actions_palette_controls_require_compatible_parameters_and_start_comman
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn block_actions_stretch_palette_requires_distance_parameter() {
|
||||
with_stack(|| {
|
||||
let mut app = authoring_app();
|
||||
let _ = app.dispatch_command("BAUTHORPALETTE");
|
||||
app.authoring_palette_tab = crate::ui::window::authoring_palettes::Tab::Actions;
|
||||
let point = authoring_control(&app, "authoring-tool-stretch-action");
|
||||
authoring_click(&mut app, point);
|
||||
assert!(app.tabs[app.active_tab].active_cmd.is_none());
|
||||
let _ = app.run_command_line("BPARAMETER LINEAR 0,0 10,0 5,2");
|
||||
let point = authoring_control(&app, "authoring-tool-stretch-action");
|
||||
authoring_click(&mut app, point);
|
||||
assert!(app.tabs[app.active_tab]
|
||||
.active_cmd
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.prompt()
|
||||
.contains("Stretch"));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn block_actions_rotate_flip_palette_requires_matching_parameters() {
|
||||
with_stack(|| {
|
||||
|
||||
@@ -415,6 +415,7 @@ impl OpenCADStudio {
|
||||
self.action_error(Some(crate::scene::block_actions::Kind::Scale)),
|
||||
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)),
|
||||
)
|
||||
}
|
||||
crate::ui::dock::PanelId::BlockPalette => {
|
||||
|
||||
Reference in new issue
Block a user