NEW: add calibration for 3rd printer

cherry pick from SoftFever

Change-Id: Ibb2b4693c3f2e800dbef1542cbada6736154ce48
This commit is contained in:
zhimin.zeng 2023-06-16 09:04:37 +08:00 committed by Lane.Wei
parent 8a34f6b606
commit 4b23192d6f
13 changed files with 1014 additions and 12 deletions

View file

@ -7686,7 +7686,7 @@ Print& Plater::fff_print() { return p->fff_print; }
const SLAPrint& Plater::sla_print() const { return p->sla_print; }
SLAPrint& Plater::sla_print() { return p->sla_print; }
int Plater::new_project(bool skip_confirm, bool silent)
int Plater::new_project(bool skip_confirm, bool silent, const wxString &project_name)
{
bool transfer_preset_changes = false;
// BBS: save confirm
@ -7729,7 +7729,10 @@ int Plater::new_project(bool skip_confirm, bool silent)
//reset project
p->project.reset();
//set project name
p->set_project_name(_L("Untitled"));
if (project_name.empty())
p->set_project_name(_L("Untitled"));
else
p->set_project_name(project_name);
Plater::TakeSnapshot snapshot(this, "New Project", UndoRedo::SnapshotType::ProjectSeparator);
@ -8131,16 +8134,22 @@ bool Plater::up_to_date(bool saved, bool backup)
!Slic3r::has_other_changes(backup));
}
void Plater::add_model(bool imperial_units/* = false*/)
void Plater::add_model(bool imperial_units, std::string fname)
{
wxArrayString input_files;
wxGetApp().import_model(this, input_files);
if (input_files.empty())
return;
std::vector<fs::path> paths;
for (const auto& file : input_files)
paths.emplace_back(into_path(file));
if (fname.empty()) {
wxGetApp().import_model(this, input_files);
if (input_files.empty())
return;
for (const auto& file : input_files)
paths.emplace_back(into_path(file));
}
else {
paths.emplace_back(fname);
}
std::string snapshot_label;
assert(! paths.empty());