Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added plugins/BambuSource.dll
Binary file not shown.
Binary file added plugins/agora_rtc_sdk.dll
Binary file not shown.
Binary file added plugins/bambu_networking.dll
Binary file not shown.
Binary file added plugins/bambu_networking_02.03.00.62.dll
Binary file not shown.
Binary file added plugins/libagora-core.dll
Binary file not shown.
Binary file added plugins/libagora-ffmpeg.dll
Binary file not shown.
Binary file added plugins/libagora-soundtouch.dll
Binary file not shown.
Binary file added plugins/live555.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions src/libslic3r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ if (_opts)
target_compile_options(libslic3r_cgal PRIVATE "${_opts_bad}")
endif()

target_link_libraries(libslic3r_cgal PRIVATE ${_cgal_tgt} eigen admesh libigl mcut boost_libs)
target_link_libraries(libslic3r_cgal PRIVATE ${_cgal_tgt} eigen admesh libigl mcut boost_libs OpenSSL::Crypto)

if (MSVC AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # 32 bit MSVC workaround
target_compile_definitions(libslic3r_cgal PRIVATE CGAL_DO_NOT_USE_MPZF)
Expand Down Expand Up @@ -590,11 +590,11 @@ target_link_libraries(libslic3r
if(NOT WIN32)
# Link freetype for OCCT dependency (CAD operations need font rendering)
target_link_libraries(libslic3r PRIVATE ${FREETYPE_LIBRARIES})
target_link_libraries(libslic3r PRIVATE OpenSSL::Crypto)
if (NOT APPLE)
target_link_libraries(libslic3r PRIVATE fontconfig)
endif()
endif()
target_link_libraries(libslic3r PRIVATE OpenSSL::Crypto)

if (APPLE)
find_library(FOUNDATION Foundation REQUIRED)
Expand Down
18 changes: 9 additions & 9 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3408,9 +3408,9 @@ void PrintConfigDef::init_fff_params()
def->label = L("Infill");
def->category = L("Extruders");
def->tooltip = L("Filament to print internal sparse infill.");
def->min = 1;
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(1));
def->set_default_value(new ConfigOptionInt(0));

def = this->add("sparse_infill_line_width", coFloatOrPercent);
def->label = L("Sparse infill");
Expand Down Expand Up @@ -4147,9 +4147,9 @@ void PrintConfigDef::init_fff_params()
def->label = L("Walls");
def->category = L("Extruders");
def->tooltip = L("Filament to print walls.");
def->min = 1;
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(1));
def->set_default_value(new ConfigOptionInt(0));

def = this->add("inner_wall_line_width", coFloatOrPercent);
def->label = L("Inner wall");
Expand Down Expand Up @@ -4445,7 +4445,7 @@ void PrintConfigDef::init_fff_params()
def->category = L("Support");
def->tooltip = L("Expand the first raft or support layer to improve bed plate adhesion.");
def->sidetext = "mm"; // milimeters, don't need translation
def->min = 0;
def->min = -1;
def->mode = comAdvanced;
//BBS: change from 3.0 to 2.0
def->set_default_value(new ConfigOptionFloat(2.0));
Expand Down Expand Up @@ -4944,9 +4944,9 @@ void PrintConfigDef::init_fff_params()
def->label = L("Solid infill");
def->category = L("Extruders");
def->tooltip = L("Filament to print solid infill.");
def->min = 1;
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(1));
def->set_default_value(new ConfigOptionInt(0));

def = this->add("internal_solid_infill_line_width", coFloatOrPercent);
def->label = L("Internal solid infill");
Expand Down Expand Up @@ -5677,8 +5677,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("tree_support_wall_count", coInt);
def->label = L("Support wall loops");
def->category = L("Support");
def->tooltip = L("This setting specifies the count of support walls in the range of [0,2]. 0 means auto.");
def->min = 0;
def->tooltip = L("This setting specifies the count of support walls in the range of [-1,2]. -1 means default, 0 means auto.");
def->min = -1;
def->max = 2;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(0));
Expand Down
54 changes: 23 additions & 31 deletions src/slic3r/GUI/ConnectPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,7 @@ ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, cons
sizer_connect->Add(FromDIP(20), 0);

m_button_confirm = new Button(this, _L("Confirm"));
m_button_confirm->SetFont(Label::Body_12);
m_button_confirm->SetMinSize(wxSize(-1, FromDIP(24)));
m_button_confirm->SetCornerRadius(FromDIP(12));
m_button_confirm->SetTextColor(wxColour("#FFFFFE"));

StateColor btn_bg(
std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal)
);

StateColor btn_bd(std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal));

StateColor btn_text(std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Normal));

