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 <[email protected]>
This commit is contained in:
1 parent
02d40bd2ec
commit
56d507fd88
20 files changed
+190
-343
No files matched your search
@@ -101,13 +101,11 @@ crate::impl_entity_basics!(Insert);
|
||||
impl crate::entities::traits::FallbackTess for Insert {
|
||||
fn fallback_geometry(
|
||||
&self,
|
||||
world_offset: [f64; 3],
|
||||
) -> crate::scene::convert::tess_util::FallbackGeometry {
|
||||
let [ox, oy, oz] = world_offset;
|
||||
let (ipx, ipy, ipz) = (
|
||||
self.insert_point.x - ox,
|
||||
self.insert_point.y - oy,
|
||||
self.insert_point.z - oz,
|
||||
self.insert_point.x,
|
||||
self.insert_point.y,
|
||||
self.insert_point.z,
|
||||
);
|
||||
let ip = Vec3::new(ipx as f32, ipy as f32, ipz as f32);
|
||||
let s = 0.1_f64;
|
||||
@@ -139,7 +137,6 @@ pub(crate) fn append_insert_attribute_wires(
|
||||
is_xref: bool,
|
||||
pslt_factor: f32,
|
||||
anno_scale: f32,
|
||||
world_offset: [f64; 3],
|
||||
) {
|
||||
if ins.attributes.is_empty() {
|
||||
return;
|
||||
@@ -172,7 +169,7 @@ pub(crate) fn append_insert_attribute_wires(
|
||||
} else {
|
||||
sub_color
|
||||
};
|
||||
let sub_aabb = crate::scene::entity_aabb(&attr_entity, world_offset);
|
||||
let sub_aabb = crate::scene::entity_aabb(&attr_entity);
|
||||
let mut attr_wires = tessellate::tessellate(
|
||||
document,
|
||||
insert_handle,
|
||||
@@ -182,7 +179,6 @@ pub(crate) fn append_insert_attribute_wires(
|
||||
sub_plen * pslt_factor,
|
||||
sub_pat.map(|v| v * pslt_factor),
|
||||
sub_lw_px,
|
||||
world_offset,
|
||||
anno_scale,
|
||||
None,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user