git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit49b529eb39706fcc5e586957914bee208d0a8fbd
parent94937f1531
authorLucas Galante <lsgalante12@gmail.com>
date2026-09-25 12:09
refactor: remove the reference cube viewport guide

Gone: the Show Cube command and its Ctrl+E chord, the ToggleCube action,
the viewport's show_cube flag and its settings field, the cube mesh and
draw, the path tracer's copy of it, the dialog's switch arm, and the Cube
item in the viewport menubar's Guides menu. That menu's items are now
addressed through GUIDES_MENU / GUIDE_* constants, so Origin and Camera
Pivot kept their actions when their positions moved up. Older state.kdl
files and project display blocks carrying show_cube_enabled still load
(the key is ignored), and the meta-node migration drops an old cube value
explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 CLAUDE.md          |  8 +++++--
 src/app.rs         | 70 ++++++++++++++++++++++--------------------------------
 src/command.rs     |  1 -
 src/dialog.rs      |  3 +--
 src/geometry.rs    | 18 --------------
 src/main.rs        | 64 +++++++++++++++++++++++++++++++++++++++++--------
 src/project.rs     |  6 ++---
 src/render.rs      | 13 ++++------
 src/shortcut.rs    |  1 -
 src/viewport_3d.rs |  2 --
 src/window.rs      |  9 ++++---
 11 files changed, 101 insertions(+), 94 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index f48445e..d0194d6 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1378,7 +1378,11 @@ multi-selection, so taking `Shift+L` now would have to be given back later.
 
 The viewport's right-click menu carries the DISPLAY MODE under Frame All
 and View 1:1, in five groups a separator apart — guides (Show Grid, Show
-Origin, the
+Origin; the reference CUBE guide was removed on 2026-09-25 — its command,
+mesh, RT-scene copy, settings field and menubar item, with the Guides
+menubar addressed through `GUIDES_MENU` / `GUIDE_*` so no item slid onto
+another's action, while old files carrying `show_cube_enabled` still load),
+the
 scene furniture that is not the geometry); wireframe (switch,
 thickness); points (Show Points, Point Size, and Group Marker Scale, which
 multiplies it); overlays (Show Point Markers and its size, Show Point
@@ -1448,7 +1452,7 @@ line rather than doing nothing silently. The fill then draws through cce-ui's
 mesh shows its far wall, and no depth WRITES, so its near layers hide
 neither its far ones nor the wires — the wire pass needs no change, since
 nothing it tests against was written. The depth TEST stays on, so what is
-drawn before the fill (grid, cube, points, markers) still occludes it.
+drawn before the fill (grid, points, markers) still occludes it.
 Blending without depth writes is in submission order, so the stage pass
 re-sorts the fill's triangles FARTHEST FIRST from the eye
 (`geometry::sort_triangles_back_to_front`, centroid distance — painter's
diff --git a/src/app.rs b/src/app.rs
index 1e0ad84..32f5b01 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -427,6 +427,15 @@ pub enum ParamMenuAction {
     Separator,
 }
 
+/// The viewport menubar's Guides menu and its items, by position — the one
+/// place the order `with_item("Guides", …)` builds is spelled out, for the
+/// checkmark writes and the click dispatch in `window.rs`. The Cube item
+/// sat second until the guide was removed (2026-09-25).
+pub const GUIDES_MENU: usize = 2;
+pub const GUIDE_GRID: usize = 0;
+pub const GUIDE_ORIGIN: usize = 1;
+pub const GUIDE_CAMERA_PIVOT: usize = 2;
+
 #[derive(Debug, Clone, Copy, PartialEq)]
 pub enum ViewportMenuAction {
     /// Move the active camera so the visible node geometry fills the view.
@@ -1120,7 +1129,9 @@ pub struct ViewportSettings {
     pub show_camera_pivot_enabled: bool,
     pub camera_pivot_size: f32,
     pub show_grid_enabled: bool,
-    pub show_cube_enabled: bool,
+    // `show_cube_enabled` was the reference cube guide, removed 2026-09-25.
+    // Older state.kdl files and project display blocks still carry the key;
+    // serde ignores it, so they load unchanged.
     pub show_origin_enabled: bool,
     pub origin_size: f32,
     #[serde(default = "default_grid_thickness")]
@@ -1272,7 +1283,6 @@ impl Default for ViewportSettings {
             show_camera_pivot_enabled: false,
             camera_pivot_size: 1.0,
             show_grid_enabled: true,
-            show_cube_enabled: false,
             show_origin_enabled: true,
             network_plate: true,
             show_point_markers: false,
@@ -1452,6 +1462,7 @@ impl DesignSettings {
     /// Any test that then reached `save_settings` — `toggle_network_plate`,
     /// the dialog's toggle rows — wrote the bundled project's
     /// show_grid / show_cube / show_origin over the user's own state.kdl.
+    /// (The cube guide has since been removed.)
     /// `cargo test` reset three of the user's toggles on every run, and
     /// nothing about the run looked wrong afterwards.
     ///
@@ -1656,7 +1667,6 @@ pub struct ViewportUniforms {
 /// engine's renderer exists.
 #[derive(Clone, Copy)]
 pub struct SceneMeshes {
-    pub cube: cce_ui::vk::MeshId,
     pub viewport_bg: cce_ui::vk::MeshId,
     pub spheres: cce_ui::vk::MeshId,
     /// LINE_LIST edge expansion of `spheres` (vertex pairs per triangle
@@ -2015,7 +2025,6 @@ pub struct State {
     pub last_viewport_rotation_y: f32,
     pub last_viewport_bg_color: [f32; 3],
     pub last_viewport_show_grid: bool,
-    pub last_viewport_show_cube: bool,
     pub last_viewport_show_origin: bool,
     pub last_viewport_show_camera_pivot: bool,
     pub last_viewport_width: u32,
@@ -2160,8 +2169,8 @@ pub struct State {
     pub rt_sphere_verts: Vec<Vertex3D>,
     /// Bumped by `rebuild_scene_geometry`; part of the RT-scene cache key.
     pub rt_geometry_version: u64,
-    /// (show_cube, rt_geometry_version) the RT scene was last built from.
-    pub last_rt_scene_key: Option<(bool, u64)>,
+    /// The `rt_geometry_version` the RT scene was last built from.
+    pub last_rt_scene_key: Option<u64>,
     pub ui_context: cce_ui::context::UiContext,
 }
 
@@ -2294,7 +2303,6 @@ impl State {
                 show_camera_pivot_enabled: self.viewport().show_camera_pivot,
                 camera_pivot_size: self.camera_pivot_size,
                 show_grid_enabled: self.viewport().show_grid,
-                show_cube_enabled: self.viewport().show_cube,
                 show_origin_enabled: self.viewport().show_origin,
                 origin_size: self.origin_size,
                 grid_thickness: self.grid_thickness,
@@ -2359,7 +2367,6 @@ impl State {
             let vp = self.viewport_mut();
             vp.bg_color = v.bg_color;
             vp.show_grid = v.show_grid_enabled;
-            vp.show_cube = v.show_cube_enabled;
             vp.show_origin = v.show_origin_enabled;
             vp.show_camera_pivot = v.show_camera_pivot_enabled;
             vp.grid_color = v.grid_color;
@@ -2393,14 +2400,13 @@ impl State {
         self.show_occluded = r.show_occluded;
 
         // The checkmarks the guide and pane toggles keep in step by hand.
-        let (sg, sc, so, cp) = {
+        let (sg, so, cp) = {
             let vp = self.viewport();
-            (vp.show_grid, vp.show_cube, vp.show_origin, vp.show_camera_pivot)
+            (vp.show_grid, vp.show_origin, vp.show_camera_pivot)
         };
-        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 0, sg);
-        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 1, sc);
-        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 2, so);
-        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 3, cp);
+        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_GRID, sg);
+        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_ORIGIN, so);
+        self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_CAMERA_PIVOT, cp);
         let cnp = self.circular_network_pane;
         self.menu_mut(LEFT_MENUBAR_IDX).set_item_checked(2, 2, cnp);
 
@@ -5296,7 +5302,7 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
             param: ParametersBg::new(),
             canvas: Canvas::new(),
             left_menubar: MenuBar::new(0.0, 0.0, 0.0, MENUBAR_H).with_title("0: Network").with_label("Network Menu Bar").with_item("File", &["New", "Save", "Save As"]).with_item("Edit", &["Undo", "Redo"]).with_item("View", &["Zoom In", "Zoom Out", "Network Plate", "Circular Pane", "Detach Pane", "Close Pane"]).with_context_options(context_opts.clone(), 0),
-            right_menubar: MenuBar::new(0.0, 0.0, 0.0, MENUBAR_H).with_title("1: Viewport").with_label("Viewport Menu Bar").with_item("Camera", &["Perspective", "Orthographic"]).with_item("Display", &["Square Aspect"]).with_item("Guides", &["Show Grid", "Cube", "Origin", "Camera Pivot"]).with_item("View", &["Close Pane"]).with_context_options(context_opts.clone(), 1),
+            right_menubar: MenuBar::new(0.0, 0.0, 0.0, MENUBAR_H).with_title("1: Viewport").with_label("Viewport Menu Bar").with_item("Camera", &["Perspective", "Orthographic"]).with_item("Display", &["Square Aspect"]).with_item("Guides", &["Show Grid", "Origin", "Camera Pivot"]).with_item("View", &["Close Pane"]).with_context_options(context_opts.clone(), 1),
             param_menubar: MenuBar::new(0.0, 0.0, 0.0, MENUBAR_H).with_title("2: Parameters").with_label("Parameters Menu Bar").with_item("Preset", &["Default", "Custom"]).with_item("Reset", &["All"]).with_item("View", &["Close Pane"]).with_context_options(context_opts.clone(), 2),
             status: StatusBar::new().with_text("Ready"),
             breadcrumb: {
@@ -5342,7 +5348,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
 
         if let Some(viewport) = slots.viewport.as_any_mut().downcast_mut::<Viewport3D>() {
             viewport.show_grid = settings.viewport.show_grid_enabled;
-            viewport.show_cube = settings.viewport.show_cube_enabled;
             viewport.show_origin = settings.viewport.show_origin_enabled;
             viewport.show_camera_pivot = settings.viewport.show_camera_pivot_enabled;
             viewport.bg_color = settings.viewport.bg_color;
@@ -5579,7 +5584,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
             last_viewport_rotation_y: 0.0,
             last_viewport_bg_color: [0.0; 3],
             last_viewport_show_grid: false,
-            last_viewport_show_cube: false,
             last_viewport_show_origin: false,
             last_viewport_show_camera_pivot: false,
             last_viewport_width: 0,
@@ -5651,7 +5655,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
         state.rebuild_scene_geometry();
         state.sync_grid_settings();
         let sg = state.viewport().show_grid;
-        let sc = state.viewport().show_cube;
         let so = state.viewport().show_origin;
         let cp = state.viewport().show_camera_pivot;
         let cnp = state.circular_network_pane;
@@ -5661,10 +5664,9 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
         let sp = state.show_parameters;
         let ss = state.show_spreadsheet;
 
-        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 0, sg);
-        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 1, sc);
-        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 2, so);
-        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 3, cp);
+        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_GRID, sg);
+        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_ORIGIN, so);
+        state.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_CAMERA_PIVOT, cp);
         state.menu_mut(LEFT_MENUBAR_IDX).set_item_checked(2, 2, cnp);
         state.menu_mut(LEFT_MENUBAR_IDX).set_item_checked(2, 3, dcn);
         state.menu_mut(HEADER_IDX).set_item_checked(2, 3, dcn);
@@ -7203,26 +7205,20 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
             Action::ToggleGrid => {
                 let val = !self.viewport().show_grid;
                 self.viewport_mut().show_grid = val;
-                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 0, val);
-                settings_changed = true;
-            }
-            Action::ToggleCube => {
-                let val = !self.viewport().show_cube;
-                self.viewport_mut().show_cube = val;
-                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 1, val);
+                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_GRID, val);
                 settings_changed = true;
             }
             Action::ToggleOrigin => {
                 let val = !self.viewport().show_origin;
                 self.viewport_mut().show_origin = val;
-                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 2, val);
+                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_ORIGIN, val);
                 settings_changed = true;
             }
             Action::ToggleCameraPivot => {
                 let val = !self.viewport().show_camera_pivot;
                 self.viewport_mut().show_camera_pivot = val;
                 self.write_active_camera_toggle("Show Camera Pivot", val);
-                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(2, 3, val);
+                self.menu_mut(RIGHT_MENUBAR_IDX).set_item_checked(GUIDES_MENU, GUIDE_CAMERA_PIVOT, val);
                 settings_changed = true;
             }
             Action::ToggleWireframe => {
@@ -9242,7 +9238,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                          self.square_viewport = settings.viewport.square;
                          self.grid_thickness = settings.viewport.grid_thickness;
                          self.viewport_mut().show_grid = settings.viewport.show_grid_enabled;
-                         self.viewport_mut().show_cube = settings.viewport.show_cube_enabled;
                          self.viewport_mut().show_origin = settings.viewport.show_origin_enabled;
                          self.viewport_mut().show_camera_pivot = settings.viewport.show_camera_pivot_enabled;
                          self.viewport_mut().bg_color = settings.viewport.bg_color;
@@ -9543,7 +9538,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
     }
 
     pub fn init_renderer(&mut self, renderer: &mut cce_ui::vk::VkRenderer) {
-        let cube_verts = cube_vertices();
         let linear_grid_color = cce_ui::colors::to_linear_rgb(self.grid_color);
         let grid_verts = grid_vertices(self.grid_thickness, linear_grid_color);
         let origin_verts = origin_vectors_vertices(self.origin_size);
@@ -9551,7 +9545,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
         let bg_verts =
             Self::viewport_bg_vertices(cce_ui::colors::to_linear_rgb(self.viewport().bg_color));
         self.meshes = Some(SceneMeshes {
-            cube: renderer.create_mesh(bytemuck::cast_slice(&cube_verts)),
             viewport_bg: renderer.create_mesh(bytemuck::cast_slice(&bg_verts)),
             spheres: renderer.create_mesh(&[]),
             sphere_edges: renderer.create_mesh(&[]),
@@ -9669,7 +9662,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                     || self.last_viewport_rotation_y != self.viewport().rotation_y
                     || self.last_viewport_bg_color != self.viewport().bg_color
                     || self.last_viewport_show_grid != self.viewport().show_grid
-                    || self.last_viewport_show_cube != self.viewport().show_cube
                     || self.last_viewport_show_origin != self.viewport().show_origin
                     || self.last_viewport_show_camera_pivot != self.viewport().show_camera_pivot
                     || self.last_viewport_width != cw
@@ -9708,7 +9700,7 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                     let mvp_pivot = (proj * view_mat * model_pivot).to_cols_array_2d();
 
                     // Same draw order as the wgpu pass: bg quad, grid, origin,
-                    // pivot, cube, spheres. The node geometry (points +
+                    // pivot, spheres. The node geometry (points +
                     // spheres) carries the Render node's Opacity; scene
                     // furniture stays opaque.
                     const NO_TINT: [f32; 4] = [0.0; 4];
@@ -9744,9 +9736,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                     if self.viewport().show_camera_pivot {
                         draws.push(SceneDraw { mesh: meshes.pivot, mvp: mvp_pivot, wireframe: false, wire_tint: NO_TINT, opacity: 1.0, line_width: 1.0, wire_base_width: 0.0, prelit: false, see_through: false });
                     }
-                    if self.viewport().show_cube {
-                        draws.push(SceneDraw { mesh: meshes.cube, mvp, wireframe: false, wire_tint: NO_TINT, opacity: 1.0, line_width: 1.0, wire_base_width: 0.0, prelit: false, see_through: false });
-                    }
                     if self.render_points && self.point_vertex_count > 0 {
                         draws.push(SceneDraw { mesh: meshes.points, mvp, wireframe: false, wire_tint: NO_TINT, opacity: geo_opacity, line_width: 1.0, wire_base_width: 0.0, prelit: false, see_through: false });
                     }
@@ -9805,7 +9794,6 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                     self.last_viewport_rotation_y = self.viewport().rotation_y;
                     self.last_viewport_bg_color = self.viewport().bg_color;
                     self.last_viewport_show_grid = self.viewport().show_grid;
-                    self.last_viewport_show_cube = self.viewport().show_cube;
                     self.last_viewport_show_origin = self.viewport().show_origin;
                     self.last_viewport_show_camera_pivot = self.viewport().show_camera_pivot;
                     self.last_viewport_width = cw;
@@ -9829,7 +9817,7 @@ pub(crate) fn geometry_to_spreadsheet_data(geom: &Detail) -> (Vec<String>, Vec<V
                 // the camera/pane changes, so camera drags stay interactive
                 // (1-spp noise) and stillness converges.
                 if rt_mode {
-                    let key = (self.viewport().show_cube, self.rt_geometry_version);
+                    let key = self.rt_geometry_version;
                     if self.last_rt_scene_key != Some(key) {
                         let (rt_tris, rt_mats) = self.collect_rt_scene();
                         renderer.set_rt_scene(&rt_tris, &rt_mats);
diff --git a/src/command.rs b/src/command.rs
index 0710ff0..6b93e51 100644
--- a/src/command.rs
+++ b/src/command.rs
@@ -185,7 +185,6 @@ pub const COMMANDS: &[Command] = &[
 
     // --- Viewport ---
     Command { id: "toggle_grid", label: "Show Grid", context: Context::Viewport, run: Run::Key(Action::ToggleGrid), default_chord: Some("Ctrl+g") },
-    Command { id: "toggle_cube", label: "Show Cube", context: Context::Viewport, run: Run::Key(Action::ToggleCube), default_chord: Some("Ctrl+e") },
     Command { id: "toggle_origin", label: "Show Origin", context: Context::Viewport, run: Run::Key(Action::ToggleOrigin), default_chord: None },
     Command { id: "toggle_camera_pivot", label: "Show Camera Pivot", context: Context::Viewport, run: Run::Key(Action::ToggleCameraPivot), default_chord: None },
     Command { id: "toggle_wireframe", label: "Show Wireframe", context: Context::Viewport, run: Run::Key(Action::ToggleWireframe), default_chord: None },
diff --git a/src/dialog.rs b/src/dialog.rs
index 2a6f562..8f30ff4 100644
--- a/src/dialog.rs
+++ b/src/dialog.rs
@@ -1605,7 +1605,6 @@ impl State {
     pub fn command_toggle_state(&self, id: &str) -> Option<bool> {
         Some(match id {
             "toggle_grid" => self.viewport().show_grid,
-            "toggle_cube" => self.viewport().show_cube,
             "toggle_origin" => self.viewport().show_origin,
             "toggle_camera_pivot" => self.viewport().show_camera_pivot,
             "toggle_wireframe" => self.wireframe,
@@ -2091,7 +2090,7 @@ impl State {
     ///
     /// A CONTROL row does not close at all. A switch you can only flip once
     /// before the panel it is on vanishes is a button with extra steps: Show
-    /// Grid, Show Cube and Square Aspect are the kind of thing you set
+    /// Grid, Show Origin and Square Aspect are the kind of thing you set
     /// together, looking at the viewport, and the dialog staying up is what
     /// lets you. A toggle flips, a choice steps to its next option, a slider
     /// or a colour is worked by the pointer or the arrows and Enter on it
diff --git a/src/geometry.rs b/src/geometry.rs
index 3af1e61..cef7ca4 100644
--- a/src/geometry.rs
+++ b/src/geometry.rs
@@ -99,24 +99,6 @@ pub fn rt_scene_from_verts(
     (tris, mats)
 }
 
-pub fn cube_vertices() -> Vec<Vertex3D> {
-    let s = 0.5;
-    let data: &[([f32; 3], [f32; 3])] = &[
-        ([-s, -s, s], [0.8, 0.2, 0.2]), ([s, -s, s], [0.8, 0.2, 0.2]), ([s, s, s], [0.8, 0.2, 0.2]),
-        ([-s, -s, s], [0.8, 0.2, 0.2]), ([s, s, s], [0.8, 0.2, 0.2]), ([-s, s, s], [0.8, 0.2, 0.2]),
-        ([s, -s, -s], [0.2, 0.8, 0.2]), ([-s, -s, -s], [0.2, 0.8, 0.2]), ([-s, s, -s], [0.2, 0.8, 0.2]),
-        ([s, -s, -s], [0.2, 0.8, 0.2]), ([-s, s, -s], [0.2, 0.8, 0.2]), ([s, s, -s], [0.2, 0.8, 0.2]),
-        ([-s, s, s], [0.2, 0.2, 0.8]), ([s, s, s], [0.2, 0.2, 0.8]), ([s, s, -s], [0.2, 0.2, 0.8]),
-        ([-s, s, s], [0.2, 0.2, 0.8]), ([s, s, -s], [0.2, 0.2, 0.8]), ([-s, s, -s], [0.2, 0.2, 0.8]),
-        ([-s, -s, -s], [0.8, 0.8, 0.2]), ([s, -s, -s], [0.8, 0.8, 0.2]), ([s, -s, s], [0.8, 0.8, 0.2]),
-        ([-s, -s, -s], [0.8, 0.8, 0.2]), ([s, -s, s], [0.8, 0.8, 0.2]), ([-s, -s, s], [0.8, 0.8, 0.2]),
-        ([s, -s, s], [0.8, 0.2, 0.8]), ([s, -s, -s], [0.8, 0.2, 0.8]), ([s, s, -s], [0.8, 0.2, 0.8]),
-        ([s, -s, s], [0.8, 0.2, 0.8]), ([s, s, -s], [0.8, 0.2, 0.8]), ([s, s, s], [0.8, 0.2, 0.8]),
-        ([-s, -s, -s], [0.2, 0.8, 0.8]), ([-s, -s, s], [0.2, 0.8, 0.8]), ([-s, s, s], [0.2, 0.8, 0.8]),
-        ([-s, -s, -s], [0.2, 0.8, 0.8]), ([-s, s, s], [0.2, 0.8, 0.8]), ([-s, s, -s], [0.2, 0.8, 0.8]),
-    ];
-    data.iter().map(|&(p, c)| Vertex3D { position: p, color: c }).collect()
-}
 
 /// A [`Detail`]'s triangles as renderer vertices — the one place the 3D scene
 /// crosses out of the geometry model.
diff --git a/src/main.rs b/src/main.rs
index a20d304..a504f62 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -951,7 +951,6 @@ mod tests {
         assert!((state.point_marker_color[1] - 0.5).abs() < 0.01);
         assert!((state.point_marker_color[2] - 0.0).abs() < 0.01);
         assert!((state.grid_thickness - 0.04).abs() < 1e-6);
-        assert!(state.viewport().show_cube);
         assert!(state.wireframe);
         assert!((state.wire_width - 4.0).abs() < 1e-6);
         assert_eq!(state.point_color[1], 1.0);
@@ -1397,7 +1396,7 @@ mod tests {
         let _ = fs::remove_dir_all(&dir);
         let mut state = State::new(false);
         state.viewport_mut().show_grid = false;
-        state.viewport_mut().show_cube = true;
+        state.viewport_mut().show_origin = false;
         state.smooth_shading = true;
         state.wireframe = true;
         state.geo_opacity = 0.5;
@@ -1411,7 +1410,7 @@ mod tests {
         state.run_command("toggle_grid");
         assert!(state.viewport().show_grid);
         assert!(state.has_unsaved_changes(), "a display change is an edit to the file");
-        state.run_command("toggle_cube");
+        state.run_command("toggle_origin");
         state.smooth_shading = false;
         state.wireframe = false;
         state.geo_opacity = 1.0;
@@ -1421,7 +1420,7 @@ mod tests {
 
         state.load_from_file(&dir).expect("load");
         assert!(!state.viewport().show_grid, "the grid comes back off");
-        assert!(state.viewport().show_cube);
+        assert!(!state.viewport().show_origin);
         assert!(state.smooth_shading && state.wireframe);
         assert!((state.geo_opacity - 0.5).abs() < 1e-6);
         assert!((state.grid_thickness - 0.07).abs() < 1e-6);
@@ -4089,6 +4088,51 @@ mod tests {
         }
     }
 
+    /// The reference cube guide is gone, and nothing that used to carry it
+    /// breaks: an older state.kdl or project display block with
+    /// `show_cube_enabled` still loads (serde ignores the key), there is no
+    /// Show Cube command or chord, and the viewport menubar's Guides menu
+    /// is Grid, Origin, Camera Pivot — its checkmarks and clicks addressed
+    /// through the `GUIDE_*` positions, so the removal shifted no item onto
+    /// another's action.
+    #[test]
+    fn the_cube_guide_is_gone_and_old_files_still_load() {
+        use crate::app::{DesignSettings, GUIDES_MENU, GUIDE_CAMERA_PIVOT, GUIDE_GRID, GUIDE_ORIGIN};
+        // A complete state.kdl as this build writes it, with the old key
+        // put back into its viewport block.
+        let mut state = State::new(false);
+        state.viewport_mut().show_grid = false;
+        state.save_settings();
+        let written = fs::read_to_string(DesignSettings::file_path()).expect("state.kdl");
+        assert!(!written.contains("show_cube"), "the key is no longer written");
+        let old = written.replacen("viewport {", "viewport {\n    show_cube_enabled (bool)true", 1);
+        assert!(old.contains("show_cube_enabled"), "the fixture carries the old key");
+        let back = DesignSettings::from_kdl_str(&old);
+        assert!(!back.viewport.show_grid_enabled, "the rest of the block still reads");
+
+        // A project's display block, likewise.
+        let mut json = serde_json::to_value(crate::app::DisplaySettings {
+            viewport: back.viewport.clone(),
+            render: back.render.clone(),
+        })
+        .unwrap();
+        json["viewport"]["show_cube_enabled"] = serde_json::json!(true);
+        json["viewport"]["show_origin_enabled"] = serde_json::json!(false);
+        let d: crate::app::DisplaySettings = serde_json::from_value(json).expect("an old display block loads");
+        assert!(!d.viewport.show_origin_enabled);
+
+        assert!(crate::command::by_id("toggle_cube").is_none());
+        assert!(!crate::command::COMMANDS.iter().any(|c| c.label.to_lowercase().contains("cube")));
+
+        let items = state.menu(crate::slots::RIGHT_MENUBAR_IDX).menu_items_list()[GUIDES_MENU].clone();
+        assert_eq!(items, vec!["Show Grid".to_string(), "Origin".to_string(), "Camera Pivot".to_string()]);
+        assert_eq!((GUIDE_GRID, GUIDE_ORIGIN, GUIDE_CAMERA_PIVOT), (0, 1, 2));
+        // The Origin item flips the origin, not whatever sits where it was.
+        let before = state.viewport().show_origin;
+        state.execute_action(crate::shortcut::Action::ToggleOrigin);
+        assert_eq!(state.viewport().show_origin, !before);
+    }
+
     #[test]
     fn test_design_settings_serialization_roundtrip() {
         let json_without_pivot = r#"
@@ -5285,7 +5329,7 @@ mod tests {
         use crate::app::DesignSettings;
         let mut a = State::new(false);
         a.viewport_mut().show_grid = false;
-        a.viewport_mut().show_cube = true;
+        a.viewport_mut().show_origin = false;
         a.viewport_mut().bg_color = [0.1, 0.2, 0.3];
         a.viewport_mut().grid_color = [0.4, 0.5, 0.6];
         a.viewport_mut().rt_mode = true;
@@ -5314,7 +5358,7 @@ mod tests {
         let close = |x: f32, y: f32| (x - y).abs() < 0.01;
 
         assert!(!back.viewport.show_grid_enabled);
-        assert!(back.viewport.show_cube_enabled);
+        assert!(!back.viewport.show_origin_enabled);
         assert!(back.viewport.rt_mode);
         assert!(close(back.viewport.grid_thickness, 0.04));
         assert!(close(back.viewport.origin_size, 2.5));
@@ -6181,7 +6225,8 @@ mod tests {
     /// `apply_settings_from_menubar_subnets` used to copy the Guides utility
     /// node onto the live flags on EVERY parameter change, so a command that
     /// flipped only the flag was undone by the next edit anywhere — Show
-    /// Cube hid the cube, and editing any node's parameter brought it back.
+    /// Cube (a guide since removed) hid the cube, and editing any node's
+    /// parameter brought it back.
     /// The fix was to write the node as well; the node is gone now and the
     /// flag is simply the value, which is the same guarantee with nothing
     /// left to fall out of step. Still asserted, because the failure it
@@ -6190,9 +6235,8 @@ mod tests {
     #[test]
     fn guide_toggles_survive_the_settings_apply_pass() {
         let mut state = State::new(false);
-        for command in ["toggle_cube", "toggle_grid", "toggle_origin", "toggle_point_markers"] {
+        for command in ["toggle_grid", "toggle_origin", "toggle_point_markers"] {
             let flag = |state: &State| match command {
-                "toggle_cube" => state.viewport().show_cube,
                 "toggle_grid" => state.viewport().show_grid,
                 "toggle_origin" => state.viewport().show_origin,
                 _ => state.show_point_markers,
@@ -10188,7 +10232,7 @@ mod tests {
         }
         let mut state = State::new(false);
         for id in [
-            "toggle_grid", "toggle_origin", "toggle_cube", "toggle_wireframe",
+            "toggle_grid", "toggle_origin", "toggle_wireframe",
             "toggle_wire_single_color", "toggle_render_points", "toggle_ray_traced_preview",
             "toggle_circular_pane", "toggle_camera_pivot", "toggle_square_viewport",
             "toggle_network_plate",
diff --git a/src/project.rs b/src/project.rs
index 8069207..19e0816 100644
--- a/src/project.rs
+++ b/src/project.rs
@@ -674,9 +674,9 @@ impl State {
                 "Show Grid Guide" | "Show Grid" => {
                     if let Some(v) = as_bool(p) { self.viewport_mut().show_grid = v; }
                 }
-                "Show Reference Cube" | "Cube" => {
-                    if let Some(v) = as_bool(p) { self.viewport_mut().show_cube = v; }
-                }
+                // The reference cube guide was removed on 2026-09-25; an old
+                // save's value for it has nowhere to go and is dropped.
+                "Show Reference Cube" | "Cube" => {}
                 "Show Origin Axes" | "Origin" => {
                     if let Some(v) = as_bool(p) { self.viewport_mut().show_origin = v; }
                 }
diff --git a/src/render.rs b/src/render.rs
index a62e8da..b4fbb38 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -1203,18 +1203,13 @@ impl State {
         self.rebuild_page();
     }
 
-    /// The path tracer's scene: the sphere geometry (and the reference cube if
-    /// shown) as triangles, with one Lambertian material per distinct vertex
-    /// color. Same mesh space as the raster pass, so the raster mvp's inverse
-    /// drives the camera.
+    /// The path tracer's scene: the scene geometry as triangles, with one
+    /// Lambertian material per distinct vertex color. Same mesh space as the
+    /// raster pass, so the raster mvp's inverse drives the camera.
     pub(crate) fn collect_rt_scene(
         &self,
     ) -> (Vec<cce_ui::vk::RtTriangle>, Vec<cce_ui::vk::RtMaterial>) {
-        let mut verts = self.rt_sphere_verts.clone();
-        if self.viewport().show_cube {
-            verts.extend(crate::geometry::cube_vertices());
-        }
-        crate::geometry::rt_scene_from_verts(&verts)
+        crate::geometry::rt_scene_from_verts(&self.rt_sphere_verts)
     }
 
     /// The 0-based line a node error points at in the params pane's selected
diff --git a/src/shortcut.rs b/src/shortcut.rs
index 220b15e..020674b 100644
--- a/src/shortcut.rs
+++ b/src/shortcut.rs
@@ -4,7 +4,6 @@ use crate::ModifiersState;
 #[derive(Debug, Clone, Copy, PartialEq)]
 pub enum Action {
     ToggleGrid,
-    ToggleCube,
     ToggleSquareViewport,
     ToggleConfigure,
     ToggleSpreadsheet,
diff --git a/src/viewport_3d.rs b/src/viewport_3d.rs
index f070fda..b206ed6 100644
--- a/src/viewport_3d.rs
+++ b/src/viewport_3d.rs
@@ -22,7 +22,6 @@ pub struct Viewport3D {
     pub bg_color: [f32; 3],
     pub grid_color: [f32; 3],
     pub show_grid: bool,
-    pub show_cube: bool,
     pub show_origin: bool,
     pub show_camera_pivot: bool,
     /// Path-traced preview: the pane renders through `cce_ui::vk`'s compute
@@ -84,7 +83,6 @@ impl Viewport3D {
             bg_color: [0.10, 0.10, 0.13],
             grid_color: [0.18, 0.18, 0.22],
             show_grid: true,
-            show_cube: true,
             show_origin: true,
             show_camera_pivot: true,
             rt_mode: false,
diff --git a/src/window.rs b/src/window.rs
index 2721d4b..84a957f 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -417,12 +417,11 @@ impl State {
                 } else {
                     let action = if menu_idx == 1 {
                         Some(Action::ToggleSquareViewport)
-                    } else if menu_idx == 2 {
+                    } else if menu_idx == crate::app::GUIDES_MENU {
                         match item_idx {
-                            0 => Some(Action::ToggleGrid),
-                            1 => Some(Action::ToggleCube),
-                            2 => Some(Action::ToggleOrigin),
-                            3 => Some(Action::ToggleCameraPivot),
+                            crate::app::GUIDE_GRID => Some(Action::ToggleGrid),
+                            crate::app::GUIDE_ORIGIN => Some(Action::ToggleOrigin),
+                            crate::app::GUIDE_CAMERA_PIVOT => Some(Action::ToggleCameraPivot),
                             _ => None,
                         }
                     } else { None };