feat(block-editor): author Move and Scale actions with Test Block evaluation

Add BACTION/BACTIONTOOL workflows for compatible parameter endpoints, selected geometry and native action markers. Persist Move/Scale records, target handles and evaluation graph bindings; reuse shared adjacency editing with Lookup and the existing palette, tooltips and selection UI.

Evaluate endpoint changes in the disposable Test Block document from immutable starting geometry, with geometry/grip undo, source isolation and transformed-reference support. Preserve visibility representations and their native Basepoint anchor. Refuse unsupported options, value constraints and shared test references.

This milestone supports default Move and uniform Scale on basic drawing entities. Other actions, custom options, live preview and ordinary drawing-reference evaluation remain pending.

Validation: self-contained synthetic DWG/DXF roundtrips, graph adjacency, command cancellation/history, Test Block isolation/undo, transformed references, visibility/Basepoint and real-view palette/viewport input checks; broader block and dock suites.

Keep action object selection active across mouse picks/removals and advance only on Enter. Cover empty selection, multiple targets, Shift removal, marker placement and Move/Scale Test Block evaluation using viewport mouse events. Verified 10 focused, 320 block and 39 dock tests (6 existing opt-in block checks ignored).
This commit is contained in:
Karim Jerbi committed 2026-10-16 17:05:18 +01:00
1 parent 10c5a9d382
commit f69aefc3df
25 files changed
+1914 -39

No files matched your search

+14
View File
@@ -1514,6 +1514,20 @@ impl DimensionPreview {
/// Returned by every `CadCommand` method to tell main.rs what to do.
#[allow(dead_code)]
pub enum CmdResult {
PlaceBlockAction {
document: u64,
definition: Handle,
kind: crate::scene::block_actions::Kind,
parameter: Handle,
targets: Vec<Handle>,
location: DVec3,
},
EvaluateBlockParameter {
document: u64,
definition: Handle,
parameter: Handle,
position: DVec3,
},
/// Place or relocate a Basepoint, or place a Lookup parameter.
PlaceBlockSingleParameter {
document_id: u64,