Revert #1682 (three-axis milling) (#1715)

Thanks @bherbruck.
This commit is contained in:
bherbruck authored and GitHub committed 2026-10-16 09:02:19 -04:00
1 parent 1ded8fdd27
commit 2c020dbcbc
85 files changed
+43 -14487

No files matched your search

+5 -26
View File
@@ -176,17 +176,14 @@ pub fn request_scope(app: &SolveApp, params: &Value) -> Result<Option<vfs::PathS
/// mode, the section the viewport shows: an open Section Analysis dialog's preview, a sketch's
/// Slice), with the grid and the origin's axes as `guides` says.
pub(crate) fn view_scene(app: &SolveApp, guides: solidcraft_engine::view::Guides) -> solidcraft_engine::render::Scene {
let mut scene = solidcraft_engine::view::scene_with_palette_and_guides(
solidcraft_engine::view::scene_with_palette_and_guides(
&app.session,
&app.cam,
crate::viewport::section_plane(app),
solidcraft_engine::view::world_curve_parts,
&crate::viewport::scene_palette(app.ui.dark, app.preferences.color_vision),
guides,
);
crate::manufacturing::view::cpu(app, &mut scene);
crate::manufacturing::view::cpu_overlays(app, &mut scene);
scene
)
}
/// The grid and the origin's axes as the window shows them (the Grid and Origin switches).
@@ -227,20 +224,14 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) ->
match method {
"ui.workspace" => {
if let Some(workspace) = s("workspace") {
if !matches!(workspace, "design" | "render" | "manufacture") {
return err("workspace must be design, render or manufacture");
if !matches!(workspace, "design" | "render") {
return err("workspace must be design or render");
}
if let Err(e) = crate::render_workspace::enter(app, workspace == "render") {
return err(e);
}
crate::manufacturing::cancel_editor(app);
if workspace != "render" {
app.ui.tab = if workspace == "manufacture" { "MILLING" } else { "SOLID" }.into();
}
}
ok(
json!({"workspace":if crate::render_workspace::active(app) {"render"} else if app.ui.tab == "MILLING" {"manufacture"} else {"design"}}),
)
ok(json!({"workspace":if crate::render_workspace::active(app) {"render"} else {"design"}}))
}
"engine.execute" | "command" => {
let Some(id) = s("command").or(s("id")) else { return err("missing `command`") };
@@ -276,18 +267,6 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) ->
"viewport": app.viewport.rect.map(|r| json!([r.left(), r.top(), r.width(), r.height()])),
"camera": app.cam,
"tool": app.tool.as_ref().map(|t| t.cmd),
"manufacturing": {
"program": app.manufacturing.program,
"job": app.manufacturing.job,
"completed_motions": app.manufacturing.playback,
"finding": app.manufacturing.finding,
"playing": app.manufacturing.playing,
"workpiece": format!("{:?}", app.manufacturing.view.workpiece),
"fixtures": app.manufacturing.view.fixtures,
"paths": app.manufacturing.view.paths,
"stock_boundary": app.manufacturing.view.boundary,
"events_per_second": app.manufacturing.view.speed,
},
"dialog": app.dialog.as_ref().map(|d| format!("{d:?}")),
"status": app.status.as_ref().map(|(text, _, error)| json!({"text": text, "error": error})),
"hover": app.viewport.hover.as_ref().map(|h| format!("{h:?}")),