Rename SolveCraft to SolidCraft everywhere, with compatibility shims (#389)

* WIP deep rename (not for push)

* WIP2

* WIP3

* WIP4 wxs fix

* rustfmt

* Rename the remaining identifiers in merged crash-report code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-12 17:17:01 -04:00
1 parent 27415e4dd7
commit 296683229d
464 files changed
+3408 -2956

No files matched your search

+26 -26
View File
@@ -1,6 +1,6 @@
//! The SolveCraft egui front end.
//! The SolidCraft egui front end.
//!
//! A thin shell over [`solvecraft_engine::Session`]: panels read engine state and act through
//! A thin shell over [`solidcraft_engine::Session`]: panels read engine state and act through
//! commands ([`SolveApp::run`]). Nothing here owns design data. The layout follows the familiar
//! parametric-CAD desktop: application bar, a toolbar of workspace tabs and panels, the browser
//! on the left, the 3D viewport with an axis view and navigation bar, the command dialog on the
@@ -55,7 +55,7 @@ mod status_tests {
"Shell: offset: must be positive"
);
assert_eq!(super::friendly_error("edit.undo", "nothing to undo"), "Undo: nothing to undo");
let mut app = super::SolveApp::new(solvecraft_engine::Session::default(), Default::default());
let mut app = super::SolveApp::new(solidcraft_engine::Session::default(), Default::default());
app.run("solid.box", serde_json::json!({"length": 5, "width": 5, "height": 5})).unwrap();
assert_eq!(app.session.log.last().map(String::as_str), Some("Box done"));
let _ = app.run("edit.redo", serde_json::json!({}));
@@ -115,8 +115,8 @@ use std::sync::mpsc::Receiver;
use serde::{Deserialize, Serialize};
use serde_json::{Value, json};
use solvecraft_engine::Session;
use solvecraft_engine::render::{Camera, CameraAnim, StandardView};
use solidcraft_engine::Session;
use solidcraft_engine::render::{Camera, CameraAnim, StandardView};
pub use control::{ControlRequest, ControlResponse};
@@ -144,7 +144,7 @@ pub struct UiState {
/// A soft shadow on the ground under the model (seen from above).
pub ground_shadow: bool,
/// The world's up axis (Z or Y; #3): the camera, axis view, home view and ground follow it.
pub up_axis: solvecraft_engine::render::UpAxis,
pub up_axis: solidcraft_engine::render::UpAxis,
/// Sketches whose closed profiles are not shaded.
pub hidden_profiles: Vec<u64>,
/// Finished sketches whose dimensions are shown.
@@ -237,9 +237,9 @@ pub struct SolveApp {
pub status: Option<(String, f64, bool)>,
pub quit_requested: bool,
/// Autosave into the recovery folder (the desktop app turns it on).
pub autosave: Option<solvecraft_engine::recovery::Autosaver>,
pub autosave: Option<solidcraft_engine::recovery::Autosaver>,
/// Designs left by crashed apps, offered for recovery.
pub recoverable: Vec<solvecraft_engine::recovery::Entry>,
pub recoverable: Vec<solidcraft_engine::recovery::Entry>,
/// The bodies of a just-opened Y-up file, offered to be stood up (`stand_up`).
pub stand_up: Option<Vec<String>>,
/// The anti-aliasing sample counts the graphics device supports (empty without a GPU).
@@ -267,7 +267,7 @@ pub struct SolveApp {
shot_token: u64,
styled: bool,
fitted: bool,
pending_fit: Option<(Camera, solvecraft_engine::geom::Aabb3, bool)>,
pending_fit: Option<(Camera, solidcraft_engine::geom::Aabb3, bool)>,
/// The start page.
pub home: home::HomeState,
pub file_load: file_load::FileLoad,
@@ -538,7 +538,7 @@ impl SolveApp {
}
// Press Pull: edges get a fillet, faces and profiles an extrude.
if id == "solid.press_pull" {
let edges = self.session.selection.iter().any(|s| matches!(s, solvecraft_engine::Sel::Edge { .. }));
let edges = self.session.selection.iter().any(|s| matches!(s, solidcraft_engine::Sel::Edge { .. }));
return self.start(if edges { "solid.fillet" } else { "solid.extrude" });
}
// Construction toggle: selected sketch curves switch at once, otherwise pick them.
@@ -547,7 +547,7 @@ impl SolveApp {
sketch_palette::toggle_construction(self);
return;
}
if let Some(spec) = solvecraft_engine::find_command(id)
if let Some(spec) = solidcraft_engine::find_command(id)
&& (tools::Tool::for_command(id).is_some() || dialogs::Dialog::for_command(self, id).is_some())
&& id != "sketch.create"
{
@@ -580,7 +580,7 @@ impl SolveApp {
| "sketch.constraint.tangent"
| "sketch.constraint.concentric"
| "sketch.constraint.collinear"
) && let [solvecraft_engine::Sel::SketchCurve { id: a }, solvecraft_engine::Sel::SketchCurve { id: b }] =
) && let [solidcraft_engine::Sel::SketchCurve { id: a }, solidcraft_engine::Sel::SketchCurve { id: b }] =
self.session.selection.as_slice()
&& a != b
{
@@ -597,7 +597,7 @@ impl SolveApp {
.selection
.iter()
.filter_map(|s| match s {
solvecraft_engine::Sel::SketchCurve { id } | solvecraft_engine::Sel::SketchPoint { id } => Some(id.clone()),
solidcraft_engine::Sel::SketchCurve { id } | solidcraft_engine::Sel::SketchPoint { id } => Some(id.clone()),
_ => None,
})
.take(2)
@@ -622,7 +622,7 @@ impl SolveApp {
/// Edit a feature the way Fusion does: sketches open in sketch mode; other features roll the
/// timeline back to just before themselves and reopen their dialog, filled in.
pub fn edit_feature(&mut self, id: u64) {
use solvecraft_engine::doc::FeatureKind;
use solidcraft_engine::doc::FeatureKind;
let Some(f) = self.session.doc.feature(id) else { return };
if matches!(f.kind, FeatureKind::Sketch { .. }) {
self.edit_sketch(id);
@@ -652,7 +652,7 @@ impl SolveApp {
/// puts them back. Editing the sketch that is already open does nothing; editing another one
/// finishes the current sketch first, so edit sessions never nest.
pub fn edit_sketch(&mut self, id: u64) {
if let solvecraft_engine::doc::FaceAttachmentStatus::Lost { message, .. } =
if let solidcraft_engine::doc::FaceAttachmentStatus::Lost { message, .. } =
self.session.placed_document().sketch_face_attachment(id, &self.session.model)
{
browser::redefine_sketch(self, id);
@@ -704,7 +704,7 @@ impl SolveApp {
}
/// Everything shown as selected: the selection plus the open dialog's inputs.
pub fn highlighted(&self) -> Vec<solvecraft_engine::Sel> {
pub fn highlighted(&self) -> Vec<solidcraft_engine::Sel> {
let mut v = self.session.selection.clone();
if let Some(d) = &self.dialog {
v.extend(d.items());
@@ -744,7 +744,7 @@ impl SolveApp {
/// Insert a STEP file's bodies (an Import base feature) or a 3MF/STL file's meshes into the
/// current design.
pub fn insert_path(&mut self, path: &str) {
let cmd = if solvecraft_engine::io::is_mesh_path(path) { "file.insert_mesh" } else { "file.insert_step" };
let cmd = if solidcraft_engine::io::is_mesh_path(path) { "file.insert_mesh" } else { "file.insert_step" };
let before: Vec<String> = self.session.world_state().bodies.iter().map(|b| b.name.clone()).collect();
if let Ok(r) = self.run(cmd, json!({ "path": path })) {
self.fit_view();
@@ -758,7 +758,7 @@ impl SolveApp {
/// A dropped file: a STEP, 3MF or STL file joins a design that has features, anything else
/// opens.
pub fn drop_path(&mut self, path: &str) {
let import = solvecraft_engine::io::is_step_path(path) || solvecraft_engine::io::is_mesh_path(path);
let import = solidcraft_engine::io::is_step_path(path) || solidcraft_engine::io::is_mesh_path(path);
if import && !self.session.doc.features.is_empty() {
self.insert_path_async(path);
} else {
@@ -769,7 +769,7 @@ impl SolveApp {
/// Frame the model at once (programmatic use; the toolbar animates).
/// Make `up` the world's up axis: the camera turns to the same standard view in that world
/// (home) and frames the model.
pub fn set_up_axis(&mut self, up: solvecraft_engine::render::UpAxis) {
pub fn set_up_axis(&mut self, up: solidcraft_engine::render::UpAxis) {
self.ui.up_axis = up;
self.cam_anim = None;
self.cam.up = up;
@@ -781,16 +781,16 @@ impl SolveApp {
self.cam_anim = None;
self.viewport.orbit_snap = None;
self.viewport.orbit_free = None;
let bounds = solvecraft_engine::view::bounds(&self.session);
let bounds = solidcraft_engine::view::bounds(&self.session);
self.pending_fit = Some((self.cam, bounds, false));
self.cam = self.fitted(self.cam);
}
/// `cam` moved to frame the whole model.
pub fn fitted(&self, mut cam: Camera) -> Camera {
let b = solvecraft_engine::view::bounds(&self.session);
let b = solidcraft_engine::view::bounds(&self.session);
if b.is_empty() {
cam.target = solvecraft_engine::geom::Vec3::ZERO;
cam.target = solidcraft_engine::geom::Vec3::ZERO;
cam.distance = 150.0;
} else {
cam = self.fitted_bounds(cam, &b);
@@ -798,7 +798,7 @@ impl SolveApp {
cam
}
fn fitted_bounds(&self, mut cam: Camera, bounds: &solvecraft_engine::geom::Aabb3) -> Camera {
fn fitted_bounds(&self, mut cam: Camera, bounds: &solidcraft_engine::geom::Aabb3) -> Camera {
if let Some(layout) = &self.viewport.layout {
return viewport_layout::fit_bounds(cam, bounds, layout, self.ui.perspective).unwrap_or(cam);
}
@@ -857,13 +857,13 @@ impl SolveApp {
to = self.fitted_bounds(to, &b);
}
None => {
self.pending_fit = Some((to, solvecraft_engine::view::bounds(&self.session), true));
self.pending_fit = Some((to, solidcraft_engine::view::bounds(&self.session), true));
to = self.fitted(to);
}
},
"home" => {
to.set_view(StandardView::Iso);
self.pending_fit = Some((to, solvecraft_engine::view::bounds(&self.session), true));
self.pending_fit = Some((to, solidcraft_engine::view::bounds(&self.session), true));
to = self.fitted(to);
}
v => match StandardView::parse(v) {
@@ -1116,7 +1116,7 @@ impl SolveApp {
/// A command's name as people see it (its label), for the status bar.
pub fn command_label(id: &str) -> &str {
solvecraft_engine::find_command(id).map_or(id, |c| c.label)
solidcraft_engine::find_command(id).map_or(id, |c| c.label)
}
/// An engine error with the command's label instead of its id: "Shell: offset must be …".