fix(render): LINE/POINT endpoints are WCS, not OCS
DXF/DWG store LINE endpoints and POINT locations in world coordinates - the extrusion normal only orients the thickness sweep / glyph. Running them through the arbitrary-axis OCS mirrored every line and point carried over from a MIRROR (normal 0,0,-1) onto the wrong side of the drawing: bolt shafts of a mirrored detail block landed in the adjacent panel while its nut arcs (correctly OCS-mapped) stayed put. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
427db6cd17
commit
eb0073781f
2 changed files with 11 additions and 11 deletions
|
|
@ -30,11 +30,10 @@ fn pdsize_world(pdsize: f64) -> f64 {
|
|||
/// units. Shared by the header-driven path ([`to_truck`]) and the
|
||||
/// viewport-aware relative path ([`relative_truck`]).
|
||||
fn point_truck(pt: &Point, pdmode: i16, s: f64) -> TruckEntity {
|
||||
let normal = (pt.normal.x, pt.normal.y, pt.normal.z);
|
||||
let (wx, wy, wz) = crate::scene::view::transform::ocs_point_to_wcs(
|
||||
(pt.location.x, pt.location.y, pt.location.z),
|
||||
normal,
|
||||
);
|
||||
// POINT location is stored in WCS (the extrusion normal only orients the
|
||||
// glyph/thickness) — remapping it through the arbitrary-axis OCS moved
|
||||
// mirrored points (normal 0,0,-1) to the wrong side of the drawing.
|
||||
let (wx, wy, wz) = (pt.location.x, pt.location.y, pt.location.z);
|
||||
let snap = glam::DVec3::new(wx, wy, wz);
|
||||
if pdmode == 0 {
|
||||
// Default: a single vertex (driver handles the dot pixel).
|
||||
|
|
|
|||
Loading…
Reference in a new issue