From 412fb857bac1257409c18c52b9eb69729cb0294e Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 16 May 2026 02:04:41 +0300 Subject: [PATCH] chore: drop legacy comments and the last unused dead_code allows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * io/xref.rs — replaced the 7-line "BlockRecord::is_loaded turned out to be unreliable" rationale with a one-liner. The reverted experiment lives in git history (e88a946, 0996b75). * refedit::RefEditSession.insert_handle — set at construction but never read; the "kept for future REFCLOSE DISCARD" TODO can come back via git history when that feature lands. * scene::mod — dropped the placeholder MeshModel re-export; nothing outside `mesh_model` consumes the bare name and MeshLodSet is the pipeline-facing type now. Co-Authored-By: Claude Opus 4.7 --- src/app/commands.rs | 1 - src/io/xref.rs | 10 +--------- src/modules/home/modify/refedit.rs | 3 --- src/scene/mod.rs | 2 -- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/app/commands.rs b/src/app/commands.rs index 122be5918..106a96d5c 100644 --- a/src/app/commands.rs +++ b/src/app/commands.rs @@ -1890,7 +1890,6 @@ impl H7CAD { } let session = RefEditSession { - insert_handle, block_name: insert.block_name.clone(), br_handle, temp_handles: vec![], diff --git a/src/io/xref.rs b/src/io/xref.rs index 6572c5c4a..cca3acab7 100644 --- a/src/io/xref.rs +++ b/src/io/xref.rs @@ -37,15 +37,7 @@ pub struct XrefInfo { /// /// Returns a list of [`XrefInfo`] describing each xref block found. pub fn resolve_xrefs(doc: &mut CadDocument, base_dir: &Path) -> Vec { - // Collect xref blocks: (name, raw_path, block_record_handle) - // - // Note: `BlockRecord::is_loaded` (the DWG R2000+ "loaded" bit) turned out - // to be unreliable as a signal of AutoCAD's Unload state — different - // files with xrefs the manager calls "Loaded" carry both `Some(true)` - // and `Some(false)` on disk. Until we identify the actual on-disk - // representation of XREF→Unload (likely in an XREF dependency record - // or ACAD_XREF_PANEL_DATA xrecord), we auto-resolve every xref and - // rely on frustum culling to keep the GPU bounded. + // Auto-resolve every xref — frustum + LOD culling keep GPU cost bounded. let xref_entries: Vec<(String, String, Handle)> = doc .block_records .iter() diff --git a/src/modules/home/modify/refedit.rs b/src/modules/home/modify/refedit.rs index a3806f034..a1c6ebcf5 100644 --- a/src/modules/home/modify/refedit.rs +++ b/src/modules/home/modify/refedit.rs @@ -23,9 +23,6 @@ use crate::command::{CadCommand, CmdResult}; /// Active REFEDIT session. Lives in `DocumentTab::refedit_session`. #[derive(Debug, Clone)] pub struct RefEditSession { - /// The INSERT entity being edited (kept for future REFCLOSE DISCARD). - #[allow(dead_code)] - pub insert_handle: Handle, /// Name of the block being edited. pub block_name: String, /// Handle of the block record (owns the block entities). diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 8e39a1f07..4a08e2e05 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -28,8 +28,6 @@ pub use camera::Projection; pub use hatch_model::HatchModel; pub use image_model::ImageModel; pub use mesh_model::MeshLodSet; -#[allow(unused_imports)] -pub use mesh_model::MeshModel; pub use object::{GripApply, GripDef}; pub use pipeline::uniforms::Uniforms; pub use pipeline::viewcube::{hit_test, CubeRegion, VIEWCUBE_DRAW_PX, VIEWCUBE_PAD, VIEWCUBE_PX};