CAD: a project whose model is a recipe is not an empty file

Reopening a saved CAD design ended on a modal "The file does not contain any
geometry data." warning. A CAD project legitimately carries no mesh — the model
lives in the feature tree (Metadata/SnapOrca_cad.bin) until Commit to Plate — so
the warning is false for one, and it is the last thing the user sees after
opening a design they spent an hour on. It reads as "your work is gone" at the
exact moment the recipe HAS just loaded and the Design tab is about to rehydrate
it, and the main window sits disabled behind the dialog until it is dismissed.

Counts a non-empty model.cad_recipe as geometry.

Verified on the rig: save without Commit to Plate, reopen, and the Design tab
comes up with Sketch1 -> Extrude2 -> Body 1 editable, with no dialog at all.
This commit is contained in:
Tommaso Bianchi
2026-08-14 00:15:46 +02:00
parent 5889f6640f
commit 7b953d564d
+6 -1
View File
@@ -7975,7 +7975,12 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
// q->model().stl_design_country = "";
//}
if (tolal_model_count <= 0 && !q->m_exported_file) {
// 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"
// 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.
if (tolal_model_count <= 0 && q->model().cad_recipe.empty() && !q->m_exported_file) {
dlg.Hide();
if (!is_user_cancel) {
MessageDialog msg(wxGetApp().mainframe, _L("The file does not contain any geometry data."), _L("Warning"), wxYES | wxICON_WARNING);