forked from 1b-agent/opencadstudio-upstream
refactor: remove dead world_offset plumbing (RTE migration is complete)
Now that geometry reaches the GPU/CPU as absolute coordinates via the double-single relative-to-eye path, world_offset is always [0,0,0]. Strip the parameter that was threaded through the whole tessellation / block- expansion / fallback / camera-decode chain and the ExpandCtx field that carried it — ~340 references across 20 files, all subtracting zero. - truck_tess: to_local / to_local_low / tessellate_* drop the offset arg; to_local is now a pure double-single split. - tessellate: offset_to_ds → points_to_ds (pure DS split); tessellate(), tessellate_entity(), fallback_geometry(), solid_wire_fallback(), entity_aabb(), expand_insert(), expand_block_meshes(), the dimension helpers (vec3_local, dimension_snap_pts, …), text_support, leader, multileader, image_model, xclip and camera_from_view all lose the param. - block_cache: ExpandCtx loses its world_offset field. - Remove the now-dead offset_snap_pts and the unused set_grid_snap. Behaviour is unchanged (the offset was zero everywhere); the compiler verifies every call site. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
02d40bd2ec
commit
56d507fd88
20 files changed
+190
-343
No files matched your search
@@ -1702,7 +1702,6 @@ pub(crate) fn text_obb_corners_native(
|
||||
pub(crate) fn text_baseline_points(
|
||||
e: &EntityType,
|
||||
anno_scale: f32,
|
||||
world_offset: [f64; 3],
|
||||
n_lines: usize,
|
||||
) -> Vec<[f32; 3]> {
|
||||
let Some(corners) = text_obb_corners_native(e, anno_scale, Some(n_lines)) else {
|
||||
@@ -1723,7 +1722,7 @@ pub(crate) fn text_baseline_points(
|
||||
return vec![];
|
||||
}
|
||||
let n_lines = n_lines.max(1);
|
||||
let [ox, oy, oz] = world_offset;
|
||||
let [ox, oy, oz] = [0.0_f64; 3];
|
||||
let cast = |p: [f64; 3]| -> [f32; 3] {
|
||||
[(p[0] - ox) as f32, (p[1] - oy) as f32, (p[2] - oz) as f32]
|
||||
};
|
||||
@@ -1763,7 +1762,6 @@ pub(crate) fn text_baseline_points(
|
||||
pub(crate) fn text_greek_obb_tris(
|
||||
e: &EntityType,
|
||||
anno_scale: f32,
|
||||
world_offset: [f64; 3],
|
||||
n_lines: usize,
|
||||
) -> Vec<[f32; 3]> {
|
||||
let Some(corners) = text_obb_corners_native(e, anno_scale, Some(n_lines)) else {
|
||||
@@ -1784,7 +1782,7 @@ pub(crate) fn text_greek_obb_tris(
|
||||
return vec![];
|
||||
}
|
||||
let n_lines = n_lines.max(1);
|
||||
let [ox, oy, oz] = world_offset;
|
||||
let [ox, oy, oz] = [0.0_f64; 3];
|
||||
let cast = |p: [f64; 3]| -> [f32; 3] {
|
||||
[(p[0] - ox) as f32, (p[1] - oy) as f32, (p[2] - oz) as f32]
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user