m_button_confirm->SetBackgroundColor(btn_bg);
m_button_confirm->SetBorderColor(btn_bd);
m_button_confirm->SetTextColor(btn_text);
m_button_confirm->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);

sizer_connect->Add(m_button_confirm, 0, wxALL | wxALIGN_CENTER_VERTICAL, 0);

Expand All @@ -74,7 +57,7 @@ ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, cons

sizer_top->Add(0, FromDIP(35));

m_staticText_hints = new wxStaticText(this, wxID_ANY, _L("You can find it in \"Settings > Network > Connection code\"\non the printer, as shown in the figure:"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_hints = new wxStaticText(this, wxID_ANY, _L("You can find it in \"Settings > Network > Access code\"\non the printer, as shown in the figure:"), wxDefaultPosition, wxDefaultSize, 0);
m_staticText_hints->SetFont(Label::Body_15);
m_staticText_hints->SetForegroundColour(wxColour(50, 58, 61));
m_staticText_hints->Wrap(-1);
Expand All @@ -95,9 +78,8 @@ ConnectPrinterDialog::ConnectPrinterDialog(wxWindow *parent, wxWindowID id, cons

main_sizer->Add(sizer_top);

this->SetSizer(main_sizer);
this->SetSizerAndFit(main_sizer);
this->Layout();
this->Fit();
CentreOnParent();

m_textCtrl_code->Bind(wxEVT_TEXT, &ConnectPrinterDialog::on_input_enter, this);
Expand All @@ -118,15 +100,27 @@ void ConnectPrinterDialog::init_bitmap()
std::string language = config->get("language");

if (m_obj) {
std::string img_str = DeviceManager::get_printer_diagram_img(m_obj->printer_type);
if(img_str.empty()){img_str = "input_access_code_x1"; }
std::string img_str = "input_access_code_x1";

if (language == "zh_CN") {
m_diagram_bmp = create_scaled_bitmap(img_str+"_cn", nullptr, 190);
}
else {
m_diagram_bmp = create_scaled_bitmap(img_str+"_en", nullptr, 190);
}

// traverse the guide text
{
// traverse the guide text
if (m_obj->printer_type == "O1D")
{
m_staticText_hints->SetLabel(_L("You can find it in \"Setting > Setting > LAN only > Access Code\"\non the printer, as shown in the figure:"));
}
else
{
m_staticText_hints->SetLabel(_L("You can find it in \"Settings > Network > Access code\"\non the printer, as shown in the figure:"));
}
}
}
else{
if (language == "zh_CN") {
Expand Down Expand Up @@ -156,20 +150,19 @@ void ConnectPrinterDialog::on_input_enter(wxCommandEvent& evt)
}


void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
{
wxString code = m_textCtrl_code->GetTextCtrl()->GetValue();
if (code.empty())
code = "88888888";
for (char c : code) {
if (!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) {
show_error(this, _L("Invalid input."));
show_error(this, _L("Invalid input"));
return;
}
}
if (m_obj) {
m_obj->set_user_access_code(code.ToStdString());
if (m_need_connect) {
wxGetApp().getDeviceManager()->set_selected_machine(m_obj->dev_id);
}
m_obj->set_access_code(code.ToStdString());
}
EndModal(wxID_OK);
}
Expand All @@ -181,8 +174,7 @@ void ConnectPrinterDialog::on_dpi_changed(const wxRect &suggested_rect)
m_textCtrl_code->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(22)));
m_textCtrl_code->GetTextCtrl()->SetMinSize(wxSize(-1, FromDIP(22)));

m_button_confirm->SetCornerRadius(FromDIP(12));
m_button_confirm->Rescale();
m_button_confirm->Rescale(); // ORCA No need to set style again

Layout();
this->Refresh();
Expand Down
4 changes: 1 addition & 3 deletions src/slic3r/GUI/ConnectPrinter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class ConnectPrinterDialog : public DPIDialog
{
private:
protected:
bool m_need_connect{true};
wxStaticText * m_staticText_connection_code;
TextInput * m_textCtrl_code;
Button * m_button_confirm;
Expand All @@ -46,12 +45,11 @@ class ConnectPrinterDialog : public DPIDialog

~ConnectPrinterDialog();

void go_connect_printer(bool need) {m_need_connect = need;};
void end_modal(wxStandardID id);
void init_bitmap();
void set_machine_object(MachineObject* obj);
void on_input_enter(wxCommandEvent& evt);
void on_button_confirm(wxCommandEvent &event);
void on_button_confirm(wxCommandEvent &event);
void on_dpi_changed(const wxRect &suggested_rect) override;
};
}} // namespace Slic3r::GUI
Expand Down
27 changes: 26 additions & 1 deletion src/slic3r/GUI/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3134,6 +3134,12 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
}

