NEW: support to edit bed stl and texture for third-party printers

Jira:STUDIO-4209
some codes are referenced form PrusaSlicer,thanks enricoturri1966 for the original commit

commit cf380fb456
Author: enricoturri1966 <enricoturri@seznam.cz>
Date:   Tue Sep 21 13:51:57 2021 +0200
    Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Out of bed detection for circular printbeds
...

Change-Id: I1b1e2ff045286566d4fb9f2d8ad4faa1f135f60c
(cherry picked from commit 284bca9f1f4cdb9eb405e8205cd50666a2b0b2a0)
This commit is contained in:
zhou.xu
2023-09-14 10:41:47 +08:00
committed by Lane.Wei
parent 384b0793ff
commit 487c86e915
11 changed files with 319 additions and 228 deletions

View File

@@ -233,26 +233,26 @@ void OptionsGroup::activate_line(Line& line)
m_use_custom_ctrl_as_parent = false;
if (line.full_width && (
line.widget != nullptr ||
!line.get_extra_widgets().empty())
) {
// BBS: new layout
const auto h_sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(h_sizer, 1, wxEXPAND | wxALL, wxOSX ? 0 : 15);
if (line.full_width && (
line.widget != nullptr ||
!line.get_extra_widgets().empty())
) {
// BBS: new layout
const auto h_sizer = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(h_sizer, 1, wxEXPAND | wxALL, wxOSX ? 0 : 15);
if (line.widget != nullptr) {
// description lines
h_sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxLEFT, titleWidth * wxGetApp().em_unit());
// description lines
sizer->Add(line.widget(this->ctrl_parent()), 0, wxEXPAND | wxALL, wxOSX ? 0 : 15);
return;
}
if (!line.get_extra_widgets().empty()) {
if (!line.get_extra_widgets().empty()) {
bool is_first_item = true;
for (auto extra_widget : line.get_extra_widgets()) {
h_sizer->Add(extra_widget(this->ctrl_parent()), is_first_item ? 1 : 0, wxLEFT, titleWidth * wxGetApp().em_unit());
is_first_item = false;
}
return;
}
for (auto extra_widget : line.get_extra_widgets()) {
h_sizer->Add(extra_widget(this->ctrl_parent()), is_first_item ? 1 : 0, wxLEFT, titleWidth * wxGetApp().em_unit());
is_first_item = false;
}
return;
}
}
auto option_set = line.get_options();
@@ -1038,7 +1038,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
break;
case coPoints:
if (opt_key == "printable_area")
ret = config.option<ConfigOptionPoints>(opt_key)->values;
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "bed_exclude_area")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "thumbnail_size")
@@ -1153,7 +1153,7 @@ boost::any ConfigOptionsGroup::get_config_value2(const DynamicPrintConfig& confi
break;
case coPoints:
if (opt_key == "printable_area")
ret = config.option<ConfigOptionPoints>(opt_key)->values;
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "bed_exclude_area")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "thumbnail_size")