forked from 1b-agent/opencadstudio-upstream
refactor(snap): producers emit f64 snap points (world_offset removal P3)
TruckEntity.snap_pts is now DVec3 and every entity producer builds snap candidates straight from the acadrust f64 coordinates instead of casting to f32 first (text, mtext, arc, circle, ellipse, point, shape, solid, mline, mtext, attribute, tolerance, table, underlay, ole2frame, mesh, multileader, dimension, block-cache). offset_snap_pts stays f64 throughout. Still offset-relative (inert) — but snap precision is no longer capped at ~0.5 m by an early f32 cast, which fixes a latent UTM-scale snap error and sets up the absolute-coordinate switch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
a7a1fac09a
commit
cd1d3bb619
18 files changed
+43
-85
No files matched your search
@@ -6,7 +6,6 @@
|
||||
// gives a rough indication of the glyph orientation.
|
||||
|
||||
use acadrust::entities::Shape;
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::command::EntityTransform;
|
||||
use crate::entities::common::{edit_prop as edit, ro_prop as ro, square_grip};
|
||||
@@ -63,7 +62,7 @@ impl TruckConvertible for Shape {
|
||||
let oz = self.insertion_point.z;
|
||||
let size = self.size.abs().max(0.5);
|
||||
|
||||
let snap_pt = Vec3::new(ox as f32, oy as f32, oz as f32);
|
||||
let snap_pt = glam::DVec3::new(ox, oy, oz);
|
||||
let pts = shape_marker(
|
||||
ox,
|
||||
oy,
|
||||
|
||||
Reference in new issue
Block a user