mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
Merge branch 'master-remote' into SoftFever
# Conflicts: # resources/profiles/Creality.json # resources/profiles/Voron.json # version.inc
This commit is contained in:
commit
6fb941cf4c
26 changed files with 224 additions and 70 deletions
|
@ -31,8 +31,8 @@ namespace GUI {
|
|||
DownloadProgressDialog::DownloadProgressDialog(wxString title)
|
||||
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
{
|
||||
wxString download_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
|
||||
wxString install_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
|
||||
wxString download_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
|
||||
wxString install_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
|
||||
|
||||
wxString download_failed_msg = _L("Failed to download the plug-in. Please check your firewall settings and vpn software, check and retry.");
|
||||
wxString install_failed_msg = _L("Failed to install the plug-in. Please check whether it is blocked or deleted by anti-virus software.");
|
||||
|
|
|
@ -248,7 +248,8 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
|
|||
return owner.model_instance_id == id;
|
||||
});
|
||||
if (it != owners.end())
|
||||
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
|
||||
//it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
|
||||
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(sorted_instances[i]->arrange_order);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6032,10 +6033,20 @@ void GLCanvas3D::_render_overlays()
|
|||
bool sequential_print = opt != nullptr && (opt->value == PrintSequence::ByObject);
|
||||
std::vector<const ModelInstance*> sorted_instances;
|
||||
if (sequential_print) {
|
||||
for (ModelObject* model_object : m_model->objects)
|
||||
const Print* print = fff_print();
|
||||
if (print) {
|
||||
for (const PrintObject *print_object : print->objects())
|
||||
{
|
||||
for (const PrintInstance &instance : print_object->instances())
|
||||
{
|
||||
sorted_instances.emplace_back(instance.model_instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*for (ModelObject* model_object : m_model->objects)
|
||||
for (ModelInstance* model_instance : model_object->instances) {
|
||||
sorted_instances.emplace_back(model_instance);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
m_labels.render(sorted_instances);
|
||||
|
||||
|
|
|
@ -1333,7 +1333,7 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
|
|||
menu->Destroy(item_id);
|
||||
}
|
||||
|
||||
const int filaments_cnt = filaments_count();
|
||||
int filaments_cnt = filaments_count();
|
||||
if (filaments_cnt <= 1)
|
||||
return;
|
||||
|
||||
|
@ -1345,6 +1345,10 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
|
|||
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
|
||||
if (icons.size() < filaments_cnt) {
|
||||
BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: icons size %1%, filaments_cnt=%2%")%icons.size()%filaments_cnt;
|
||||
if (icons.size() <= 1)
|
||||
return;
|
||||
else
|
||||
filaments_cnt = icons.size();
|
||||
}
|
||||
wxMenu* extruder_selection_menu = new wxMenu();
|
||||
const wxString& name = sels.Count() == 1 ? names[0] : names[1];
|
||||
|
|
|
@ -816,7 +816,6 @@ void AssembleView::reload_scene(bool refresh_immediately, bool force_full_scene_
|
|||
m_canvas->render(true);
|
||||
}
|
||||
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
|
||||
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -611,6 +611,9 @@ void ModelObjectsInfo::on_update()
|
|||
if (!get_pool()->get_canvas()->get_model()->objects.empty()) {
|
||||
m_model_objects = get_pool()->get_canvas()->get_model()->objects;
|
||||
}
|
||||
else {
|
||||
m_model_objects.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void ModelObjectsInfo::on_release()
|
||||
|
|
|
@ -345,7 +345,7 @@ void GLGizmosManager::update(const Linef3& mouse_ray, const Point& mouse_pos)
|
|||
void GLGizmosManager::update_assemble_view_data()
|
||||
{
|
||||
if (m_assemble_view_data) {
|
||||
if (m_parent.get_canvas_type() != GLCanvas3D::CanvasAssembleView)
|
||||
if (!wxGetApp().plater()->get_assmeble_canvas3D()->get_wxglcanvas()->IsShown())
|
||||
m_assemble_view_data->update(AssembleViewDataID(0));
|
||||
else
|
||||
m_assemble_view_data->update(AssembleViewDataID((int)AssembleViewDataID::ModelObjectsInfo | (int)AssembleViewDataID::ModelObjectsClipper));
|
||||
|
|
|
@ -503,6 +503,9 @@ void ArrangeJob::process()
|
|||
if (params.is_seq_print)
|
||||
params.min_obj_distance = std::max(params.min_obj_distance, scaled(params.cleareance_radius));
|
||||
|
||||
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
|
||||
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
|
||||
|
||||
double skirt_distance = print.has_skirt() ? print.config().skirt_distance.value : 0;
|
||||
double brim_max = 0;
|
||||
std::for_each(m_selected.begin(), m_selected.end(), [&](ArrangePolygon ap) { brim_max = std::max(brim_max, ap.brim_width); });
|
||||
|
@ -514,21 +517,26 @@ void ArrangeJob::process()
|
|||
params.bed_shrink_y = settings.bed_shrink_y + params.brim_skirt_distance;
|
||||
// for sequential print, we need to inflate the bed because cleareance_radius is so large
|
||||
if (params.is_seq_print) {
|
||||
params.bed_shrink_x -= params.cleareance_radius/2;
|
||||
params.bed_shrink_y -= params.cleareance_radius/2;
|
||||
float shift_dist = params.cleareance_radius / 2 - 5;
|
||||
params.bed_shrink_x -= shift_dist;
|
||||
params.bed_shrink_y -= shift_dist;
|
||||
// dont forget to move the excluded region
|
||||
for (auto& region : m_unselected) {
|
||||
if (region.is_virt_object)
|
||||
region.poly.translate(-scaled(params.cleareance_radius/2), -scaled(params.cleareance_radius/2));
|
||||
region.poly.translate(-scaled(shift_dist), -scaled(shift_dist));
|
||||
}
|
||||
}
|
||||
|
||||
// do not inflate brim_width. Objects are allowed to have overlapped brim.
|
||||
std::for_each(m_selected.begin(), m_selected.end(), [&](auto& ap) {ap.inflation = params.min_obj_distance / 2; });
|
||||
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto& ap) {ap.inflation = ap.is_virt_object ? scaled(params.brim_skirt_distance) : params.min_obj_distance / 2; });
|
||||
// For occulusion regions, inflation should be larger to prevent genrating brim on them.
|
||||
// However, extrusion cali regions are exceptional, since we can allow brim overlaps them.
|
||||
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto &ap) {
|
||||
ap.inflation = !ap.is_virt_object ?
|
||||
params.min_obj_distance / 2 :
|
||||
(ap.is_extrusion_cali_object ? scaled(params.cleareance_radius / 2) : scaled(params.brim_skirt_distance + params.cleareance_radius / 2));
|
||||
});
|
||||
|
||||
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
|
||||
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
|
||||
|
||||
m_plater->get_partplate_list().preprocess_exclude_areas(params.excluded_regions, 1);
|
||||
|
||||
|
@ -567,6 +575,7 @@ void ArrangeJob::process()
|
|||
<< ", bed_temp: " << selected.first_bed_temp << ", print_temp: " << selected.print_temp;
|
||||
BOOST_LOG_TRIVIAL(debug) << "items unselected before arrange: ";
|
||||
for (auto item : m_unselected)
|
||||
if (!item.is_virt_object)
|
||||
BOOST_LOG_TRIVIAL(debug) << item.name << ", extruder: " << item.extrude_ids.back() << ", bed: " << item.bed_idx << ", trans: " << item.translation.transpose();
|
||||
}
|
||||
|
||||
|
|
|
@ -3461,6 +3461,7 @@ bool PartPlateList::preprocess_nonprefered_areas(arrangement::ArrangePolygons& r
|
|||
ret.translation = Vec2crd(0, 0);
|
||||
ret.rotation = 0.0f;
|
||||
ret.is_virt_object = true;
|
||||
ret.is_extrusion_cali_object = true;
|
||||
ret.bed_idx = j;
|
||||
ret.height = 1;
|
||||
ret.name = "NonpreferedRegion" + std::to_string(index);
|
||||
|
|
|
@ -2020,7 +2020,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
//BBS: add bed_exclude_area
|
||||
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
|
||||
"printable_area", "bed_exclude_area", "print_sequence",
|
||||
"extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
|
||||
"extruder_clearance_radius", "extruder_clearance_max_radius",
|
||||
"extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
|
||||
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material",
|
||||
"enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_volume",
|
||||
"extruder_colour", "filament_colour", "material_colour", "printable_height", "printer_model", "printer_technology",
|
||||
|
@ -7224,7 +7225,7 @@ void Plater::add_model(bool imperial_units/* = false*/)
|
|||
if (!load_files(paths, strategy, ask_multi).empty()) {
|
||||
|
||||
if (get_project_name() == _L("Untitled") && paths.size() > 0) {
|
||||
p->set_project_filename(wxString(paths[0].string()));
|
||||
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
|
||||
}
|
||||
|
||||
wxGetApp().mainframe->update_title();
|
||||
|
@ -9319,6 +9320,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
|||
{
|
||||
bool update_scheduled = false;
|
||||
bool bed_shape_changed = false;
|
||||
bool print_sequence_changed = false;
|
||||
t_config_option_keys diff_keys = p->config->diff(config);
|
||||
for (auto opt_key : diff_keys) {
|
||||
if (opt_key == "filament_colour") {
|
||||
|
@ -9369,6 +9371,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
|||
}
|
||||
else if (opt_key == "print_sequence") {
|
||||
update_scheduled = true;
|
||||
print_sequence_changed = true;
|
||||
}
|
||||
else if (opt_key == "printer_model") {
|
||||
p->reset_gcode_toolpaths();
|
||||
|
@ -9393,6 +9396,9 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
|||
if (seq_print->value == PrintSequence::ByObject) {
|
||||
std::string info_text = L("Print By Object: \nSuggest to use auto-arrange to avoid collisions when printing.");
|
||||
notify_manager->bbl_show_seqprintinfo_notification(info_text);
|
||||
//always show label when switch to sequence print
|
||||
if (print_sequence_changed)
|
||||
this->show_view3D_labels(true);
|
||||
}
|
||||
else
|
||||
notify_manager->bbl_close_seqprintinfo_notification();
|
||||
|
|
|
@ -89,6 +89,7 @@ void ReleaseNoteDialog::update_release_note(wxString release_note, std::string v
|
|||
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
|
||||
m_vebview_release_note->SetSizer(sizer_text_release_note);
|
||||
m_vebview_release_note->Layout();
|
||||
m_vebview_release_note->Fit();
|
||||
}
|
||||
|
||||
void UpdateVersionDialog::alter_choice(wxCommandEvent& event)
|
||||
|
@ -333,6 +334,7 @@ void UpdateVersionDialog::update_version_info(wxString release_note, wxString ve
|
|||
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
|
||||
m_scrollwindows_release_note->SetSizer(sizer_text_release_note);
|
||||
m_scrollwindows_release_note->Layout();
|
||||
m_scrollwindows_release_note->Fit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -643,7 +643,7 @@ void SelectMachinePopup::update_other_devices()
|
|||
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
|
||||
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
|
||||
|
@ -860,6 +860,12 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
|
|||
wxPostEvent(p->mPanel, event);
|
||||
}
|
||||
}
|
||||
|
||||
//hyper link
|
||||
auto h_rect = m_hyperlink->ClientToScreen(wxPoint(0, 0));
|
||||
if (mouse_pos.x > h_rect.x && mouse_pos.y > h_rect.y && mouse_pos.x < (h_rect.x + m_hyperlink->GetSize().x) && mouse_pos.y < (h_rect.y + m_hyperlink->GetSize().y)) {
|
||||
wxLaunchDefaultBrowser(wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,6 +198,7 @@ private:
|
|||
int m_my_devices_count{0};
|
||||
int m_other_devices_count{0};
|
||||
wxWindow* m_placeholder_panel{nullptr};
|
||||
wxHyperlinkCtrl* m_hyperlink{nullptr};
|
||||
wxBoxSizer * m_sizer_body{nullptr};
|
||||
wxBoxSizer * m_sizer_my_devices{nullptr};
|
||||
wxBoxSizer * m_sizer_other_devices{nullptr};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue