forked from 1b-agent/opencadstudio-upstream
chore: drop dead scene/IO helpers + simplify XATTACH command state
* helpers::wcs_to_ucs — UCS inverse transform with zero call sites. * scene::Scene::compute_and_set_world_offset — never called; the load path uses the free function `compute_world_offset` directly. * tessellate::tessellate_mesh — never called; mesh tessellation goes through `solid3d_tess`, not the truck Shell/Solid path. * truck_tess::tess_to_mesh_model — orphaned with tessellate_mesh's removal. * MeshModel::WHITE / MeshModel::SELECTED — only used by the removed tessellate_mesh. * xattach::Step::FilePath variant — never constructed; XATTACH always enters through `with_path` after the file picker. Replaced the Step enum + prefilled_path field with flat `path` / `block_name` fields and dropped the unreachable text-input flow. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
22543e4f97
commit
a1ed87da3d
7 files changed
+19
-163
No files matched your search
@@ -46,29 +46,6 @@ pub(super) fn ucs_to_wcs(pt: glam::Vec3, ucs: &Ucs) -> glam::Vec3 {
|
||||
o + x * pt.x + y * pt.y + z_ax * pt.z
|
||||
}
|
||||
|
||||
/// Convert a WCS point back to UCS local coordinates.
|
||||
#[allow(dead_code)]
|
||||
pub(super) fn wcs_to_ucs(pt: glam::Vec3, ucs: &Ucs) -> glam::Vec3 {
|
||||
let o = glam::Vec3::new(
|
||||
ucs.origin.x as f32,
|
||||
ucs.origin.y as f32,
|
||||
ucs.origin.z as f32,
|
||||
);
|
||||
let x = glam::Vec3::new(
|
||||
ucs.x_axis.x as f32,
|
||||
ucs.x_axis.y as f32,
|
||||
ucs.x_axis.z as f32,
|
||||
);
|
||||
let y = glam::Vec3::new(
|
||||
ucs.y_axis.x as f32,
|
||||
ucs.y_axis.y as f32,
|
||||
ucs.y_axis.z as f32,
|
||||
);
|
||||
let z_ax = ucs_z_axis(ucs);
|
||||
let d = pt - o;
|
||||
glam::Vec3::new(d.dot(x), d.dot(y), d.dot(z_ax))
|
||||
}
|
||||
|
||||
/// Return the normalised Z axis of a UCS (cross product of X and Y axes).
|
||||
pub(super) fn ucs_z_axis(ucs: &Ucs) -> glam::Vec3 {
|
||||
let x = glam::Vec3::new(
|
||||
|
||||
Reference in new issue
Block a user