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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-24 18:35:02 +03:00
1 parent 02d40bd2ec
commit 56d507fd88
20 files changed
+190 -343

No files matched your search

+3 -4
View File
@@ -41,7 +41,6 @@ impl ImageModel {
/// Returns `None` if the image file cannot be opened or decoded.
pub fn from_raster_image(
img: &acadrust::entities::RasterImage,
world_offset: [f64; 3],
) -> Option<Self> {
let w = img.size.x;
let h = img.size.y;
@@ -50,9 +49,9 @@ impl ImageModel {
// Corners come from a large insertion point plus small u/v spans.
// Split each into double-single (high, low) f32 so the GPU keeps
// sub-unit precision at UTM scale and after a cross-drawing paste.
let oxv = img.insertion_point.x - world_offset[0];
let oyv = img.insertion_point.y - world_offset[1];
let ozv = img.insertion_point.z - world_offset[2];
let oxv = img.insertion_point.x;
let oyv = img.insertion_point.y;
let ozv = img.insertion_point.z;
let ux = (img.u_vector.x * w) as f32;
let uy = (img.u_vector.y * w) as f32;
let uz = (img.u_vector.z * w) as f32;
+2 -2
View File
@@ -105,7 +105,7 @@ pub fn edge_wires(solid: &Solid) -> Vec<acadrust::entities::Wire> {
for shell in solid.boundaries() {
for edge in shell.edge_iter() {
if let TruckTessResult::Lines(pts, pts_low) =
tessellate_edge(&edge, [0.0; 3])
tessellate_edge(&edge)
{
if pts.len() < 2 {
continue;
@@ -169,7 +169,7 @@ pub fn boolean(_op: Bool, _a: &Solid, _b: &Solid) -> Option<Solid> {
/// before world_offset is applied by the caller).
pub fn mesh_from_solid(solid: &Solid, color: [f32; 4]) -> Option<MeshLodSet> {
use crate::scene::convert::truck_tess::{tessellate_solid, TruckTessResult};
match tessellate_solid(solid, [0.0; 3]) {
match tessellate_solid(solid) {
TruckTessResult::Mesh {
verts,
verts_low,