forked from 1b-agent/opencadstudio-upstream
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:
1 parent
3e493969b6
commit
c04bdcf846
6 files changed
+21
-21
No files matched your search
@@ -22,10 +22,10 @@ impl CadCommand for IdCommand {
|
||||
}
|
||||
|
||||
fn on_point(&mut self, pt: Vec3) -> CmdResult {
|
||||
// Y-up world: X stays X, Z→drawing Y, Y→elevation Z
|
||||
// Drawing plane is world XY (z = elevation).
|
||||
let x = pt.x;
|
||||
let y = pt.z;
|
||||
let z = pt.y;
|
||||
let y = pt.y;
|
||||
let z = pt.z;
|
||||
let msg = format!("X = {x:.4}, Y = {y:.4}, Z = {z:.4}");
|
||||
CmdResult::Measurement(msg)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user