fix(commands): migrate inquiry + fillet/align/lengthen picks to world XY (#54)

These commands still read the cursor / entity coordinate with the old
"Y-up XZ" assumption (world Z = DXF Y), which is wrong now that the
drawing plane is world XY: ID/DIST/AREA reported swapped Y↔Z values and
zero-area, and fillet/align/lengthen picked against a constant-elevation
axis. Read the drawing-plane coordinate from .y (elevation stays on .z),
matching the central transform and the entity builders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-04 10:32:38 +03:00
1 parent 3e493969b6
commit c04bdcf846
6 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -167,9 +167,9 @@ impl AlignCommand {
);
}
// Angle from src_vec to dst_vec in XZ plane
let src_angle = src_vec.z.atan2(src_vec.x);
let dst_angle = dst_vec.z.atan2(dst_vec.x);
// Angle from src_vec to dst_vec in the world XY plane
let src_angle = src_vec.y.atan2(src_vec.x);
let dst_angle = dst_vec.y.atan2(dst_vec.x);
let angle = dst_angle - src_angle;
let scale_factor = if with_scale { dst_len / src_len } else { 1.0 };