From 59c6434734e4a0bc8d13b54b53e482691d04481b Mon Sep 17 00:00:00 2001 From: alves Date: Thu, 12 Mar 2026 17:08:06 +0800 Subject: [PATCH 1/3] feature add filament for profile. --- resources/profiles/Snapmaker.json | 28 ++- .../Polymaker General PLA Family @U1.json | 35 ++++ .../filament/Polymaker PLA @U1 base.json | 11 ++ .../Polymaker Silk PLA Family @U1.json | 35 ++++ .../Polymaker Tough PLA Family @U1.json | 35 ++++ .../filament/fdm_filament_common_poly.json | 187 ++++++++++++++++++ .../filament/fdm_filament_pla_poly.json | 89 +++++++++ 7 files changed, 418 insertions(+), 2 deletions(-) create mode 100644 resources/profiles/Snapmaker/filament/Polymaker General PLA Family @U1.json create mode 100644 resources/profiles/Snapmaker/filament/Polymaker PLA @U1 base.json create mode 100644 resources/profiles/Snapmaker/filament/Polymaker Silk PLA Family @U1.json create mode 100644 resources/profiles/Snapmaker/filament/Polymaker Tough PLA Family @U1.json create mode 100644 resources/profiles/Snapmaker/filament/fdm_filament_common_poly.json create mode 100644 resources/profiles/Snapmaker/filament/fdm_filament_pla_poly.json diff --git a/resources/profiles/Snapmaker.json b/resources/profiles/Snapmaker.json index 71d14fe799..6c055724c0 100644 --- a/resources/profiles/Snapmaker.json +++ b/resources/profiles/Snapmaker.json @@ -1,6 +1,6 @@ { "name": "Snapmaker", - "version": "02.02.43.02", + "version": "02.02.44.02", "force_update": "0", "description": "Snapmaker configurations", "machine_model_list": [ @@ -1322,8 +1322,32 @@ { "name": "Snapmaker TPU 95A @U1 base", "sub_path":"filament/Snapmaker TPU 95A @U1 base.json" + }, + + { + "name": "fdm_filament_common_poly", + "sub_path": "filament/fdm_filament_common_poly.json" + }, + { + "name": "fdm_filament_pla_poly", + "sub_path": "filament/fdm_filament_pla_poly.json" + }, + { + "name": "Polymaker PLA @U1 base", + "sub_path": "filament/Polymaker PLA @U1 base.json" + }, + { + "name": "Polymaker General PLA Family @U1", + "sub_path": "filament/Polymaker General PLA Family @U1.json" + }, + { + "name": "Polymaker Silk PLA Family @U1", + "sub_path": "filament/Polymaker Silk PLA Family @U1.json" + }, + { + "name": "Polymaker Tough PLA Family @U1", + "sub_path": "filament/Polymaker Tough PLA Family @U1.json" } - ], "machine_list": [ { diff --git a/resources/profiles/Snapmaker/filament/Polymaker General PLA Family @U1.json b/resources/profiles/Snapmaker/filament/Polymaker General PLA Family @U1.json new file mode 100644 index 0000000000..2f40e7170e --- /dev/null +++ b/resources/profiles/Snapmaker/filament/Polymaker General PLA Family @U1.json @@ -0,0 +1,35 @@ +{ + "type": "filament", + "instantiation": "true", + "setting_id": "POLY_GENERAL_PLA_U1_001", + "compatible_printers": [ + "Snapmaker U1 (0.4 nozzle)" + ], + "enable_pressure_advance": [ + "1" + ], + "filament_max_volumetric_speed": [ + "15" + ], + "filament_settings_id": [ + "Polymaker General PLA Family @U1" + ], + "filament_vendor": [ + "Polymaker" + ], + "from": "system", + "inherits": "Polymaker PLA @U1 base", + "name": "Polymaker General PLA Family @U1", + "nozzle_temperature_range_high": [ + "230" + ], + "temperature_vitrification": [ + "62" + ], + "textured_plate_temp": [ + "65" + ], + "textured_plate_temp_initial_layer": [ + "65" + ] +} diff --git a/resources/profiles/Snapmaker/filament/Polymaker PLA @U1 base.json b/resources/profiles/Snapmaker/filament/Polymaker PLA @U1 base.json new file mode 100644 index 0000000000..94008ddd0c --- /dev/null +++ b/resources/profiles/Snapmaker/filament/Polymaker PLA @U1 base.json @@ -0,0 +1,11 @@ +{ + "type": "filament", + "name": "Polymaker PLA @U1 base", + "inherits": "fdm_filament_pla_poly", + "from": "system", + "setting_id": "OGFSA04", + "instantiation": "false", + "compatible_printers": [ + "Snapmaker U1 (0.4 nozzle)" + ] +} \ No newline at end of file diff --git a/resources/profiles/Snapmaker/filament/Polymaker Silk PLA Family @U1.json b/resources/profiles/Snapmaker/filament/Polymaker Silk PLA Family @U1.json new file mode 100644 index 0000000000..8eb48fdc72 --- /dev/null +++ b/resources/profiles/Snapmaker/filament/Polymaker Silk PLA Family @U1.json @@ -0,0 +1,35 @@ +{ + "type": "filament", + "instantiation": "true", + "setting_id": "POLY_SILK_PLA_U1_001", + "compatible_printers": [ + "Snapmaker U1 (0.4 nozzle)" + ], + "filament_density": [ + "1.34" + ], + "filament_settings_id": [ + "Polymaker Silk PLA Family @U1" + ], + "filament_vendor": [ + "Polymaker" + ], + "from": "system", + "inherits": "Polymaker PLA @U1 base", + "name": "Polymaker Silk PLA Family @U1", + "nozzle_temperature": [ + "230" + ], + "nozzle_temperature_initial_layer": [ + "230" + ], + "nozzle_temperature_range_high": [ + "230" + ], + "textured_plate_temp": [ + "65" + ], + "textured_plate_temp_initial_layer": [ + "65" + ] +} diff --git a/resources/profiles/Snapmaker/filament/Polymaker Tough PLA Family @U1.json b/resources/profiles/Snapmaker/filament/Polymaker Tough PLA Family @U1.json new file mode 100644 index 0000000000..8039e28416 --- /dev/null +++ b/resources/profiles/Snapmaker/filament/Polymaker Tough PLA Family @U1.json @@ -0,0 +1,35 @@ +{ + "type": "filament", + "instantiation": "true", + "setting_id": "POLY_TOUGH_PLA_U1_001", + "compatible_printers": [ + "Snapmaker U1 (0.4 nozzle)" + ], + "filament_density": [ + "1.23" + ], + "filament_flow_ratio": [ + "0.96" + ], + "filament_settings_id": [ + "Polymaker Tough PLA Family @U1" + ], + "filament_vendor": [ + "Polymaker" + ], + "from": "system", + "inherits": "Polymaker PLA @U1 base", + "name": "Polymaker Tough PLA Family @U1", + "slow_down_layer_time": [ + "6" + ], + "temperature_vitrification": [ + "55" + ], + "textured_plate_temp": [ + "65" + ], + "textured_plate_temp_initial_layer": [ + "65" + ] +} diff --git a/resources/profiles/Snapmaker/filament/fdm_filament_common_poly.json b/resources/profiles/Snapmaker/filament/fdm_filament_common_poly.json new file mode 100644 index 0000000000..5453445af0 --- /dev/null +++ b/resources/profiles/Snapmaker/filament/fdm_filament_common_poly.json @@ -0,0 +1,187 @@ +{ + "type": "filament", + "name": "fdm_filament_common_poly", + "from": "system", + "instantiation": "false", + "activate_air_filtration": [ + "0" + ], + "chamber_temperatures": [ + "0" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "complete_print_exhaust_fan_speed": [ + "70" + ], + "cool_plate_temp": [ + "60" + ], + "cool_plate_temp_initial_layer": [ + "60" + ], + "during_print_exhaust_fan_speed": [ + "70" + ], + "eng_plate_temp": [ + "60" + ], + "eng_plate_temp_initial_layer": [ + "60" + ], + "fan_cooling_layer_time": [ + "60" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "35" + ], + "filament_cost": [ + "0" + ], + "filament_density": [ + "0" + ], + "filament_deretraction_speed": [ + "nil" + ], + "filament_diameter": [ + "1.75" + ], + "filament_flow_ratio": [ + "1" + ], + "filament_is_support": [ + "0" + ], + "filament_long_retractions_when_cut": [ + "nil" + ], + "filament_max_volumetric_speed": [ + "0" + ], + "filament_minimal_purge_on_wipe_tower": [ + "15" + ], + "filament_retract_before_wipe": [ + "nil" + ], + "filament_retract_restart_extra": [ + "nil" + ], + "filament_retract_when_changing_layer": [ + "nil" + ], + "filament_retraction_distances_when_cut": [ + "nil" + ], + "filament_retraction_length": [ + "nil" + ], + "filament_retraction_minimum_travel": [ + "nil" + ], + "filament_retraction_speed": [ + "nil" + ], + "filament_settings_id": [ + "" + ], + "filament_soluble": [ + "0" + ], + "filament_type": [ + "PLA" + ], + "filament_vendor": [ + "Generic" + ], + "filament_wipe": [ + "nil" + ], + "filament_wipe_distance": [ + "nil" + ], + "filament_z_hop": [ + "nil" + ], + "filament_z_hop_types": [ + "nil" + ], + "full_fan_speed_layer": [ + "0" + ], + "filament_scarf_seam_type": [ + "none" + ], + "filament_scarf_height": [ + "10%" + ], + "filament_scarf_gap": [ + "0%" + ], + "filament_scarf_length": [ + "10" + ], + "filament_shrink": [ + "100%" + ], + "hot_plate_temp": [ + "60" + ], + "hot_plate_temp_initial_layer": [ + "60" + ], + "nozzle_temperature": [ + "200" + ], + "nozzle_temperature_initial_layer": [ + "200" + ], + "overhang_fan_speed": [ + "100" + ], + "overhang_fan_threshold": [ + "95%" + ], + "reduce_fan_stop_start_freq": [ + "0" + ], + "required_nozzle_HRC": [ + "3" + ], + "supertack_plate_temp": [ + "45" + ], + "supertack_plate_temp_initial_layer": [ + "45" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_layer_time": [ + "8" + ], + "slow_down_min_speed": [ + "10" + ], + "temperature_vitrification": [ + "100" + ], + "textured_plate_temp": [ + "60" + ], + "textured_plate_temp_initial_layer": [ + "60" + ], + "filament_start_gcode": [ + "; Filament gcode\n" + ], + "filament_end_gcode": [ + "; filament end gcode\n" + ], + "compatible_printers": [] +} \ No newline at end of file diff --git a/resources/profiles/Snapmaker/filament/fdm_filament_pla_poly.json b/resources/profiles/Snapmaker/filament/fdm_filament_pla_poly.json new file mode 100644 index 0000000000..935a011aba --- /dev/null +++ b/resources/profiles/Snapmaker/filament/fdm_filament_pla_poly.json @@ -0,0 +1,89 @@ +{ + "type": "filament", + "name": "fdm_filament_pla_poly", + "inherits": "fdm_filament_common_poly", + "from": "system", + "filament_id": "OGFL99", + "instantiation": "false", + "additional_cooling_fan_speed": [ + "70" + ], + "close_fan_the_first_x_layers": [ + "1" + ], + "cool_plate_temp": [ + "35" + ], + "cool_plate_temp_initial_layer": [ + "35" + ], + "eng_plate_temp": [ + "0" + ], + "eng_plate_temp_initial_layer": [ + "0" + ], + "fan_cooling_layer_time": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "filament_cost": [ + "20" + ], + "filament_density": [ + "1.24" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "filament_scarf_seam_type": [ + "none" + ], + "filament_scarf_gap": [ + "15%" + ], + "hot_plate_temp": [ + "55" + ], + "hot_plate_temp_initial_layer": [ + "55" + ], + "nozzle_temperature": [ + "220" + ], + "nozzle_temperature_initial_layer": [ + "220" + ], + "nozzle_temperature_range_low": [ + "190" + ], + "nozzle_temperature_range_high": [ + "240" + ], + "overhang_fan_threshold": [ + "50%" + ], + "reduce_fan_stop_start_freq": [ + "1" + ], + "slow_down_layer_time": [ + "4" + ], + "slow_down_min_speed": [ + "10" + ], + "temperature_vitrification": [ + "45" + ], + "textured_plate_temp": [ + "55" + ], + "textured_plate_temp_initial_layer": [ + "55" + ], + "filament_flow_ratio": [ + "0.98" + ] +} \ No newline at end of file From 677ebe9d6c455db96011972ff9f6aaeb127664a5 Mon Sep 17 00:00:00 2001 From: alves Date: Thu, 12 Mar 2026 17:13:28 +0800 Subject: [PATCH 2/3] feature code format. --- src/slic3r/GUI/HttpServer.cpp | 2 +- src/slic3r/GUI/PrinterWebView.cpp | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/slic3r/GUI/HttpServer.cpp b/src/slic3r/GUI/HttpServer.cpp index 1e57831fe2..af7a3f6e7c 100644 --- a/src/slic3r/GUI/HttpServer.cpp +++ b/src/slic3r/GUI/HttpServer.cpp @@ -411,7 +411,7 @@ bool HttpServer::is_healthy() if (!ec) { test_socket.close(); - BOOST_LOG_TRIVIAL(error) << "Health check passed: test connection successful on port " << port; + BOOST_LOG_TRIVIAL(debug) << "Health check passed: test connection successful on port " << port; return true; } diff --git a/src/slic3r/GUI/PrinterWebView.cpp b/src/slic3r/GUI/PrinterWebView.cpp index 685cf92685..d0e4ad3489 100644 --- a/src/slic3r/GUI/PrinterWebView.cpp +++ b/src/slic3r/GUI/PrinterWebView.cpp @@ -28,8 +28,10 @@ PrinterWebView::PrinterWebView(wxWindow *parent) wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + wxString url = wxString::FromUTF8(LOCALHOST_URL + std::to_string(PAGE_HTTP_PORT) + "/web/flutter_web/index.html?path=2"); + auto real_url = wxGetApp().get_international_url(url); // Create the webview - m_browser = WebView::CreateWebView(this, ""); + m_browser = WebView::CreateWebView(this, real_url); if (m_browser == nullptr) { wxLogError("Could not init m_browser"); return; @@ -45,16 +47,6 @@ PrinterWebView::PrinterWebView(wxWindow *parent) update_mode(); - // Log backend information - /* m_browser->GetUserAgent() may lead crash - if (wxGetApp().get_mode() == comDevelop) { - wxLogMessage(wxWebView::GetBackendVersionInfo().ToString()); - wxLogMessage("Backend: %s Version: %s", m_browser->GetClassInfo()->GetClassName(), - wxWebView::GetBackendVersionInfo().ToString()); - wxLogMessage("User Agent: %s", m_browser->GetUserAgent()); - } - */ - //Zoom m_zoomFactor = 100; @@ -90,10 +82,9 @@ void PrinterWebView::load_url(wxString& url, wxString apikey) wxGetApp().fltviews().remove_printer_view(this); } + m_browser->Show(); m_browser->LoadURL(url); - m_browser->Show(); - //m_browser->SetFocus(); UpdateState(); } From b6896572269a0c37b80a6e4db838877d0d5e770a Mon Sep 17 00:00:00 2001 From: alves Date: Thu, 12 Mar 2026 18:12:46 +0800 Subject: [PATCH 3/3] feature remove the print view hide logic. --- src/slic3r/GUI/MainFrame.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index e0e7aad02e..5e40add197 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1155,11 +1155,9 @@ void MainFrame::init_tabpanel() { Bind(EVT_LOAD_PRINTER_URL, [this](LoadPrinterViewEvent &evt) { wxString url = evt.GetString(); wxString key = evt.GetAPIkey(); - //select_tab(MainFrame::tpMonitor); m_printer_view->Show(); m_printer_view->load_url(url, key); }); - m_printer_view->Hide(); if (wxGetApp().is_enable_multi_machine()) { m_multi_machine = new MultiMachinePage(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize); @@ -1198,7 +1196,7 @@ void MainFrame::show_device(bool bBBLPrinter) { return; // Remove printer view if ((idx = m_tabpanel->FindPage(m_printer_view)) != wxNOT_FOUND) { - m_printer_view->Show(false); + //m_printer_view->Show(false); m_tabpanel->RemovePage(idx); } @@ -1260,7 +1258,7 @@ void MainFrame::show_device(bool bBBLPrinter) { m_printer_view->load_url(url, key); }); } - m_printer_view->Show(false); + //m_printer_view->Show(false); m_tabpanel->InsertPage(tpMonitor, m_printer_view, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active")); }