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:
parent
a7a1fac09a
commit
cd1d3bb619
18 changed files with 43 additions and 85 deletions
|
|
@ -1,6 +1,5 @@
|
|||
use acadrust::entities::Point;
|
||||
use acadrust::EntityType;
|
||||
use glam::Vec3;
|
||||
use truck_modeling::{builder, Point3};
|
||||
|
||||
use crate::command::EntityTransform;
|
||||
|
|
@ -36,7 +35,7 @@ fn point_truck(pt: &Point, pdmode: i16, s: f64) -> TruckEntity {
|
|||
(pt.location.x, pt.location.y, pt.location.z),
|
||||
normal,
|
||||
);
|
||||
let snap = Vec3::new(wx as f32, wy as f32, wz as f32);
|
||||
let snap = glam::DVec3::new(wx, wy, wz);
|
||||
if pdmode == 0 {
|
||||
// Default: a single vertex (driver handles the dot pixel).
|
||||
let p = Point3::new(wx, wy, wz);
|
||||
|
|
|
|||
Loading…
Reference in a new issue