Merge upstream BBL changes up to 5th Dec (01.08.01.57) & fix issues with 1.8 BBL merge (#2994)

* FIX: mistake in filament vendor

jira:[NEW]

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I3af712e417379d8b98ae18feebffe465bfa1e72d

* NEW:set customized materials for the A1 P1 series

Change-Id: I9c34f62867c074bf9ebb315013e5e40526e0eac7

* FIX: the flow rate ratio crashes after load model

for third party printer
Jira: 5244

Change-Id: Idd829c9d99eeba9d180653ac8de4e51b9a0d6370

* FIX: The maximum value is not printed in PA line mode

Jira: 5046  4951
Change-Id: Ic81f9a75ce7f088fe950fdde283ff5c942cd6e83

* ENH:add preset check for sending files

Change-Id: Ia3313d281b5ce91e277b380498014ffdac5debd3

* FIX: locale loading user preset

Change-Id: I88521e4b10cb802d9253eb79a6b78b3286f15a33
Jira: STUDIO-5436

* FIX: sync user preset notify crash on exit

Change-Id: I88f5dbcbd487293ea847ea6092efb61744399541
Jira: STUDIO-5413

* ci: update build version to 01.08.01.56

Change-Id: Id7a9718d5f920da50d52fd2ef220acf5d3270d3c

* GUI/Field: Fix crash in color picker init (#2220)

wxButton->GetBitmap() may return an invalid wxBitmap.
Guard against this.

* FIX: custom filament preset display in cali history issue

jira: new

Change-Id: I4145450a231adff542ab1a7428b3479f4074e06a

* FIX: meshboolean transform result issue

jira: STUDIO-5425

Change-Id: If66fe909ce4458c1b3192e4fd8a3d758fe7c7eaa

* FIX: fix combobox and delete btn in filament setting enabled

Jira: XXXX

Change-Id: I8b659bd77ceb97c8cea9d3e5e931f4ea50822721

* ci: update build version to 01.08.01.57

Change-Id: I7a6f5439863ca81275ae8b80f1b5cf0bb36c4c0f

* Fix crashing of flow rate calibration post BS 1.8 merge

* Revert Staggered Inner Seam logic from Prusa slicer that was overwritten by the BS1.8 update

---------

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Co-authored-by: xun.zhang <xun.zhang@bambulab.com>
Co-authored-by: hu.wang <hu.wang@bambulab.com>
Co-authored-by: zhimin.zeng <zhimin.zeng@bambulab.com>
Co-authored-by: tao wang <tao.wang@bambulab.com>
Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com>
Co-authored-by: gerrit <gerrit@bambulab.com>
Co-authored-by: mia <652892+mia-0@users.noreply.github.com>
Co-authored-by: liz.li <liz.li@bambulab.com>
Co-authored-by: maosheng.wei <maosheng.wei@bambulab.com>
This commit is contained in:
Ioannis Giannakas 2023-12-08 10:27:24 +00:00 committed by GitHub
parent 7cfa4f3bcd
commit 1c6f2c6817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 1537 additions and 1261 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "Bambulab", "name": "Bambulab",
"url": "http://www.bambulab.com/Parameters/vendor/BBL.json", "url": "http://www.bambulab.com/Parameters/vendor/BBL.json",
"version": "01.08.00.06", "version": "01.08.00.07",
"force_update": "0", "force_update": "0",
"description": "the initial version of BBL configurations", "description": "the initial version of BBL configurations",
"machine_model_list": [ "machine_model_list": [

View file

@ -25,5 +25,8 @@
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"18" "18"
],
"filament_vendor": [
"Bambu Lab"
] ]
} }

View file

