forked from 1b-agent/opencadstudio-upstream
refactor: remove the last world_offset zero-locals
Clean up the remaining `let [ox,oy,oz] = [0,0,0]` bindings and their zero-valued add/subtract arithmetic across scene/mod.rs (mesh LOD resplit, model AABB, wide-polyline fills, wipeout boundary, hatch/solid models, insert/entity AABB), table, multileader and xclip. Coordinates now read as the plain absolute values they are. No world_offset reference remains. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
5b1a5a71a0
commit
ef8d5b2610
4 files changed
+54
-85
No files matched your search
@@ -82,7 +82,6 @@ pub fn world_clip_polygon_f64(
|
||||
) -> Vec<[f64; 2]> {
|
||||
let xform = ins.get_transform();
|
||||
let inv_block = &sf.inverse_block_transform;
|
||||
let [ox, oy, _] = [0.0_f64; 3];
|
||||
let local: Vec<[f64; 2]> = if sf.boundary_points.len() == 2 {
|
||||
let a = sf.boundary_points[0];
|
||||
let b = sf.boundary_points[1];
|
||||
@@ -95,7 +94,7 @@ pub fn world_clip_polygon_f64(
|
||||
.map(|[x, y]| {
|
||||
let block = inv_block.transform_point(Vector3::new(x, y, 0.0));
|
||||
let w = xform.apply(block);
|
||||
[w.x - ox, w.y - oy]
|
||||
[w.x, w.y]
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
@@ -243,7 +242,7 @@ pub fn clip_hatch_boundary(
|
||||
out.push([f32::NAN, f32::NAN]);
|
||||
}
|
||||
for p in clipped {
|
||||
out.push([p[0] - ox, p[1] - oy]);
|
||||
out.push([p[0], p[1]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user