Feature/merge 1.8.4 (#3827)

* FIX: the logic of buried points that were not buried

JIRA: none

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Change-Id: Id95174659c5fce7feba409eb5e14916608745fa4

* ci: update network module based on commit bc7ca98

Change-Id: I923526f0bf9ce5a288144fa1f9b0f2fc640f41b7

* Fix Firefox
Co-authored-by: hadess <hadess@hadess.net>

* FIX: cali: custom created filament from AMS displayed as incompatible

jira: new

remove the condition: is_system

Change-Id: Ib1366966bbdbe01bc9e2483d9914d270ebefa976

* FIX: duplicated items in comboBox at calibration completed page

jira: new

Change-Id: I4749a2206df16c438e0d3098e36274b2a20f313e

* ENH:update support for P1S plus

jira:[for p1s plus]

Change-Id: Id577d4e94e2162cb0045d261dfaa5f396ecded2f

* ENH: CLI: add mk information support

JIRA: no jira
Change-Id: Idd89b143d439de50d9f52eb8aec95b262d66875d

* ENH:calibration support p1p plus

jira:[plus]

Change-Id: Ia290d3a8a8b9adaac7a6ee26d9a8b5ea0c1b3aee

* FIX: add log for base_id and filament_id

github: #3087

Change-Id: Iebfbd0f224fce49f33fc81c71e6108f6e3abb5ff

* FIX: sync whole preset vendor directory

Change-Id: I191dbe979a87ff35d38cab1149b7975664344838
Jira: STUDIO-5534
(cherry picked from commit 628866608116336453804aa1217dd55db04d47ad)

* FIX: use t_utc for debug only

Change-Id: Ia05d8969d4de3dd38908980d6e17a3ebb11ca279
Github 3045

Change-Id: I77935df53bbf2772b1146e5c330c537165a3a2e6

* FIX:make sort_volumes right

Jira: STUDIO-5645
Change-Id: If324c9115bfaaf0c1b7b4be7c7ee96ba6b8ac890

* ENH:keep an unload logic

jira:[for unload]

Change-Id: Id30ec71ffa5b2dac89346ea47ca48a62479e3ab1

* FIX: several problems with mesh boolean

1. Cut with multiple volumes are OK now.
2. Close mesh boolean fail error with new object or open object
3. Fix wrong name and config of boolean resulting object

github: #3118
jira: none

Change-Id: If2c9dbfb36cbdfe4917a2371217923891bb7909c
(cherry picked from commit 982c0ecb92cf7c2b5ae5972ab900a6b10e7dda50)

* NEW:limit the length of project name

jira:[project name]

Change-Id: I955620f7073b3b7fda280d1118524f561d047751

* ENH:adjusting the warning level of timelpase

jira:[STUDIO-5662]

Change-Id: I4902b22d316f5e09a97a62c88b8a98e55c405434

* FIX: 3mf specification: change namespace form slic3rpe to BambuStudio

Jira: XXXX

Change-Id: Id705affc875ef23fdf2ac6d79f0cb0aafc4f7050

* NEW: Open MakerWorld With BambuStudio GetParam

JIRA: none
Change-Id: I0d65b364f1cd2d634a88882ab072c3e61ea89167
(cherry picked from commit 8eaf45e5359439a7c796fd79876c86775abcf48e)

* FIX: Filament issue generated when creating a printer

Jira: XXXX

Change-Id: I976770b69b47641bd54aa7a9c56fba7f58d1ab68
(cherry picked from commit ba42188b93c58b3954234d72acdd9769a68e3d3c)

* FIX: Blank page appears when editing presets

Jira: 5563

Change-Id: I4c49e05515b1beff55991e92f8079c4499c27eab
(cherry picked from commit e86517d290f4cd0765a230d811b0ddf2c9f34c17)

* FIX: context menu didn't update UI

jira: STUDIO-5691

Change-Id: Ia66b8623d832eba805aff5320941233a68ff258b

* FIX: crash of "filling bed"

"get_arrange_settings() const" gets trapped in infinite recursive calling.
Now we delete this function.

jira: STUDIO-5688
Change-Id: Ia39974734bb37b2a2f06b5bf78185f01be726872

* FIX: boolean hangs in the middle of color painting

Can't do splits in combine_mesh_fff, as do_boolean of mcut will split meshes.

jira: STUDIO-5693
Change-Id: Idddb7d20dd7ca386c39ddd3d87d9defc3136aa5d
(cherry picked from commit 6c67d015941458e37faaf0015b6509b5a0eadc0e)

* Fix: Fix a number of compilation problems

issues found when using gcc version 13.2.0 (GCC) in a Flatpak sandbox

github : https://github.com/bambulab/BambuStudio/issues/3074
github pull request: https://github.com/bambulab/BambuStudio/pull/3096

Change-Id: I08aeac593eb1ce7675894df72e8489200bae713d
(cherry picked from commit 069d133d66bfa682de4a860e379d5dc16b3d907c)

* fix: macos icns issue when icon was not attached

github pull request:https://github.com/bambulab/BambuStudio/pull/3116

Change-Id: I49072ad49f3af7669a6d307c791594ade210da50
(cherry picked from commit c977e5582e3a30ad16dd267810037423aad9a53c)

* FIX: Add flush_length for change_filament_gcode

Change-Id: I30f4b97d3d61c2a57f0e92f157cbd31c38aa7265
Jira: XXXX
(cherry picked from commit 92eb2bac977a0c4095b316cbbc6580fb5228b710)

* FIX: edit preset dialog can't close on mac

Jira: 5696

Change-Id: Ib33dfd07cc588ddd3805e3490a4d8c36dcd890ac

* ENH: add dev_ota_version in ssdp

JIRA: STUDIO-5740

Change-Id: Ic80e6d4b9bf82813fdc4a76604a3d36213d12b03
Signed-off-by: Stone Li <stone.li@bambulab.com>

* NEW:Adapt to multicolour and gradient colour

JIRA:xxxx
Change-Id: I8084cab603d5681cbcaf2d6f5e0d7ad5419cb2af

* NEW:Adaptation of semi transparent materials

JIRA: XXXX
Change-Id: Ie32d8ce67c37b85eb6d7d6594cb514a696307e68

* FIX: disable flush options if prime tower is unchecked

jira: STUDIO-5639

Change-Id: I25081584d430bc7d062e14bcc2cdbf7522cf9d99

* ENH: refine GetVersion for HMS query

JIRA: STUDIO-5763

Change-Id: Ia3ccc07d79cc0736eb12e9782da50211abb74772
Signed-off-by: Stone Li <stone.li@bambulab.com>

* FIX: Prefer old selection when sync AMS not compatible

Change-Id: I6b18db51887132a997cf78d70fff9a92e23bc44a
Jira: STUDIO-5416
(cherry picked from commit 077fae29823cf4f3071d408b1b40f55ee0cb33c6)

* FIX: The flushing was not auto-calc when sync ams list

JIRA: STUDIO-5551

1. flushing volume auto-calc when sync ams list
2. flushing volume takes the larger calculation value when filament has
   multi-colors

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Change-Id: I72e6f9780ea56103a44c2da6068440a4615c254d

* FIX:fixed invalid links

jira:[fixed link]

Change-Id: I036a38b6e8e94da762f93805bd7be706538771fe

* FIX: Prompt to delete problematic presets

Jira: XXXX

Change-Id: Ic43f7bb782794d7ab0b6acbffbb5d73e94f6ed73

* FIX:fixed incorrect HMS content

jira:[STUDIO-5818]

Change-Id: Ia2896d6f0ab1ffedbc850e54168acece8e47bdbb

* FIX:external transparent material display error

JIRA: STUDIO-5845
Change-Id: I0a4f05ac5d5c0ac49d85a704ee65a7221c5f1e1d

* FIX: [5846] Custom Filament Page show System Filament

Simultaneously solve: When downloading Preset from the cloud, the filament_id of the preset in m_preset is null.

Jira: 5846

Change-Id: I6ba1b46fe92e345614b6a4af3fffa87d81fa2456

* FIX:A1 and p1 series do not support custom materials

JIRA:XXXX
Change-Id: Ib0459273d1f9a7152a5563757204634a8d0cd6f5

* FIX: exception when comparing profiles

jira:[NEW]

Signed-off-by: XunZhangBambu <xun.zhang@bambulab.com>
Change-Id: I946b5fcd35f779d271df2b3de731fdcada5aab29
(cherry picked from commit 00e739570812e5c4be3e0f7702ce8c72c0f9e72b)

* FIX: hide_id_middle_string

Change-Id: I28f32ec526b443d31d7992971b80ab1cb737deb6
Github: STUDIO-5825

* ENH: modify some logs level

JIRA: STUDIO-5958

Change-Id: I5a8592dfb8ffa9a81952535cb30944f867aa0e22
Signed-off-by: Stone Li <stone.li@bambulab.com>

* NEW:build plate marker detect

Change-Id: I70f03efea688bb6ce71c3f5990bb3c50605ab184

* FIX: Studio UI Freeze when saving user preset

github: #3335

Change-Id: Idaf53f673a3e46408826c06bdde2c592395d358b

* update bbl plugin version

* fix build errors

* update bbl profiles

* update color

---------

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Signed-off-by: Stone Li <stone.li@bambulab.com>
Co-authored-by: Kunlong Ma <kunlong.ma@bambulab.com>
Co-authored-by: gerrit <gerrit@bambulab.com>
Co-authored-by: liz.li <liz.li@bambulab.com>
Co-authored-by: tao wang <tao.wang@bambulab.com>
Co-authored-by: lane.wei <lane.wei@bambulab.com>
Co-authored-by: maosheng.wei <maosheng.wei@bambulab.com>
Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com>
Co-authored-by: zhou.xu <zhou.xu@bambulab.com>
Co-authored-by: Arthur <arthur.tang@bambulab.com>
Co-authored-by: Bastien Nocera <hadess@hadess.net>
Co-authored-by: zhimin.zeng <zhimin.zeng@bambulab.com>
Co-authored-by: hu.wang <hu.wang@bambulab.com>
Co-authored-by: Stone Li <stone.li@bambulab.com>
Co-authored-by: XunZhangBambu <xun.zhang@bambulab.com>
This commit is contained in:
SoftFever 2024-01-26 20:18:10 +08:00 committed by GitHub
parent 481fff494b
commit 3cb573dcb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
203 changed files with 1995 additions and 625 deletions

View file

@ -1541,6 +1541,10 @@ std::map<int, DynamicPrintConfig> Sidebar::build_filament_ams_list(MachineObject
vt_tray_config.set_key_value("filament_colour", new ConfigOptionStrings{ into_u8(wxColour("#" + vt_tray.color).GetAsString(wxC2S_HTML_SYNTAX)) });
vt_tray_config.set_key_value("filament_exist", new ConfigOptionBools{ true });
vt_tray_config.set_key_value("filament_multi_colors", new ConfigOptionStrings{});
for (int i = 0; i < vt_tray.cols.size(); ++i) {
vt_tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour("#" + vt_tray.cols[i]).GetAsString(wxC2S_HTML_SYNTAX)));
}
filament_ams_list.emplace(VIRTUAL_TRAY_ID, std::move(vt_tray_config));
}
@ -1559,6 +1563,10 @@ std::map<int, DynamicPrintConfig> Sidebar::build_filament_ams_list(MachineObject
tray_config.set_key_value("filament_colour", new ConfigOptionStrings{ into_u8(wxColour("#" + tray.second->color).GetAsString(wxC2S_HTML_SYNTAX)) });
tray_config.set_key_value("filament_exist", new ConfigOptionBools{ tray.second->is_exists });
tray_config.set_key_value("filament_multi_colors", new ConfigOptionStrings{});
for (int i = 0; i < tray.second->cols.size(); ++i) {
tray_config.opt<ConfigOptionStrings>("filament_multi_colors")->values.push_back(into_u8(wxColour("#" + tray.second->cols[i]).GetAsString(wxC2S_HTML_SYNTAX)));
}
filament_ams_list.emplace(((n - 'A') * 4 + t - '1'), std::move(tray_config));
}
}
@ -1619,6 +1627,17 @@ void Sidebar::sync_ams_list()
ams.set_key_value("filament_changed", new ConfigOptionBool{res == wxID_YES || list2[i] != filament_id});
list2[i] = filament_id;
}
// BBS:Record consumables information before synchronization
std::vector<string> color_before_sync;
std::vector<int> is_support_before;
DynamicPrintConfig& project_config = wxGetApp().preset_bundle->project_config;
ConfigOptionStrings* color_opt = project_config.option<ConfigOptionStrings>("filament_colour");
for (int i = 0; i < p->combos_filament.size(); ++i) {
is_support_before.push_back(is_support_filament(i));
color_before_sync.push_back(color_opt->values[i]);
}
unsigned int unknowns = 0;
auto n = wxGetApp().preset_bundle->sync_ams_list(unknowns);
if (n == 0) {
@ -1637,13 +1656,32 @@ void Sidebar::sync_ams_list()
dlg.ShowModal();
}
wxGetApp().plater()->on_filaments_change(n);
for (auto &c : p->combos_filament)
for (auto& c : p->combos_filament)
c->update();
wxGetApp().get_tab(Preset::TYPE_FILAMENT)->select_preset(wxGetApp().preset_bundle->filament_presets[0]);
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
dynamic_filament_list.update();
// Expand filament list
p->m_panel_filament_content->SetMaxSize({-1, -1});
// BBS:Synchronized consumables information
// auto calculation of flushing volumes
for (int i = 0; i < p->combos_filament.size(); ++i) {
if (i >= color_before_sync.size()) {
auto_calc_flushing_volumes(i);
}
else {
// if color changed
if (color_before_sync[i] != color_opt->values[i]) {
auto_calc_flushing_volumes(i);
}
// color don't change, but changes between supporting filament and non supporting filament
else {
bool flag = is_support_filament(i);
if (flag != is_support_before[i])
auto_calc_flushing_volumes(i);
}
}
}
Layout();
}
@ -1810,71 +1848,103 @@ std::string& Sidebar::get_search_line()
return p->searcher.search_string();
}
void Sidebar::auto_calc_flushing_volumes(const int modify_id) {
auto& project_config = wxGetApp().preset_bundle->project_config;
auto& printer_config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
void Sidebar::auto_calc_flushing_volumes(const int modify_id)
{
auto& preset_bundle = wxGetApp().preset_bundle;
auto& project_config = preset_bundle->project_config;
auto& printer_config = preset_bundle->printers.get_edited_preset().config;
auto& ams_multi_color_filament = preset_bundle->ams_multi_color_filment;
auto& ams_filament_list = preset_bundle->filament_ams_list;
const std::vector<double>& init_matrix = (project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values;
const std::vector<double>& init_extruders = (project_config.option<ConfigOptionFloats>("flush_volumes_vector"))->values;
ConfigOption* extra_flush_volume_opt = printer_config.option("nozzle_volume");
int extra_flush_volume = extra_flush_volume_opt ? (int)extra_flush_volume_opt->getFloat() : 0;
ConfigOptionFloat* flush_multi_opt = project_config.option<ConfigOptionFloat>("flush_multiplier");
float flush_multiplier = flush_multi_opt ? flush_multi_opt->getFloat() : 1.f;
vector<double> matrix = init_matrix;
std::vector<double> matrix = init_matrix;
int m_min_flush_volume = extra_flush_volume;
int m_max_flush_volume = Slic3r::g_max_flush_volume;
unsigned int m_number_of_extruders = (int)(sqrt(init_matrix.size()) + 0.001);
const std::vector<std::string> extruder_colours = wxGetApp().plater()->get_extruder_colors_from_plater_config();
vector<wxColour> m_colours;
for (const std::string& color : extruder_colours) {
m_colours.push_back(wxColor(color));
std::vector<std::vector<wxColour>> multi_colours;
// Support for multi-color filament
for (int i = 0; i < extruder_colours.size(); ++i) {
std::vector<wxColour> single_filament;
if (i < ams_multi_color_filament.size()) {
if (!ams_multi_color_filament[i].empty()) {
std::vector<std::string> colors = ams_multi_color_filament[i];
for (int j = 0; j < colors.size(); ++j) {
single_filament.push_back(wxColour(colors[j]));
}
multi_colours.push_back(single_filament);
continue;
}
}
single_filament.push_back(wxColour(extruder_colours[i]));
multi_colours.push_back(single_filament);
}
if (modify_id >= 0 && modify_id < m_colours.size()) {
for (int i = 0; i < m_colours.size(); ++i) {
if (modify_id >= 0 && modify_id < multi_colours.size()) {
for (int i = 0; i < multi_colours.size(); ++i) {
Slic3r::FlushVolCalculator calculator(m_min_flush_volume, m_max_flush_volume);
// from to modify
int from_idx = i;
if (from_idx != modify_id) {
const wxColour& from = m_colours[from_idx];
bool is_from_support = is_support_filament(from_idx);
const wxColour& to = m_colours[modify_id];
bool is_to_support = is_support_filament(modify_id);
int flushing_volume = 0;
bool is_from_support = is_support_filament(from_idx);
bool is_to_support = is_support_filament(modify_id);
if (is_to_support) {
flushing_volume = Slic3r::g_flush_volume_to_support;
}
else {
const wxColour& to = m_colours[modify_id];
Slic3r::FlushVolCalculator calculator(m_min_flush_volume, m_max_flush_volume);
flushing_volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());
if (is_from_support) {
flushing_volume = std::max(Slic3r::g_min_flush_volume_from_support, flushing_volume);
for (int j = 0; j < multi_colours[from_idx].size(); ++j) {
const wxColour& from = multi_colours[from_idx][j];
for (int k = 0; k < multi_colours[modify_id].size(); ++k) {
const wxColour& to = multi_colours[modify_id][k];
int volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());
flushing_volume = std::max(flushing_volume, volume);
}
}
if (is_from_support)
flushing_volume = std::max(flushing_volume, Slic3r::g_min_flush_volume_from_support);
}
matrix[m_number_of_extruders * from_idx + modify_id] = flushing_volume;
}
// modify to to
int to_idx = i;
if (to_idx != modify_id) {
const wxColour& from = m_colours[modify_id];
bool is_from_support = is_support_filament(modify_id);
const wxColour& to = m_colours[to_idx];
bool is_to_support = is_support_filament(to_idx);
int flushing_volume = 0;
if (is_to_support) {
flushing_volume = Slic3r::g_flush_volume_to_support;
}
else {
const wxColour& to = m_colours[to_idx];
Slic3r::FlushVolCalculator calculator(m_min_flush_volume, m_max_flush_volume);
flushing_volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());
if (is_from_support) {
flushing_volume = std::max(Slic3r::g_min_flush_volume_from_support, flushing_volume);
for (int j = 0; j < multi_colours[modify_id].size(); ++j) {
const wxColour& from = multi_colours[modify_id][j];
for (int k = 0; k < multi_colours[to_idx].size(); ++k) {
const wxColour& to = multi_colours[to_idx][k];
int volume = calculator.calc_flush_vol(from.Alpha(), from.Red(), from.Green(), from.Blue(), to.Alpha(), to.Red(), to.Green(), to.Blue());
flushing_volume = std::max(flushing_volume, volume);
}
}
if (is_from_support)
flushing_volume = std::max(flushing_volume, Slic3r::g_min_flush_volume_from_support);
matrix[m_number_of_extruders * modify_id + to_idx] = flushing_volume;
}
matrix[m_number_of_extruders * modify_id + to_idx] = flushing_volume;
}
}
}
(project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values = std::vector<double>(matrix.begin(), matrix.end());
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
wxGetApp().plater()->update_project_dirty_from_presets();
@ -2660,7 +2730,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
m_aui_mgr.Update();
}
menus.init(q);
menus.init(main_frame);
// Events:
@ -3412,7 +3482,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
int progress_percent = static_cast<int>(100.0f * static_cast<float>(i) / static_cast<float>(input_files.size()));
const auto real_filename = (strategy & LoadStrategy::Restore) ? input_files[++i].filename() : filename;
const auto dlg_info = _L("Loading file") + ": " + from_path(real_filename);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": load file %1%") % filename;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << boost::format(": load file %1%") % filename;
dlg_cont = dlg.Update(progress_percent, dlg_info);
if (!dlg_cont) return empty_result;
@ -5074,7 +5144,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
{
wxCHECK_RET(!(output_path.empty()), "export_gcode: output_path and upload_job empty");
BOOST_LOG_TRIVIAL(info) << boost::format("export_gcode: output_path %1%")%output_path.string();
BOOST_LOG_TRIVIAL(trace) << boost::format("export_gcode: output_path %1%")%output_path.string();
if (model.objects.empty())
return;
@ -6909,10 +6979,14 @@ void Plater::priv::on_filament_color_changed(wxCommandEvent &event)
{
//q->update_all_plate_thumbnails(true);
//q->get_preview_canvas3D()->update_plate_thumbnails();
int modify_id = event.GetInt();
if (wxGetApp().app_config->get("auto_calculate") == "true") {
int modify_id = event.GetInt();
sidebar->auto_calc_flushing_volumes(modify_id);
}
auto& ams_multi_color_filment = wxGetApp().preset_bundle->ams_multi_color_filment;
if (modify_id >= 0 && modify_id < ams_multi_color_filment.size())
ams_multi_color_filment[modify_id].clear();
}
void Plater::priv::install_network_plugin(wxCommandEvent &event)
@ -7257,7 +7331,7 @@ wxString Plater::priv::get_project_name()
//BBS
void Plater::priv::set_project_name(const wxString& project_name)
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " project is:" << project_name;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project is:" << project_name;
m_project_name = project_name;
//update topbar title
wxGetApp().mainframe->SetTitle(m_project_name);
@ -7287,7 +7361,7 @@ void Plater::priv::set_project_filename(const wxString& filename)
full_path.replace_extension("");
m_project_folder = full_path.parent_path();
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " project folder is:" << m_project_folder.string();
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project folder is:" << m_project_folder.string();
//BBS
wxString project_name = from_u8(full_path.filename().string());
@ -7803,16 +7877,29 @@ void Plater::priv::on_modify_filament(SimpleEvent &evt)
{
FilamentInfomation *filament_info = static_cast<FilamentInfomation *>(evt.GetEventObject());
int res;
std::shared_ptr<Preset> need_edit_preset;
{
EditFilamentPresetDialog dlg(wxGetApp().mainframe, filament_info);
res = dlg.ShowModal();
need_edit_preset = dlg.get_need_edit_preset();
}
wxGetApp().mainframe->update_side_preset_ui();
update_ui_from_settings();
sidebar->update_all_preset_comboboxes();
if (wxID_EDIT == res) {
Tab *tab = wxGetApp().get_tab(Preset::Type::TYPE_FILAMENT);
//tab->restore_last_select_item();
if (tab == nullptr) { return; }
// Popup needs to be called before "restore_last_select_item", otherwise the page may not be updated
wxGetApp().params_dialog()->Popup();
tab->restore_last_select_item();
// Opening Studio and directly accessing the Filament settings interface through the edit preset button will not take effect and requires manual settings.
tab->set_just_edit(true);
tab->select_preset(need_edit_preset->name);
// when some preset have modified, if the printer is not need_edit_preset_name compatible printer, the preset will jump to other preset, need select again
if (!need_edit_preset->is_compatible) tab->select_preset(need_edit_preset->name);
}
}
void Plater::priv::enter_gizmos_stack()
@ -8206,6 +8293,7 @@ void Plater::priv::record_start_print_preset(std::string action) {
// record start print preset
try {
json j;
j["user_mode"] = wxGetApp().get_mode_str();
int plate_count = partplate_list.get_plate_count();
j["plate_count"] = plate_count;
unsigned int obj_count = model.objects.size();
@ -8314,6 +8402,11 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_
get_notification_manager()->bbl_close_plateinfo_notification();
get_notification_manager()->bbl_close_preview_only_notification();
get_notification_manager()->bbl_close_3mf_warn_notification();
get_notification_manager()->close_notification_of_type(NotificationType::PlaterError);
get_notification_manager()->close_notification_of_type(NotificationType::PlaterWarning);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingError);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingSeriousWarning);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingWarning);
if (!silent)
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
@ -8366,6 +8459,7 @@ void Plater::load_project(wxString const& filename2,
wxString const& originfile)
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "filename is: " << filename2 << "and originfile is: " << originfile;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__;
auto filename = filename2;
auto check = [&filename, this] (bool yes_or_no) {
if (!yes_or_no && !wxGetApp().check_and_save_current_preset_changes(_L("Load project"),
@ -8399,6 +8493,11 @@ void Plater::load_project(wxString const& filename2,
get_notification_manager()->bbl_close_plateinfo_notification();
get_notification_manager()->bbl_close_preview_only_notification();
get_notification_manager()->bbl_close_3mf_warn_notification();
get_notification_manager()->close_notification_of_type(NotificationType::PlaterError);
get_notification_manager()->close_notification_of_type(NotificationType::PlaterWarning);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingError);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingSeriousWarning);
get_notification_manager()->close_notification_of_type(NotificationType::SlicingWarning);
auto path = into_path(filename);
@ -8498,7 +8597,7 @@ int Plater::save_project(bool saveAs)
Slic3r::remove_backup(model(), false);
p->set_project_filename(filename);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << filename;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << filename;
up_to_date(true, false);
up_to_date(true, true);
@ -8521,7 +8620,7 @@ int Plater::save_project(bool saveAs)
//BBS import model by model id
void Plater::import_model_id(wxString download_info)
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " download info: " << download_info;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " download info: " << download_info;
wxString download_origin_url = download_info;
wxString download_url;
@ -9359,7 +9458,8 @@ void Plater::load_gcode()
//BBS: remove GCodeViewer as seperate APP logic
void Plater::load_gcode(const wxString& filename)
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " entry and filename: " << filename;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " entry and filename: " << filename;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__;
if (! is_gcode_file(into_u8(filename))
|| (m_last_loaded_gcode == filename && m_only_gcode)
)
@ -10578,7 +10678,7 @@ void Plater::export_gcode(bool prefer_removable)
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
if (preset_bundle) {
j["Gcode_printer_model"] = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
j["gcode_printer_model"] = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
}
NetworkAgent *agent = wxGetApp().getAgent();
} catch (...) {}
@ -10691,7 +10791,7 @@ TriangleMesh Plater::combine_mesh_fff(const ModelObject& mo, int instance_id, st
std::vector<csg::CSGPart> csgmesh;
csgmesh.reserve(2 * mo.volumes.size());
bool has_splitable_volume = csg::model_to_csgmesh(mo, Transform3d::Identity(), std::back_inserter(csgmesh),
csg::mpartsPositive | csg::mpartsNegative | csg::mpartsDoSplits);
csg::mpartsPositive | csg::mpartsNegative);
if (csg::check_csgmesh_booleans(Range{ std::begin(csgmesh), std::end(csgmesh) }) == csgmesh.end()) {
try {
@ -11085,9 +11185,12 @@ int Plater::export_3mf(const boost::filesystem::path& output_path, SaveStrategy
const std::string path_u8 = into_u8(path);
wxBusyCursor wait;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
%output_path.string()%(strategy & SaveStrategy::Backup)%export_plate_idx %(unsigned int)strategy;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": path=%1%, backup=%2%, export_plate_idx=%3%, SaveStrategy=%4%")
% std::string("") % (strategy & SaveStrategy::Backup) % export_plate_idx % (unsigned int)strategy;
//BBS: add plate logic for thumbnail generate
std::vector<ThumbnailData*> thumbnails;
std::vector<ThumbnailData*> calibration_thumbnails;
@ -11241,7 +11344,7 @@ int Plater::export_3mf(const boost::filesystem::path& output_path, SaveStrategy
if (!(store_params.strategy & SaveStrategy::Silence)) {
// Success
p->set_project_filename(path);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << path;
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " call set_project_filename: " << path;
}
}
else {