if (!key_field_only) {
// Debug: log all support_* keys in MQTT data
for (auto& [key, val] : jj.items()) {
if (key.find("support_") == 0) {
BOOST_LOG_TRIVIAL(warning) << "SUPPORT FIELD: " << key << "=" << val.dump();
}
}
if (!DeviceManager::EnableMultiMachine && !is_support_agora) {
if (jj.contains("support_tunnel_mqtt")) {
if (jj["support_tunnel_mqtt"].is_boolean()) {
Expand Down Expand Up @@ -3894,6 +3900,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
try {
if (jj.contains("ipcam")) {
json const & ipcam = jj["ipcam"];
BOOST_LOG_TRIVIAL(warning) << "CAMERA IPCAM DATA: " << ipcam.dump();
if (ipcam.contains("ipcam_record")) {
if (camera_recording_hold_count > 0)
camera_recording_hold_count--;
Expand Down Expand Up @@ -3943,13 +3950,31 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
liveview_local = enum_index_of(ipcam["liveview"].value<std::string>("local", "none").c_str(), local_protos, 5, LiveviewLocal::LVL_None);
char const *remote_protos[] = {"none", "tutk", "agora", "tutk_agaro"};
liveview_remote = enum_index_of(ipcam["liveview"].value<std::string>("remote", "none").c_str(), remote_protos, 4, LiveviewRemote::LVR_None);
BOOST_LOG_TRIVIAL(warning) << "CAMERA DEBUG: liveview_local=" << liveview_local << " liveview_remote=" << liveview_remote << " is_support_agora=" << is_support_agora;
BOOST_LOG_TRIVIAL(warning) << "CAMERA DEBUG: liveview local_str=" << ipcam["liveview"].value<std::string>("local", "none") << " remote_str=" << ipcam["liveview"].value<std::string>("remote", "none");
} else {
BOOST_LOG_TRIVIAL(warning) << "CAMERA DEBUG: no liveview in ipcam section, trying mode_bits fallback";
// Fallback for printers that don't send liveview section (e.g. China Bambu)
// mode_bits: bit0=no local, bit1=local, bit2=remote
int mode_bits = ipcam.value("mode_bits", 0);
if (mode_bits & 0x2) liveview_local = LVL_Local;
if (is_support_agora || (mode_bits & 0x4)) liveview_remote = LVR_Agora;
else if (mode_bits & 0x2) liveview_remote = LVR_Agora;
BOOST_LOG_TRIVIAL(warning) << "CAMERA DEBUG: fallback liveview_local=" << liveview_local << " liveview_remote=" << liveview_remote << " mode_bits=" << mode_bits;
// Also set file protocols from mode_bits
if (mode_bits & 0x2) file_local = FL_Local;
if (mode_bits & 0x4 || is_support_agora) file_remote = FR_Agora;
}
if (ipcam.contains("file")) {
char const *local_protos[] = {"none", "local"};
file_local = enum_index_of(ipcam["file"].value<std::string>("local", "none").c_str(), local_protos, 2, FileLocal::FL_None);
char const *remote_protos[] = {"none", "tutk", "agora", "tutk_agaro"};
file_remote = enum_index_of(ipcam["file"].value<std::string>("remote", "none").c_str(), remote_protos, 4, FileRemote::FR_None);
file_model_download = ipcam["file"].value<std::string>("model_download", "disabled") == "enabled";
} else {
// Fallback for printers without file section (e.g. China Bambu)
file_local = liveview_local > 0 ? FL_Local : FL_None;
file_remote = liveview_remote > 0 ? FR_Agora : FR_None;
}
virtual_camera = ipcam.value<std::string>("virtual_camera", "disabled") == "enabled";
if (ipcam.contains("rtsp_url")) {
Expand Down Expand Up @@ -5545,7 +5570,7 @@ void MachineObject::parse_new_info(json print)

/*fun*/
std::string fun = print["fun"].get<std::string>();
BOOST_LOG_TRIVIAL(info) << "new print data fun = " << fun;
BOOST_LOG_TRIVIAL(warning) << "new print data fun = " << fun;

if (!fun.empty()) {

Expand Down
17 changes: 2 additions & 15 deletions src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1976,12 +1976,7 @@ void GUI_App::init_networking_callbacks()

auto sel = this->m_device_manager->get_selected_machine();

if (sel && sel->dev_id == dev_id) {
obj->parse_json(msg);
}
else {
obj->parse_json(msg, true);
}
obj->parse_json(msg);


if (!this->is_enable_multi_machine()) {
Expand Down Expand Up @@ -2024,20 +2019,12 @@ void GUI_App::init_networking_callbacks()

this->process_network_msg(dev_id, msg);
MachineObject* obj = m_device_manager->get_my_machine(dev_id);
if (!obj || !obj->is_lan_mode_printer()) {
obj = m_device_manager->get_local_machine(dev_id);
}

if (obj) {
obj->parse_json(msg, DeviceManager::key_field_only);
obj->parse_json(msg);
if (this->m_device_manager->get_selected_machine() == obj && obj->is_ams_need_update) {
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
}
}
obj = m_device_manager->get_local_machine(dev_id);
if (obj) {
obj->parse_json(msg, DeviceManager::key_field_only);
}
});
};
m_agent->set_on_local_message_fn(lan_message_arrive_fn);
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/MediaPlayCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
m_lan_mode = obj->is_lan_mode_printer();
m_lan_proto = obj->liveview_local;
m_remote_proto = obj->get_liveview_remote();
BOOST_LOG_TRIVIAL(warning) << "CAMERA SetMachine: has_ipcam=" << obj->has_ipcam << " liveview_local=" << m_lan_proto << " liveview_remote=" << m_remote_proto << " is_support_agora=" << obj->is_support_agora << " dev_id=" << machine;
m_lan_ip = obj->dev_ip;
m_lan_passwd = obj->get_access_code();
m_device_busy = obj->is_camera_busy_off();
Expand Down Expand Up @@ -309,6 +310,7 @@ void MediaPlayCtrl::Play()
// !m_lan_mode && !m_remote_proto && m_lan_proto == LVL_Disable (*)
// !m_lan_mode && !m_remote_proto && m_lan_proto == LVL_None (x)

BOOST_LOG_TRIVIAL(warning) << "CAMERA MEDIA DEBUG: m_lan_proto=" << m_lan_proto << " m_remote_proto=" << m_remote_proto << " m_lan_mode=" << m_lan_mode << " m_camera_exists=" << m_camera_exists << " m_dev_ver=" << m_dev_ver;
if (m_lan_proto <= MachineObject::LVL_Disable && (m_lan_mode || !m_remote_proto)) {
Stop(m_lan_proto == MachineObject::LVL_None
? _L("A problem occurred. Please update the printer firmware and try again.")
Expand Down
12 changes: 11 additions & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9152,7 +9152,16 @@ void Sidebar::show_sync_filament_dialog()

{
static const std::set<std::string> white_list_machine_types = {
"Snapmaker U1"
"Snapmaker U1",
"Bambu Lab A1",
"Bambu Lab A1 mini",
"Bambu Lab P1P",
"Bambu Lab P1S",
"Bambu Lab X1",
"Bambu Lab X1 Carbon",
"Bambu Lab X1E",
"N1A", "N1B", "N2S", "N2H", "N2J", "N2K",
"C11", "C12", "C13", "C14"
};
std::string machine_type;
std::string device_name;
Expand All @@ -9171,6 +9180,7 @@ void Sidebar::show_sync_filament_dialog()
}

bool is_white_listed_type = white_list_machine_types.find(machine_type) != white_list_machine_types.end();
BOOST_LOG_TRIVIAL(warning) << "FILAMENT_SYNC DEBUG: got_machine_info=" << got_machine_info << " machine_type='" << machine_type << "' printer_type='" << (device_machine ? device_machine->printer_type : "null") << "' is_white_listed=" << is_white_listed_type;

if (got_machine_info && !machine_type.empty() && !is_white_listed_type) {
SyncRichConfirmDialog dlg(this,
Expand Down
16 changes: 13 additions & 3 deletions src/slic3r/GUI/SelectMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,19 +894,29 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa

void SelectMachineDialog::update_select_layout(MachineObject *obj)
{
if (obj && obj->is_support_auto_flow_calibration) {
// Check if this is a Bambu Lab printer by model_id (N2S=A1, N1A=A1 mini, etc.)
static const std::set<std::string> bambu_model_ids = {
"N1A", "N1B", // A1 mini variants
"N2S", // A1
"N2H", "N2J", "N2K", // P1P/P1S variants
"C11", "C12", "C13", // X1/X1C/X1E variants
"C14" // X1E
};
bool is_bambu = obj && bambu_model_ids.count(obj->printer_type) > 0;

if (obj && (obj->is_support_auto_flow_calibration || is_bambu)) {
select_flow->Show();
} else {
select_flow->Hide();
}

if (obj && obj->is_support_auto_leveling) {
if (obj && (obj->is_support_auto_leveling || is_bambu)) {
select_bed->Show();
} else {
select_bed->Hide();
}

if (obj && obj->is_support_timelapse && is_show_timelapse()) {
if (obj && (obj->is_support_timelapse || is_bambu) && is_show_timelapse()) {
select_timelapse->Show();
update_timelapse_enable_status();
} else {
Expand Down
Loading