feat: apply OCS→WCS transform for Point entity

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Sonnet 4.6 committed 2026-05-02 17:18:54 +03:00
1 parent 5a7ebbbb38
commit 3c414f43a3
1 file changed
+7 -2
+7 -2
View File
@@ -10,8 +10,13 @@ use crate::scene::object::{GripApply, GripDef, PropSection};
use crate::scene::wire_model::SnapHint;
fn to_truck(pt: &Point) -> TruckEntity {
let p = Point3::new(pt.location.x, pt.location.y, pt.location.z);
let snap = Vec3::new(p.x as f32, p.y as f32, p.z as f32);
let normal = (pt.normal.x, pt.normal.y, pt.normal.z);
let (wx, wy, wz) = crate::scene::transform::ocs_point_to_wcs(
(pt.location.x, pt.location.y, pt.location.z),
normal,
);
let p = Point3::new(wx, wy, wz);
let snap = Vec3::new(wx as f32, wy as f32, wz as f32);
TruckEntity {
object: TruckObject::Point(builder::vertex(p)),
snap_pts: vec![(snap, SnapHint::Node)],