Mesh leftovers from the ribbon redesign (#133) (#4471)

* claim: #133

* mesh: Save As Mesh declares the panel that shows it (#133)

The ribbon redesign (#2176) removed the MESH tab, but three things still
pointed at it:

- `file.save_mesh` declared `.at("MESH", "MODIFY")`. The command inventory
  prints the placement a spec declares, so `docs/features.md` advertised a
  `MESH > MODIFY` location no ribbon has. Its real home is already
  INSERT / FILES (`SECTIONS` lists it), so the declaration now agrees with
  the ribbon; `destination()` resolved it there before and after, so nothing
  moves on screen.
- The user guide sent people to "the Mesh tab under Modify" for Save as mesh.
- A test now refuses any command that declares a tab the ribbon removed, and
  pins where Save As Mesh lives.

`PLACEMENTS` keeps its MESH entries: those migrate toolbars users saved under
the old panels, which is a different question from what a spec declares.

---------

Co-authored-by: Geraldrunion <geraldrunion@users.noreply.github.com>
This commit is contained in:
gsrunion
2026-10-23 13:45:35 +00:00
committed by GitHub
parent fdde3f9da9
commit 4b42ef50c7
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ pub static COMMANDS: &[CommandSpec] = &[
.noundo()
.params("path; format?: stl|stla|obj|step|3mf|3mf-tagged|urdf|json (default from extension; 3mf-tagged: 3MF whose triangles carry their B-rep face, at full precision, for meshing and analysis tools; docs/formats/3mf-face-tags.md; urdf: the whole assembly as a robot, with STL meshes written next to it; docs/urdf.md); bodies?: [names] (JSON and URDF export the complete design); urdf only: mesh_prefix? (before each mesh file name, e.g. package://robot/meshes/), effort? (default 1000), velocity? (default 10)"),
CommandSpec::new("file.save_mesh", "Save As Mesh", save_mesh)
.at("MESH", "MODIFY")
.at("INSERT", "FILES")
.icon("mesh_export")
.noundo()
.params("path; format?: stl|3mf|3mf-tagged (default from the extension, else stl; 3mf-tagged: docs/formats/3mf-face-tags.md); bodies?: [names] (default: all); ascii?: bool (STL); slicer?: id, name or program path from file.slicers (open the saved file there)"),
+13
View File
@@ -643,6 +643,19 @@ mod tests {
}
}
/// The ribbon redesign (#2176) removed the MESH and UTILITIES tabs. A command that still
/// declares one is advertised at a place the ribbon cannot show, because the generated command
/// inventory prints the placement a spec declares (#133).
#[test]
fn no_command_is_advertised_at_a_tab_the_ribbon_removed() {
for c in solidcraft_engine::command_specs() {
assert!(!matches!(c.tab, "MESH" | "UTILITIES"), "{} declares the removed {} tab", c.id, c.tab);
}
let spec = solidcraft_engine::find_command("file.save_mesh").expect("file.save_mesh is registered");
assert_eq!((spec.tab, spec.panel), ("INSERT", "FILES"), "Save As Mesh declares the panel that shows it");
assert_eq!(destination(spec), Some(("INSERT", "FILES")));
}
#[test]
fn contextual_tabs_follow_the_active_body_and_allow_other_tabs() {
let mut h = crate::scenario::Harness::new();
+2 -2
View File
@@ -41,8 +41,8 @@ one mesh body, with all its volumes merged where the slicer placed them. Slicer-
slicer's metadata) is not read: modifier and negative volumes come in as ordinary solid geometry,
and objects without a name in the model itself are called Mesh1, Mesh2, …
**File → Export STL…** and **File → Export 3MF…** (also on the Mesh tab under Modify as Save as
mesh, and in the right-click menu of a body) open the same dialog with that format chosen; it saves
**File → Export STL…** and **File → Export 3MF…** (also **Save As Mesh** on the Insert tab's Files
panel, and in the right-click menu of a body) open the same dialog with that format chosen; it saves
the selected bodies as STL, 3MF or 3MF with face tags (below), and you can change the format there. With **Send to slicer** ticked, it writes the file to
a temporary folder and opens it in the chosen slicer instead of asking for a file name. The slicer
list shows the slicers found on the computer with their icons; **Custom…** adds any other program