refactor: rename SnapOrca references to Orca in CAD components to avoid confusion and update recipe versioning

This commit is contained in:
SoftFever
2026-08-27 18:49:50 +08:00
parent 0aeb6df122
commit 5a170520d3
13 changed files with 36 additions and 36 deletions
+4 -4
View File
@@ -4587,7 +4587,7 @@ static void run_off_ui_thread(wxWindow* parent, const wxString& message, const s
int elapsed_ms = 0;
while (!done.load(std::memory_order_acquire)) {
if (dlg == nullptr && elapsed_ms >= 300)
dlg = std::make_unique<wxProgressDialog>(_L("SnapOrca"), message, 100, parent,
dlg = std::make_unique<wxProgressDialog>(_L("Design"), message, 100, parent,
wxPD_AUTO_HIDE | wxPD_SMOOTH);
if (dlg != nullptr)
dlg->Pulse();
@@ -6947,7 +6947,7 @@ void DesignPanel::on_tab_shown()
}
// Rehydrate the parametric model from a freshly loaded project (the 3MF carried the
// recipe in Metadata/SnapOrca_cad.bin). Only when nothing is in progress here, so we
// recipe in Metadata/orca_cad.bin). Only when nothing is in progress here, so we
// never clobber an active design when the user just toggles back to the Design tab.
if (m_doc.features.empty()) {
if (Plater* plater = wxGetApp().plater()) {
@@ -6982,7 +6982,7 @@ void DesignPanel::load_recipe(const std::string& blob)
// Carry the kernel's reason. deserialize_recipe distinguishes three cases that matter
// very differently to the person reading this — saved by a NEWER build, saved by an
// OLDER one, or genuinely unreadable — and replacing all three with one sentence left
// the user unable to tell "update SnapOrca" from "your file is damaged". Same
// the user unable to tell "update OrcaSlicer" from "your file is damaged". Same
// error-loss class as the 31 McpControl sites (1de72de9ed): the message exists, it was
// simply not passed on.
m_status->SetForegroundColour(wxColour(235, 110, 110));
@@ -7005,7 +7005,7 @@ void DesignPanel::refresh_tree()
// the sync in recompute_guarded instead tied it to "a solid was built", and CadDocument::
// recompute() returns FALSE for a document that has no solid ("no solid-producing features",
// CadDocument.cpp) — which is precisely a document the user has only drawn sketches in. So
// drawing a profile, pressing Confirm and saving wrote a 3MF with no SnapOrca_cad.bin in it
// drawing a profile, pressing Confirm and saving wrote a 3MF with no orca_cad.bin in it
// at all, and the app reported success: the whole design was gone on reopen (snaporca-mtav).
// The three sites that say "a lone sketch yields an empty body; that is expected" call
// m_doc.recompute() directly and so never reached the sync either. One hook here covers all
+1 -1
View File
@@ -196,7 +196,7 @@ private:
void on_commit();
void on_export_step(); // write all bodies to a .step file (native B-rep)
// Rehydrate the parametric model from a project's saved recipe (3MF
// Metadata/SnapOrca_cad.bin): deserialize -> recompute -> refresh viewport + tree.
// Metadata/orca_cad.bin): deserialize -> recompute -> refresh viewport + tree.
void load_recipe(const std::string& blob);
void refresh_tree();
void set_status_ok();
+8 -8
View File
@@ -1,7 +1,7 @@
#include "libslic3r/libslic3r.h"
#include "GLCanvas3D.hpp"
#ifdef SLIC3R_CAD
#include "slic3r/GUI/CAD/DesignSketchTool.hpp" // SnapOrca Design: interactive 2D sketch tool
#include "slic3r/GUI/CAD/DesignSketchTool.hpp" // Design tab: interactive 2D sketch tool
#endif
#include <igl/unproject.h>
@@ -2162,7 +2162,7 @@ void GLCanvas3D::render(bool only_init)
if (_is_fxaa_enabled())
_render_fxaa_pass(static_cast<unsigned int>(cnv_size.get_width()), static_cast<unsigned int>(cnv_size.get_height()));
// SnapOrca Design: interactive 2D sketch overlay, drawn over the scene but
// Design tab: interactive 2D sketch overlay, drawn over the scene but
// beneath the UI overlays (toolbars, labels).
#ifdef SLIC3R_CAD
if (m_design_sketch_tool != nullptr && m_design_sketch_tool->has_display())
@@ -3322,7 +3322,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
return;
}
// SnapOrca Design: Delete/Backspace removes the selected sketch entities while a
// Design tab: Delete/Backspace removes the selected sketch entities while a
// sketch tool is active and the canvas has focus (dialog text fields are separate
// wx controls, so this never eats their editing keys).
#ifdef SLIC3R_CAD
@@ -3348,7 +3348,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
}
#endif
// SnapOrca Design: Ctrl+Z / Ctrl+Shift+Z (and Ctrl+Y) undo/redo the Design feature
// Design tab: Ctrl+Z / Ctrl+Shift+Z (and Ctrl+Y) undo/redo the Design feature
// history. Scoped by m_design_sketch_tool — only the Design canvas owns one — so the
// main 3D editor's undo/redo (the CanvasView3D-gated cases further below) is untouched.
// Handled here, before the generic Ctrl block, so it takes precedence and early-returns.
@@ -3366,7 +3366,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
}
#endif
// SnapOrca Design: F = Place on Face (Prepare's lay-flat), when the Design viewport is up
// Design tab: F = Place on Face (Prepare's lay-flat), when the Design viewport is up
// and a body face is selected. The tool forwards to DesignPanel::place_on_face; it returns
// false (no face picked) so F falls through to the default handler below.
#ifdef SLIC3R_CAD
@@ -3757,7 +3757,7 @@ public:
void GLCanvas3D::on_key(wxKeyEvent& evt)
{
// SnapOrca Design: Delete/Backspace removes selected sketch entities. GTK delivers
// Design tab: Delete/Backspace removes selected sketch entities. GTK delivers
// these as KEY_DOWN rather than CHAR, so handle it here too.
#ifdef SLIC3R_CAD
if (evt.GetEventType() == wxEVT_KEY_DOWN
@@ -4334,7 +4334,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
return;
}
// SnapOrca Design: the interactive sketch tool owns the mouse whenever it has
// Design tab: the interactive sketch tool owns the mouse whenever it has
// something on screen — an active session OR committed sketch overlays that the user
// can click to select. It runs after ImGui (so dialogs still work) but before
// camera/toolbar/gizmo handling; on_mouse returns false for events it doesn't consume
@@ -8084,7 +8084,7 @@ void GLCanvas3D::_render_bed(const Transform3d& view_matrix, const Transform3d&
//bool show_texture = true;
//BBS set axes mode
if (m_axes_at_bed_center) {
// SnapOrca Design: triad at the bed centre = modeling origin (set every frame because
// Design tab: triad at the bed centre = modeling origin (set every frame because
// set_shape/set_axes_mode otherwise reset it to the bed corner).
const Vec2d bc = m_bed.build_volume().bed_center();
m_bed.set_axes_origin(Vec3d(bc.x(), bc.y(), 0.0));
+3 -3
View File
@@ -58,7 +58,7 @@ namespace GUI {
class Bed3D;
class PartPlateList;
#ifdef SLIC3R_CAD
class DesignSketchTool; // SnapOrca Design: interactive 2D sketch tool
class DesignSketchTool; // Design tab: interactive 2D sketch tool
#endif
#if ENABLE_RETINA_GL
@@ -549,10 +549,10 @@ private:
mutable float m_paint_toolbar_width;
bool m_collapse_toolbar_enabled{true};
bool m_plate_chrome_enabled{true};
// SnapOrca Design: render the world-axis triad at the bed centre (= modeling origin) instead of
// Design tab: render the world-axis triad at the bed centre (= modeling origin) instead of
// the bed corner. Default false preserves the main editor's corner triad.
bool m_axes_at_bed_center{false};
// SnapOrca Design: draw the printer bed and its plate grid at all. Default true, so the
// Design tab: draw the printer bed and its plate grid at all. Default true, so the
// main editor is untouched; the Design tab lets the user hide it to model without a bed.
bool m_show_bed{true};
#ifdef SLIC3R_CAD
+2 -2
View File
@@ -9291,7 +9291,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
obj_idxs.insert(obj_idxs.end(), loaded_idxs.begin(), loaded_idxs.end());
// load_model_objects only transfers ModelObjects; carry the Model-level CAD
// recipe (Metadata/SnapOrca_cad.bin) onto the plater model so the Design tab
// recipe (Metadata/orca_cad.bin) onto the plater model so the Design tab
// can rehydrate the editable feature tree on reopen.
if (!model.cad_recipe.empty())
q->model().cad_recipe = model.cad_recipe;
@@ -9513,7 +9513,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
//}
// A CAD project legitimately carries no mesh: the model lives in the feature tree
// (Metadata/SnapOrca_cad.bin) until it is committed to the plate. Warning "no geometry data"
// (Metadata/orca_cad.bin) until it is committed to the plate. Warning "no geometry data"
// for one is false, and it is the LAST thing a user sees after opening a design they spent an
// hour on — it reads as "your work is gone" when the recipe has in fact just been loaded and
// the Design tab will rehydrate it. Count the recipe as geometry.