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:
Karim Jerbi committed 2026-10-15 16:50:47 +01:00
1 parent 6dab5a7229
commit 72c762e944
19 files changed
+1483 -25

No files matched your search

+7 -1
View File
@@ -176,10 +176,15 @@ pub(crate) fn create(
if let Some(error) = points_error(kind, base, end, label) {
return Err(error);
}
let names = parameters(document, definition)
let mut names = parameters(document, definition)
.into_iter()
.flat_map(|p| p.labels)
.collect::<Vec<_>>();
names.extend(
super::block_orientation_parameter::parameters(document, definition)
.into_iter()
.map(|p| p.label),
);
let unique = |prefix: &str| {
(1..)
.map(|n| format!("{prefix}{n}"))
@@ -329,6 +334,7 @@ pub(crate) fn create(
#[derive(Default)]
pub(crate) struct Graphic {
pub lines: Vec<[Vector3; 2]>,
pub round_grips: Vec<Vector3>,
pub dimensions: Vec<[Vector3; 2]>,
pub labels: Vec<(Vector3, String)>,
pub grips: Vec<(Vector3, bool)>, // Linear uses a direction arrow; others a square.