fix(draw): build entities in the world XY plane, not a stale Y-up swap (#54)

The pick/typed point is the world XY plane (z = elevation = 0), but
several entity builders still mapped the screen point as if the world
were Y-up (drawing in XZ), reading the constant elevation as the DXF Y.
That collapsed shapes onto a single line — e.g. a revision cloud always
came out as two horizontal lines regardless of the path drawn.

Map the drawing-plane point straight through (x→x, y→y, z→elevation) in:
revcloud, donut, mline, raster image, wipeout (polygonal + rectangular),
table, attribute definition, and tolerance. Previews already used the
correct pass-through, so they matched the cursor; only the committed
geometry was wrong.

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:18:12 +03:00
1 parent 12e5a4b744
commit 3e493969b6
8 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ impl CadCommand for TableCommand {
fn on_point(&mut self, pt: Vec3) -> CmdResult {
if let Step::Insertion { cols, rows } = self.step {
let ins = Vector3::new(pt.x as f64, pt.z as f64, pt.y as f64);
let ins = Vector3::new(pt.x as f64, pt.y as f64, pt.z as f64);
let table = TableBuilder::new(rows, cols)
.at(ins)
.row_height(ROW_HEIGHT)
+1 -1
View File
@@ -66,7 +66,7 @@ impl CadCommand for ToleranceCommand {
fn on_point(&mut self, pt: Vec3) -> CmdResult {
if let Step::Insertion { text } = &self.step {
let ins = Vector3::new(pt.x as f64, pt.z as f64, pt.y as f64);
let ins = Vector3::new(pt.x as f64, pt.y as f64, pt.z as f64);
let tol = Tolerance::with_text(ins, text.clone());
CmdResult::CommitAndExit(EntityType::Tolerance(tol))
} else {