@ -39,7 +39,7 @@
"PETG-CF" "PETG-CF"
], ],
"filament_vendor": [ "filament_vendor": [
"Bambu Lab" "Generic"
], ],
"hot_plate_temp": [ "hot_plate_temp": [
"70" "70"

View file

@ -5,9 +5,6 @@
"from": "system", "from": "system",
"setting_id": "GFSN96_00", "setting_id": "GFSN96_00",
"instantiation": "true", "instantiation": "true",
"filament_vendor": [
"Bambu Lab"
],
"compatible_printers": [ "compatible_printers": [
"Bambu Lab X1 Carbon 0.4 nozzle", "Bambu Lab X1 Carbon 0.4 nozzle",
"Bambu Lab X1 0.4 nozzle", "Bambu Lab X1 0.4 nozzle",

View file

@ -8,9 +8,6 @@
"chamber_temperatures": [ "chamber_temperatures": [
"60" "60"
], ],
"filament_vendor": [
"Bambu Lab"
],
"compatible_printers": [ "compatible_printers": [
"Bambu Lab X1E 0.6 nozzle", "Bambu Lab X1E 0.6 nozzle",
"Bambu Lab X1E 0.8 nozzle", "Bambu Lab X1E 0.8 nozzle",

View file

@ -737,6 +737,8 @@ void ConfigBase::setenv_() const
//BBS //BBS
ConfigSubstitutions ConfigBase::load_string_map(std::map<std::string, std::string>& key_values, ForwardCompatibilitySubstitutionRule compatibility_rule) ConfigSubstitutions ConfigBase::load_string_map(std::map<std::string, std::string>& key_values, ForwardCompatibilitySubstitutionRule compatibility_rule)
{ {
CNumericLocalesSetter locales_setter;
ConfigSubstitutionContext substitutions_ctxt(compatibility_rule); ConfigSubstitutionContext substitutions_ctxt(compatibility_rule);
std::map<std::string, std::string>::iterator it; std::map<std::string, std::string>::iterator it;
for (it = key_values.begin(); it != key_values.end(); it++) { for (it = key_values.begin(); it != key_values.end(); it++) {

View file

@ -2410,8 +2410,7 @@ this->placeholder_parser().set("z_offset", new ConfigOptionFloat(m_config.z_offs
pa_test.set_speed(fast_speed, slow_speed); pa_test.set_speed(fast_speed, slow_speed);
pa_test.draw_numbers() = print.calib_params().print_numbers; pa_test.draw_numbers() = print.calib_params().print_numbers;
gcode += pa_test.generate_test(params.start, params.step, std::llround(std::ceil((params.end - params.start) / params.step)) + 1);
gcode += pa_test.generate_test(params.start, params.step, std::llround(std::ceil((params.end - params.start) / params.step)));
file.write(gcode); file.write(gcode);
} else { } else {

File diff suppressed because it is too large Load diff

View file

@ -27,17 +27,6 @@ class Grid;
namespace SeamPlacerImpl { namespace SeamPlacerImpl {
// ************ FOR BACKPORT COMPATIBILITY ONLY ***************
// Angle from v1 to v2, returning double atan2(y, x) normalized to <-PI, PI>.
template<typename Derived, typename Derived2> inline double angle(const Eigen::MatrixBase<Derived> &v1, const Eigen::MatrixBase<Derived2> &v2)
{
static_assert(Derived::IsVectorAtCompileTime && int(Derived::SizeAtCompileTime) == 2, "angle(): first parameter is not a 2D vector");
static_assert(Derived2::IsVectorAtCompileTime && int(Derived2::SizeAtCompileTime) == 2, "angle(): second parameter is not a 2D vector");
auto v1d = v1.template cast<double>();
auto v2d = v2.template cast<double>();
return atan2(cross2(v1d, v2d), v1d.dot(v2d));
}
// ***************************
struct GlobalModelInfo; struct GlobalModelInfo;
struct SeamComparator; struct SeamComparator;
@ -49,8 +38,7 @@ enum class EnforcedBlockedSeamPoint {
}; };
// struct representing single perimeter loop // struct representing single perimeter loop
struct Perimeter struct Perimeter {
{
size_t start_index{}; size_t start_index{};
size_t end_index{}; //inclusive! size_t end_index{}; //inclusive!
size_t seam_index{}; size_t seam_index{};
@ -66,11 +54,13 @@ struct Perimeter
//Struct over which all processing of perimeters is done. For each perimeter point, its respective candidate is created, //Struct over which all processing of perimeters is done. For each perimeter point, its respective candidate is created,
// then all the needed attributes are computed and finally, for each perimeter one point is chosen as seam. // then all the needed attributes are computed and finally, for each perimeter one point is chosen as seam.
// This seam position can be then further aligned // This seam position can be then further aligned
struct SeamCandidate struct SeamCandidate {
{ SeamCandidate(const Vec3f &pos, Perimeter &perimeter,
SeamCandidate(const Vec3f &pos, Perimeter &perimeter, float local_ccw_angle, EnforcedBlockedSeamPoint type) float local_ccw_angle,
: position(pos), perimeter(perimeter), visibility(0.0f), overhang(0.0f), embedded_distance(0.0f), local_ccw_angle(local_ccw_angle), type(type), central_enforcer(false) EnforcedBlockedSeamPoint type) :
{} position(pos), perimeter(perimeter), visibility(0.0f), overhang(0.0f), embedded_distance(0.0f), local_ccw_angle(
local_ccw_angle), type(type), central_enforcer(false) {
}
const Vec3f position; const Vec3f position;
// pointer to Perimeter loop of this point. It is shared across all points of the loop // pointer to Perimeter loop of this point. It is shared across all points of the loop
Perimeter &perimeter; Perimeter &perimeter;
@ -84,11 +74,14 @@ struct SeamCandidate
bool central_enforcer; //marks this candidate as central point of enforced segment on the perimeter - important for alignment bool central_enforcer; //marks this candidate as central point of enforced segment on the perimeter - important for alignment
}; };
struct SeamCandidateCoordinateFunctor struct SeamCandidateCoordinateFunctor {
{ SeamCandidateCoordinateFunctor(const std::vector<SeamCandidate> &seam_candidates) :
SeamCandidateCoordinateFunctor(const std::vector<SeamCandidate> &seam_candidates) : seam_candidates(seam_candidates) {} seam_candidates(seam_candidates) {
}
const std::vector<SeamCandidate> &seam_candidates; const std::vector<SeamCandidate> &seam_candidates;
float operator()(size_t index, size_t dim) const { return seam_candidates[index].position[dim]; } float operator()(size_t index, size_t dim) const {
return seam_candidates[index].position[dim];
}
}; };
} // namespace SeamPlacerImpl } // namespace SeamPlacerImpl
@ -107,11 +100,13 @@ struct PrintObjectSeamData
// Map of PrintObjects (PO) -> vector of layers of PO -> unique_ptr to KD // Map of PrintObjects (PO) -> vector of layers of PO -> unique_ptr to KD
// tree of all points of the given layer // tree of all points of the given layer
void clear() { layers.clear(); } void clear()
{
layers.clear();
}
}; };
class SeamPlacer class SeamPlacer {
{
public: public:
// Number of samples generated on the mesh. There are sqr_rays_per_sample_point*sqr_rays_per_sample_point rays casted from each samples // Number of samples generated on the mesh. There are sqr_rays_per_sample_point*sqr_rays_per_sample_point rays casted from each samples
static constexpr size_t raycasting_visibility_samples_count = 30000; static constexpr size_t raycasting_visibility_samples_count = 30000;
@ -122,8 +117,7 @@ public:
// snapping angle - angles larger than this value will be snapped to during seam painting // snapping angle - angles larger than this value will be snapped to during seam painting
static constexpr float sharp_angle_snapping_threshold = 55.0f * float(PI) / 180.0f; static constexpr float sharp_angle_snapping_threshold = 55.0f * float(PI) / 180.0f;
// overhang angle for seam placement that still yields good results, in degrees, measured from vertical direction // overhang angle for seam placement that still yields good results, in degrees, measured from vertical direction
//BBS static constexpr float overhang_angle_threshold = 50.0f * float(PI) / 180.0f;
static constexpr float overhang_angle_threshold = 45.0f * float(PI) / 180.0f;
// determines angle importance compared to visibility ( neutral value is 1.0f. ) // determines angle importance compared to visibility ( neutral value is 1.0f. )
static constexpr float angle_importance_aligned = 0.6f; static constexpr float angle_importance_aligned = 0.6f;
@ -150,15 +144,18 @@ public:
void place_seam(const Layer *layer, ExtrusionLoop &loop, bool external_first, const Point &last_pos) const; void place_seam(const Layer *layer, ExtrusionLoop &loop, bool external_first, const Point &last_pos) const;
private: private:
void gather_seam_candidates(const PrintObject *po, const SeamPlacerImpl::GlobalModelInfo &global_model_info, const SeamPosition configured_seam_preference); void gather_seam_candidates(const PrintObject *po, const SeamPlacerImpl::GlobalModelInfo &global_model_info);
void calculate_candidates_visibility(const PrintObject *po, const SeamPlacerImpl::GlobalModelInfo &global_model_info); void calculate_candidates_visibility(const PrintObject *po,
const SeamPlacerImpl::GlobalModelInfo &global_model_info);
void calculate_overhangs_and_layer_embedding(const PrintObject *po); void calculate_overhangs_and_layer_embedding(const PrintObject *po);
void align_seam_points(const PrintObject *po, const SeamPlacerImpl::SeamComparator &comparator); void align_seam_points(const PrintObject *po, const SeamPlacerImpl::SeamComparator &comparator);
std::vector<std::pair<size_t, size_t>> find_seam_string(const PrintObject *po, std::pair<size_t, size_t> start_seam, const SeamPlacerImpl::SeamComparator &comparator) const; std::vector<std::pair<size_t, size_t>> find_seam_string(const PrintObject *po,
std::optional<std::pair<size_t, size_t>> find_next_seam_in_layer(const std::vector<PrintObjectSeamData::LayerSeams> &layers, std::pair<size_t, size_t> start_seam,
const SeamPlacerImpl::SeamComparator &comparator) const;
std::optional<std::pair<size_t, size_t>> find_next_seam_in_layer(
const std::vector<PrintObjectSeamData::LayerSeams> &layers,
const Vec3f& projected_position, const Vec3f& projected_position,
const size_t layer_idx, const size_t layer_idx, const float max_distance,
const float max_distance,
const SeamPlacerImpl::SeamComparator &comparator) const; const SeamPlacerImpl::SeamComparator &comparator) const;
}; };

View file

@ -1288,6 +1288,7 @@ int PresetCollection::get_differed_values_to_update(Preset& preset, std::map<std
key_values.erase(BBL_JSON_KEY_BASE_ID); key_values.erase(BBL_JSON_KEY_BASE_ID);
if (get_preset_base(preset) == &preset && !preset.filament_id.empty()) { if (get_preset_base(preset) == &preset && !preset.filament_id.empty()) {
key_values[BBL_JSON_KEY_FILAMENT_ID] = preset.filament_id; key_values[BBL_JSON_KEY_FILAMENT_ID] = preset.filament_id;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " uploading user preset name is: " << preset.name << "and create filament id is: " << preset.filament_id;
} }
} }
key_values[BBL_JSON_KEY_UPDATE_TIME] = std::to_string(preset.updated_time); key_values[BBL_JSON_KEY_UPDATE_TIME] = std::to_string(preset.updated_time);

View file

@ -26,17 +26,29 @@ static wxString get_preset_name_by_filament_id(std::string filament_id)
if (filament_id.compare(it->filament_id) == 0) { if (filament_id.compare(it->filament_id) == 0) {
auto preset_parent = collection->get_preset_parent(*it); auto preset_parent = collection->get_preset_parent(*it);
if (preset_parent) { if (preset_parent) {
if (preset_parent->is_system) {
if (!preset_parent->alias.empty()) if (!preset_parent->alias.empty())
preset_name = from_u8(preset_parent->alias); preset_name = from_u8(preset_parent->alias);
else else
preset_name = from_u8(preset_parent->name); preset_name = from_u8(preset_parent->name);
} }
else { // is custom created filament
std::string name_str = preset_parent->name;
preset_name = from_u8(name_str.substr(0, name_str.find(" @")));
}
}
else { else {
if (it->is_system) {
if (!it->alias.empty()) if (!it->alias.empty())
preset_name = from_u8(it->alias); preset_name = from_u8(it->alias);
else else
preset_name = from_u8(it->name); preset_name = from_u8(it->name);
} }
else { // is custom created filament
std::string name_str = it->name;
preset_name = from_u8(name_str.substr(0, name_str.find(" @")));
}
}
} }
} }
return preset_name; return preset_name;

View file

@ -451,6 +451,7 @@ static std::string get_filament_id(std::string vendor_typr_serial)
user_filament_id = "P" + calculate_md5(vendor_typr_serial + get_curr_time()).substr(0, 7); user_filament_id = "P" + calculate_md5(vendor_typr_serial + get_curr_time()).substr(0, 7);
} }
} }
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " filament name is: " << vendor_typr_serial << "and create filament id is: " << user_filament_id;
return user_filament_id; return user_filament_id;
} }
@ -1483,8 +1484,8 @@ wxBoxSizer *CreatePrinterPresetDialog::create_step_switch_item()
horizontal_sizer->Add(divider_line, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3)); horizontal_sizer->Add(divider_line, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3));
m_step_2 = new wxStaticBitmap(step_switch_panel, wxID_ANY, create_scaled_bitmap("step_2_ready", nullptr, FromDIP(20)), wxDefaultPosition, wxDefaultSize); m_step_2 = new wxStaticBitmap(step_switch_panel, wxID_ANY, create_scaled_bitmap("step_2_ready", nullptr, FromDIP(20)), wxDefaultPosition, wxDefaultSize);
horizontal_sizer->Add(m_step_2, 0, wxEXPAND | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3)); horizontal_sizer->Add(m_step_2, 0, wxEXPAND | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3));
wxStaticText *static_improt_presets_text = new wxStaticText(step_switch_panel, wxID_ANY, _L("Import Preset"), wxDefaultPosition, wxDefaultSize); wxStaticText *static_import_presets_text = new wxStaticText(step_switch_panel, wxID_ANY, _L("Import Preset"), wxDefaultPosition, wxDefaultSize);
horizontal_sizer->Add(static_improt_presets_text, 0, wxEXPAND | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3)); horizontal_sizer->Add(static_import_presets_text, 0, wxEXPAND | wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3));
horizontal_sizer->Add(0, 0, 1, wxEXPAND, 0); horizontal_sizer->Add(0, 0, 1, wxEXPAND, 0);
step_switch_panel->SetSizer(horizontal_sizer); step_switch_panel->SetSizer(horizontal_sizer);

