fix(commands): finish the world-XY coordinate migration (#54)

The drawing plane is world XY, but break, join, rectangular array, the
stretch/window move, the spline preview wire and several doc comments
still used the stale "Y-up XZ" mapping (world Z = DXF Y). That made
those commands operate against a constant-elevation axis: arc/circle/
line/spline break and join picked the wrong points, rectangular array
stepped rows along the Z (elevation) axis, window-stretch tested the
wrong window bound, and the spline wire drew in the wrong plane.

Map every drawing-plane coordinate through .y (elevation on .z),
matching the entity builders, the inquiry commands and the central
transform. Stale Y-up comments updated to avoid future confusion.

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:39:43 +03:00
1 parent c04bdcf846
commit c7a7f2f742
9 files changed
+35 -34

No files matched your search

+4 -4
View File
@@ -15,13 +15,13 @@ use glam::Vec3;
/// A geometric transformation applied to existing entities.
#[derive(Clone)]
pub enum EntityTransform {
/// Move every point by the given world-space delta (Y-up XZ plane).
/// Move every point by the given world-space delta (world XY plane).
Translate(Vec3),
/// Rotate around `center` by `angle_rad` in the XZ plane (Y-up).
/// Rotate around `center` by `angle_rad` in the world XY plane.
Rotate { center: Vec3, angle_rad: f32 },
/// Uniform scale from `center` by `factor`.
Scale { center: Vec3, factor: f32 },
/// Mirror across the line through `p1`→`p2` in the XZ plane (Y-up).
/// Mirror across the line through `p1`→`p2` in the world XY plane.
Mirror { p1: Vec3, p2: Vec3 },
}
@@ -32,7 +32,7 @@ pub enum EntityTransform {
pub enum TangentObject {
/// Infinite line through two world-space XZ-plane points.
Line { p1: Vec3, p2: Vec3 },
/// Circle in the XZ plane.
/// Circle in the world XY plane.
Circle { center: Vec3, radius: f32 },
}