View file

@ -4802,6 +4802,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
if (total_count == 0) { if (total_count == 0) {
CallAfter([this] { CallAfter([this] {
if (!m_is_closing)
plater()->get_notification_manager()->close_notification_of_type(NotificationType::BBLUserPresetExceedLimit); plater()->get_notification_manager()->close_notification_of_type(NotificationType::BBLUserPresetExceedLimit);
}); });
} }

View file

@ -68,13 +68,13 @@ bool GLGizmoMeshBoolean::gizmo_event(SLAGizmoEventType action, const Vec2d& mous
return true; return true;
if (get_selecting_state() == MeshBooleanSelectingState::SelectTool) { if (get_selecting_state() == MeshBooleanSelectingState::SelectTool) {
m_tool.trafo = trafo_matrices[closest_hit_mesh_id]; m_tool.trafo = mo->volumes[closest_hit_mesh_id]->get_matrix();
m_tool.volume_idx = closest_hit_mesh_id; m_tool.volume_idx = closest_hit_mesh_id;
set_tool_volume(mo->volumes[closest_hit_mesh_id]); set_tool_volume(mo->volumes[closest_hit_mesh_id]);
return true; return true;
} }
if (get_selecting_state() == MeshBooleanSelectingState::SelectSource) { if (get_selecting_state() == MeshBooleanSelectingState::SelectSource) {
m_src.trafo = trafo_matrices[closest_hit_mesh_id]; m_src.trafo = mo->volumes[closest_hit_mesh_id]->get_matrix();
m_src.volume_idx = closest_hit_mesh_id; m_src.volume_idx = closest_hit_mesh_id;
set_src_volume(mo->volumes[closest_hit_mesh_id]); set_src_volume(mo->volumes[closest_hit_mesh_id]);
m_selecting_state = MeshBooleanSelectingState::SelectTool; m_selecting_state = MeshBooleanSelectingState::SelectTool;

View file

@ -65,7 +65,7 @@ ParamsDialog::ParamsDialog(wxWindow * parent)
//wxGetApp().UpdateDlgDarkUI(this); //wxGetApp().UpdateDlgDarkUI(this);
} }
void ParamsDialog::Popup(bool just_edit) void ParamsDialog::Popup()
{ {
wxGetApp().UpdateDlgDarkUI(this); wxGetApp().UpdateDlgDarkUI(this);
#ifdef __WIN32__ #ifdef __WIN32__
@ -73,6 +73,8 @@ void ParamsDialog::Popup(bool just_edit)
#endif #endif
Center(); Center();
if (m_panel && m_panel->get_current_tab()) { if (m_panel && m_panel->get_current_tab()) {
bool just_edit = false;
if (!m_editing_filament_id.empty()) just_edit = true;
dynamic_cast<Tab *>(m_panel->get_current_tab())->set_just_edit(just_edit); dynamic_cast<Tab *>(m_panel->get_current_tab())->set_just_edit(just_edit);
} }
Show(); Show();

View file

@ -29,7 +29,7 @@ public:
ParamsPanel * panel() { return m_panel; } ParamsPanel * panel() { return m_panel; }
void Popup(bool just_edit = false); void Popup();
void set_editing_filament_id(std::string id) { m_editing_filament_id = id; } void set_editing_filament_id(std::string id) { m_editing_filament_id = id; }

View file

@ -7808,7 +7808,7 @@ void Plater::priv::on_modify_filament(SimpleEvent &evt)
update_ui_from_settings(); update_ui_from_settings();
sidebar->update_all_preset_comboboxes(); sidebar->update_all_preset_comboboxes();
if (wxID_EDIT == res) { if (wxID_EDIT == res) {
wxGetApp().params_dialog()->Popup(true); wxGetApp().params_dialog()->Popup();
} }
} }
@ -9022,7 +9022,8 @@ void Plater::calib_flowrate(int pass) {
if (pass != 1 && pass != 2) if (pass != 1 && pass != 2)
return; return;
const auto calib_name = wxString::Format(L"Flowrate Test - Pass%d", pass); const auto calib_name = wxString::Format(L"Flowrate Test - Pass%d", pass);
new_project(false, false, calib_name); if (new_project(false, false, calib_name) == wxID_CANCEL)
return;
wxGetApp().mainframe->select_tab(size_t(MainFrame::tp3DEditor)); wxGetApp().mainframe->select_tab(size_t(MainFrame::tp3DEditor));
@ -9069,7 +9070,7 @@ void Plater::calib_flowrate(int pass) {
_obj->config.set_key_value("wall_loops", new ConfigOptionInt(3)); _obj->config.set_key_value("wall_loops", new ConfigOptionInt(3));
_obj->config.set_key_value("only_one_wall_top", new ConfigOptionBool(true)); _obj->config.set_key_value("only_one_wall_top", new ConfigOptionBool(true));
_obj->config.set_key_value("sparse_infill_density", new ConfigOptionPercent(35)); _obj->config.set_key_value("sparse_infill_density", new ConfigOptionPercent(35));
_obj->config.set_key_value("min_width_top_surface", new ConfigOptionPercent(100)); _obj->config.set_key_value("min_width_top_surface", new ConfigOptionFloatOrPercent(100,true));
_obj->config.set_key_value("bottom_shell_layers", new ConfigOptionInt(1)); _obj->config.set_key_value("bottom_shell_layers", new ConfigOptionInt(1));
_obj->config.set_key_value("top_shell_layers", new ConfigOptionInt(5)); _obj->config.set_key_value("top_shell_layers", new ConfigOptionInt(5));
_obj->config.set_key_value("detect_thin_wall", new ConfigOptionBool(true)); _obj->config.set_key_value("detect_thin_wall", new ConfigOptionBool(true));

View file

@ -1058,7 +1058,11 @@ void SendToPrinterDialog::update_show_status()
reset_timeout(); reset_timeout();
// reading done // reading done
if (obj_->is_in_upgrading()) { if (is_blocking_printing(obj_)) {
show_status(PrintDialogStatus::PrintStatusUnsupportedPrinter);
return;
}
else if (obj_->is_in_upgrading()) {
show_status(PrintDialogStatus::PrintStatusInUpgrading); show_status(PrintDialogStatus::PrintStatusInUpgrading);
return; return;
} }
@ -1087,6 +1091,26 @@ void SendToPrinterDialog::update_show_status()
} }
} }
bool SendToPrinterDialog::is_blocking_printing(MachineObject* obj_)
{
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
if (!dev) return true;
PresetBundle* preset_bundle = wxGetApp().preset_bundle;
auto source_model = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
auto target_model = obj_->printer_type;
if (source_model != target_model) {
std::vector<std::string> compatible_machine = dev->get_compatible_machine(target_model);
vector<std::string>::iterator it = find(compatible_machine.begin(), compatible_machine.end(), source_model);
if (it == compatible_machine.end()) {
return true;
}
}
return false;
}
void SendToPrinterDialog::Enable_Refresh_Button(bool en) void SendToPrinterDialog::Enable_Refresh_Button(bool en)
{ {
if (!en) { if (!en) {
@ -1167,6 +1191,12 @@ void SendToPrinterDialog::show_status(PrintDialogStatus status, std::vector<wxSt
Enable_Send_Button(false); Enable_Send_Button(false);
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
} }
else if (status == PrintDialogStatus::PrintStatusUnsupportedPrinter) {
wxString msg_text = _L("The selected printer is incompatible with the chosen printer presets.");
update_print_status_msg(msg_text, true, true);
Enable_Send_Button(false);
Enable_Refresh_Button(true);
}
else if (status == PrintDialogStatus::PrintStatusRefreshingMachineList) { else if (status == PrintDialogStatus::PrintStatusRefreshingMachineList) {
update_print_status_msg(wxEmptyString, false, true); update_print_status_msg(wxEmptyString, false, true);
Enable_Send_Button(false); Enable_Send_Button(false);

View file

@ -130,6 +130,7 @@ public:
void reset_timeout(); void reset_timeout();
void update_user_printer(); void update_user_printer();
void update_show_status(); void update_show_status();
bool is_blocking_printing(MachineObject* obj_);
void prepare(int print_plate_idx); void prepare(int print_plate_idx);
void check_focus(wxWindow* window); void check_focus(wxWindow* window);
void check_fcous_state(wxWindow* window); void check_fcous_state(wxWindow* window);

View file

@ -924,7 +924,7 @@ void CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
if (params.mode == CalibMode::Calib_PA_Line) { if (params.mode == CalibMode::Calib_PA_Line) {
double space_y = 3.5; double space_y = 3.5;
int max_line_nums = int(plate_size[1] - 10) / space_y; int max_line_nums = int(plate_size[1] - 10) / space_y;
int count = std::llround(std::ceil((params.end - params.start) / params.step)); int count = std::llround(std::ceil((params.end - params.start) / params.step)) + 1;
if (count > max_line_nums) { if (count > max_line_nums) {
error_message = _L("Unable to calibrate: maybe because the set calibration value range is too large, or the step is too small"); error_message = _L("Unable to calibrate: maybe because the set calibration value range is too large, or the step is too small");
return; return;

View file

@ -18,4 +18,4 @@ set(ORCA_VERSION_MINOR ${CMAKE_MATCH_2})
set(ORCA_VERSION_PATCH ${CMAKE_MATCH_3}) set(ORCA_VERSION_PATCH ${CMAKE_MATCH_3})
# The build_version should start from 50 in master branch # The build_version should start from 50 in master branch
set(SLIC3R_VERSION "01.08.01.53") set(SLIC3R_VERSION "01.08.01.57")