mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
Merge branch 'main' into feature/show-extruder-values-on-filament-overrides-tab
This commit is contained in:
commit
09672ea90c
867 changed files with 49736 additions and 27090 deletions
|
@ -423,7 +423,7 @@ void GLVolume::render()
|
|||
}
|
||||
|
||||
//BBS: add outline related logic
|
||||
void GLVolume::render_with_outline(const Transform3d &view_model_matrix)
|
||||
void GLVolume::render_with_outline(const GUI::Size& cnv_size)
|
||||
{
|
||||
if (!is_active)
|
||||
return;
|
||||
|
@ -435,37 +435,79 @@ void GLVolume::render_with_outline(const Transform3d &view_model_matrix)
|
|||
ModelObjectPtrs &model_objects = GUI::wxGetApp().model().objects;
|
||||
std::vector<ColorRGBA> colors = get_extruders_colors();
|
||||
|
||||
glEnable(GL_STENCIL_TEST);
|
||||
glStencilMask(0xFF);
|
||||
glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilFunc(GL_ALWAYS, 0xff, 0xFF);
|
||||
const GUI::OpenGLManager::EFramebufferType framebuffers_type = GUI::OpenGLManager::get_framebuffers_type();
|
||||
if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Unknown) {
|
||||
// No supported, degrade to normal rendering
|
||||
simple_render(shader, model_objects, colors);
|
||||
return;
|
||||
}
|
||||
|
||||
simple_render(shader, model_objects, colors);
|
||||
// 1st. render pass, render the model into a separate render target that has only depth buffer
|
||||
GLuint depth_fbo = 0;
|
||||
GLuint depth_tex = 0;
|
||||
if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Arb) {
|
||||
glsafe(::glGenFramebuffers(1, &depth_fbo));
|
||||
glsafe(::glBindFramebuffer(GL_FRAMEBUFFER, depth_fbo));
|
||||
|
||||
// 2nd. render pass: now draw slightly scaled versions of the objects, this time disabling stencil writing.
|
||||
// Because the stencil buffer is now filled with several 1s. The parts of the buffer that are 1 are not drawn, thus only drawing
|
||||
// the objects' size differences, making it look like borders.
|
||||
glStencilFunc(GL_NOTEQUAL, 0xff, 0xFF);
|
||||
glStencilMask(0x00);
|
||||
float scale = 1.02f;
|
||||
ColorRGBA body_color = { 1.0f, 1.0f, 1.0f, 1.0f }; //red
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glsafe(::glGenTextures(1, &depth_tex));
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, depth_tex));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
|
||||
glsafe(::glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, cnv_size.get_width(), cnv_size.get_height(), 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr));
|
||||
|
||||
model.set_color(body_color);
|
||||
shader->set_uniform("is_outline", true);
|
||||
glsafe(::glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depth_tex, 0));
|
||||
} else {
|
||||
glsafe(::glGenFramebuffersEXT(1, &depth_fbo));
|
||||
glsafe(::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, depth_fbo));
|
||||
|
||||
Transform3d matrix = view_model_matrix;
|
||||
matrix.scale(scale);
|
||||
shader->set_uniform("view_model_matrix", matrix);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glsafe(::glGenTextures(1, &depth_tex));
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, depth_tex));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
|
||||
glsafe(::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
|
||||
glsafe(::glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32F, cnv_size.get_width(), cnv_size.get_height(), 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr));
|
||||
|
||||
glsafe(::glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, depth_tex, 0));
|
||||
}
|
||||
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
|
||||
if (tverts_range == std::make_pair<size_t, size_t>(0, -1))
|
||||
model.render();
|
||||
else
|
||||
model.render(this->tverts_range);
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
|
||||
|
||||
shader->set_uniform("view_model_matrix", view_model_matrix);
|
||||
// 2nd. render pass, just a normal render with the depth buffer passed as a texture
|
||||
if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Arb) {
|
||||
glsafe(::glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
} else if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Ext) {
|
||||
glsafe(::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0));
|
||||
}
|
||||
shader->set_uniform("is_outline", true);
|
||||
shader->set_uniform("screen_size", Vec2f{cnv_size.get_width(), cnv_size.get_height()});
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, depth_tex));
|
||||
shader->set_uniform("depth_tex", 0);
|
||||
simple_render(shader, model_objects, colors);
|
||||
|
||||
// Some clean up to do
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
|
||||
shader->set_uniform("is_outline", false);
|
||||
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Arb) {
|
||||
glsafe(::glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
if (depth_fbo != 0)
|
||||
glsafe(::glDeleteFramebuffers(1, &depth_fbo));
|
||||
} else if (framebuffers_type == GUI::OpenGLManager::EFramebufferType::Ext) {
|
||||
glsafe(::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0));
|
||||
if (depth_fbo != 0)
|
||||
glsafe(::glDeleteFramebuffersEXT(1, &depth_fbo));
|
||||
}
|
||||
if (depth_tex != 0)
|
||||
glsafe(::glDeleteTextures(1, &depth_tex));
|
||||
}
|
||||
|
||||
//BBS add render for simple case
|
||||
|
@ -847,8 +889,8 @@ int GLVolumeCollection::get_selection_support_threshold_angle(bool &enable_suppo
|
|||
}
|
||||
|
||||
//BBS: add outline drawing logic
|
||||
void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix,
|
||||
std::function<bool(const GLVolume&)> filter_func, bool with_outline) const
|
||||
void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix, const GUI::Size& cnv_size,
|
||||
std::function<bool(const GLVolume&)> filter_func) const
|
||||
{
|
||||
GLVolumeWithIdAndZList to_render = volumes_to_render(volumes, type, view_matrix, filter_func);
|
||||
if (to_render.empty())
|
||||
|
@ -953,9 +995,9 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
|||
const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * model_matrix.matrix().block(0, 0, 3, 3).inverse().transpose();
|
||||
shader->set_uniform("view_normal_matrix", view_normal_matrix);
|
||||
//BBS: add outline related logic
|
||||
//if (with_outline && volume.first->selected)
|
||||
// volume.first->render_with_outline(view_matrix * model_matrix);
|
||||
//else
|
||||
if (volume.first->selected && GUI::wxGetApp().show_outline())
|
||||
volume.first->render_with_outline(cnv_size);
|
||||
else
|
||||
volume.first->render();
|
||||
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
|
|
|
@ -39,6 +39,10 @@ extern Slic3r::ColorRGBA adjust_color_for_rendering(const Slic3r::C
|
|||
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
class Size;
|
||||
}
|
||||
|
||||
class SLAPrintObject;
|
||||
enum SLAPrintObjectStep : unsigned int;
|
||||
class BuildVolume;
|
||||
|
@ -322,7 +326,7 @@ public:
|
|||
virtual void render();
|
||||
|
||||
//BBS: add outline related logic and add virtual specifier
|
||||
virtual void render_with_outline(const Transform3d &view_model_matrix);
|
||||
virtual void render_with_outline(const GUI::Size& cnv_size);
|
||||
|
||||
//BBS: add simple render function for thumbnail
|
||||
void simple_render(GLShaderProgram* shader, ModelObjectPtrs& model_objects, std::vector<ColorRGBA>& extruder_colors, bool ban_light =false);
|
||||
|
@ -355,7 +359,7 @@ class GLWipeTowerVolume : public GLVolume {
|
|||
public:
|
||||
GLWipeTowerVolume(const std::vector<ColorRGBA>& colors);
|
||||
void render() override;
|
||||
void render_with_outline(const Transform3d &view_model_matrix) override { render(); }
|
||||
void render_with_outline(const GUI::Size& cnv_size) override { render(); }
|
||||
|
||||
std::vector<GUI::GLModel> model_per_colors;
|
||||
bool IsTransparent();
|
||||
|
@ -465,8 +469,8 @@ public:
|
|||
int get_selection_support_threshold_angle(bool&) const;
|
||||
// Render the volumes by OpenGL.
|
||||
//BBS: add outline drawing logic
|
||||
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix,
|
||||
std::function<bool(const GLVolume &)> filter_func = std::function<bool(const GLVolume &)>(), bool with_outline = true) const;
|
||||
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix, const GUI::Size& cnv_size,
|
||||
std::function<bool(const GLVolume &)> filter_func = std::function<bool(const GLVolume &)>()) const;
|
||||
|
||||
// Clear the geometry
|
||||
void clear() { for (auto *v : volumes) delete v; volumes.clear(); }
|
||||
|
|
|
@ -357,7 +357,7 @@ void AMSMaterialsSetting::paintEvent(wxPaintEvent &evt)
|
|||
{
|
||||
auto size = GetSize();
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#000000")), 1, wxSOLID));
|
||||
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#000000")), 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawRectangle(0, 0, size.x, size.y);
|
||||
}
|
||||
|
|
|
@ -810,7 +810,7 @@ void BackgroundSlicingProcess::finalize_gcode()
|
|||
catch (...)
|
||||
{
|
||||
remove_post_processed_temp_file();
|
||||
throw Slic3r::ExportError(_u8L("Unknown error occured during exporting G-code."));
|
||||
throw Slic3r::ExportError(_u8L("Unknown error occurred during exporting G-code."));
|
||||
}
|
||||
switch (copy_ret_val) {
|
||||
case CopyFileResult::SUCCESS: break; // no error
|
||||
|
@ -830,7 +830,7 @@ void BackgroundSlicingProcess::finalize_gcode()
|
|||
throw Slic3r::ExportError(GUI::format(_L("Copying of the temporary G-code has finished but the exported code couldn't be opened during copy check. The output G-code is at %1%.tmp."), export_path));
|
||||
break;
|
||||
default:
|
||||
throw Slic3r::ExportError(_u8L("Unknown error occured during exporting G-code."));
|
||||
throw Slic3r::ExportError(_u8L("Unknown error occurred during exporting G-code."));
|
||||
BOOST_LOG_TRIVIAL(error) << "Unexpected fail code(" << (int)copy_ret_val << ") durring copy_file() to " << export_path << ".";
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -484,7 +484,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
|
|||
m_link_Terms_title->Wrap(FromDIP(450));
|
||||
m_link_Terms_title->SetForegroundColour(wxColour(0x009688));
|
||||
m_link_Terms_title->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
|
||||
wxString txt = _L("Thank you for purchasing a Bambu Lab device.Before using your Bambu Lab device, please read the termsand conditions.By clicking to agree to use your Bambu Lab device, you agree to abide by the Privacy Policyand Terms of Use(collectively, the \"Terms\"). If you do not comply with or agree to the Bambu Lab Privacy Policy, please do not use Bambu Lab equipment and services.");
|
||||
wxString txt = _L("Thank you for purchasing a Bambu Lab device.Before using your Bambu Lab device, please read the terms and conditions.By clicking to agree to use your Bambu Lab device, you agree to abide by the Privacy Policy and Terms of Use(collectively, the \"Terms\"). If you do not comply with or agree to the Bambu Lab Privacy Policy, please do not use Bambu Lab equipment and services.");
|
||||
ConfirmBeforeSendDialog confirm_dlg(this, wxID_ANY, _L("Terms and Conditions"), ConfirmBeforeSendDialog::ButtonStyle::ONLY_CONFIRM);
|
||||
confirm_dlg.update_text(txt);
|
||||
confirm_dlg.CenterOnParent();
|
||||
|
|
|
@ -327,7 +327,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
if (is_global_config)
|
||||
msg_text += "\n\n" + _(L("Change these settings automatically? \n"
|
||||
"Yes - Change ensure vertical shell thickness to Moderate and enable alternate extra wall\n"
|
||||
"No - Dont use alternate extra wall"));
|
||||
"No - Don't use alternate extra wall"));
|
||||
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "",
|
||||
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
|
||||
|
@ -449,17 +449,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
}
|
||||
}
|
||||
|
||||
if (config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject && config->opt_int("skirt_height") > 1 && config->opt_int("skirt_loops") > 0) {
|
||||
const wxString msg_text = _(L("While printing by Object, the extruder may collide skirt.\nThus, reset the skirt layer to 1 to avoid that."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
dialog.ShowModal();
|
||||
new_conf.set_key_value("skirt_height", new ConfigOptionInt(1));
|
||||
apply(config, &new_conf);
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
|
||||
if (config->opt_enum<SeamScarfType>("seam_slope_type") != SeamScarfType::None &&
|
||||
config->get_abs_value("seam_slope_start_height") >= layer_height) {
|
||||
const wxString msg_text = _(L("seam_slope_start_height need to be smaller than layer_height.\nReset to 0."));
|
||||
|
@ -527,6 +516,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
"minimum_sparse_infill_area", "sparse_infill_filament", "infill_anchor_max"})
|
||||
toggle_line(el, have_infill);
|
||||
|
||||
bool have_combined_infill = config->opt_bool("infill_combination") && have_infill;
|
||||
toggle_line("infill_combination_max_layer_height", have_combined_infill);
|
||||
|
||||
// Only allow configuration of open anchors if the anchoring is enabled.
|
||||
bool has_infill_anchors = have_infill && config->option<ConfigOptionFloatOrPercent>("infill_anchor_max")->value > 0;
|
||||
toggle_field("infill_anchor", has_infill_anchors);
|
||||
|
@ -569,7 +561,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
|
||||
bool have_skirt = config->opt_int("skirt_loops") > 0;
|
||||
toggle_field("skirt_height", have_skirt && config->opt_enum<DraftShield>("draft_shield") != dsEnabled);
|
||||
for (auto el : { "skirt_distance", "draft_shield"})
|
||||
for (auto el : {"skirt_type", "skirt_distance", "skirt_start_angle", "draft_shield"})
|
||||
toggle_field(el, have_skirt);
|
||||
|
||||
bool have_brim = (config->opt_enum<BrimType>("brim_type") != btNoBrim);
|
||||
|
@ -684,10 +676,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle",
|
||||
"wipe_tower_extra_spacing", "wipe_tower_max_purge_speed",
|
||||
"wipe_tower_bridging", "wipe_tower_extra_flow",
|
||||
"wipe_tower_no_sparse_layers",
|
||||
"single_extruder_multi_material_priming"})
|
||||
"wipe_tower_no_sparse_layers"})
|
||||
toggle_line(el, have_prime_tower && !is_BBL_Printer);
|
||||
|
||||
toggle_line("single_extruder_multi_material_priming", !bSEMM && have_prime_tower && !is_BBL_Printer);
|
||||
|
||||
toggle_line("prime_volume",have_prime_tower && (!purge_in_primetower || !bSEMM));
|
||||
|
||||
for (auto el : {"flush_into_infill", "flush_into_support", "flush_into_objects"})
|
||||
|
@ -743,8 +736,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
bool has_detect_overhang_wall = config->opt_bool("detect_overhang_wall");
|
||||
bool has_overhang_reverse = config->opt_bool("overhang_reverse");
|
||||
bool force_wall_direction = config->opt_enum<WallDirection>("wall_direction") != WallDirection::Auto;
|
||||
bool allow_overhang_reverse = has_detect_overhang_wall && !has_spiral_vase && !force_wall_direction;
|
||||
bool allow_overhang_reverse = !has_spiral_vase && !force_wall_direction;
|
||||
toggle_field("overhang_reverse", allow_overhang_reverse);
|
||||
toggle_field("overhang_reverse_threshold", has_detect_overhang_wall);
|
||||
toggle_line("overhang_reverse_threshold", allow_overhang_reverse && has_overhang_reverse);
|
||||
toggle_line("overhang_reverse_internal_only", allow_overhang_reverse && has_overhang_reverse);
|
||||
bool has_overhang_reverse_internal_only = config->opt_bool("overhang_reverse_internal_only");
|
||||
|
|
|
@ -47,20 +47,20 @@ static const std::vector<std::string> filament_vendors =
|
|||
"Duramic", "ELEGOO", "Eryone", "Essentium", "eSUN",
|
||||
"Extrudr", "Fiberforce", "Fiberlogy", "FilaCube", "Filamentive",
|
||||
"Fillamentum", "FLASHFORGE", "Formfutura", "Francofil", "FilamentOne",
|
||||
"Fil X", "GEEETECH", "Giantarm", "Gizmo Dorks", "GreenGate3D",
|
||||
"Fil X", "GEEETECH", "Giantarm", "Gizmo Dorks", "GreenGate3D",
|
||||
"HATCHBOX", "Hello3D", "IC3D", "IEMAI", "IIID Max",
|
||||
"INLAND", "iProspect", "iSANMATE", "Justmaker", "Keene Village Plastics",
|
||||
"Kexcelled", "MakerBot", "MatterHackers", "MIKA3D", "NinjaTek",
|
||||
"Nobufil", "Novamaker", "OVERTURE", "OVVNYXE", "Polymaker",
|
||||
"Priline", "Printed Solid", "Protopasta", "Prusament", "Push Plastic",
|
||||
"R3D", "Re-pet3D", "Recreus", "Regen", "Sain SMART",
|
||||
"SliceWorx", "Snapmaker", "SnoLabs", "Spectrum", "SUNLU",
|
||||
"TTYT3D", "Tianse", "UltiMaker", "Valment", "Verbatim",
|
||||
"VO3D", "Voxelab", "VOXELPLA", "YOOPAI", "Yousu",
|
||||
"Ziro", "Zyltech"};
|
||||
"R3D", "Re-pet3D", "Recreus", "Regen", "RatRig",
|
||||
"Sain SMART", "SliceWorx", "Snapmaker", "SnoLabs", "Spectrum",
|
||||
"SUNLU", "TTYT3D", "Tianse", "UltiMaker", "Valment",
|
||||
"Verbatim", "VO3D", "Voxelab", "VOXELPLA", "YOOPAI",
|
||||
"Yousu", "Ziro", "Zyltech"};
|
||||
|
||||
static const std::vector<std::string> filament_types = {"PLA", "rPLA", "PLA+", "PLA Tough", "PETG", "ABS", "ASA", "FLEX", "HIPS", "PA", "PACF",
|
||||
"NYLON", "PVA", "PVB", "PC", "PCABS", "PCTG", "PCCF", "PHA", "PP", "PEI", "PET", "PETG",
|
||||
"NYLON", "PVA", "PVB", "PC", "PCABS", "PCTG", "PCCF", "PHA", "PP", "PEI", "PET",
|
||||
"PETGCF", "PTBA", "PTBA90A", "PEEK", "TPU93A", "TPU75D", "TPU", "TPU92A", "TPU98A", "Misc",
|
||||
"TPE", "GLAZE", "Nylon", "CPE", "METAL", "ABST", "Carbon Fiber", "SBS"};
|
||||
|
||||
|
@ -143,6 +143,15 @@ static bool str_is_all_digit(const std::string &str) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Custom comparator for case-insensitive sorting
|
||||
static bool caseInsensitiveCompare(const std::string& a, const std::string& b) {
|
||||
std::string lowerA = a;
|
||||
std::string lowerB = b;
|
||||
std::transform(lowerA.begin(), lowerA.end(), lowerA.begin(), ::tolower);
|
||||
std::transform(lowerB.begin(), lowerB.end(), lowerB.begin(), ::tolower);
|
||||
return lowerA < lowerB;
|
||||
}
|
||||
|
||||
static bool delete_filament_preset_by_name(std::string delete_preset_name, std::string &selected_preset_name)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("select preset, name %1%") % delete_preset_name;
|
||||
|
@ -588,9 +597,9 @@ CreateFilamentPresetDialog::CreateFilamentPresetDialog(wxWindow *parent)
|
|||
m_main_sizer->Add(m_line_top, 0, wxEXPAND, 0);
|
||||
m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
|
||||
wxStaticText *basic_infomation = new wxStaticText(this, wxID_ANY, _L("Basic Information"));
|
||||
basic_infomation->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(basic_infomation, 0, wxLEFT, FromDIP(10));
|
||||
wxStaticText *basic_information = new wxStaticText(this, wxID_ANY, _L("Basic Information"));
|
||||
basic_information->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(basic_information, 0, wxLEFT, FromDIP(10));
|
||||
|
||||
m_main_sizer->Add(create_item(FilamentOptionType::VENDOR), 0, wxEXPAND | wxALL, FromDIP(5));
|
||||
m_main_sizer->Add(create_item(FilamentOptionType::TYPE), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
|
||||
|
@ -602,9 +611,9 @@ CreateFilamentPresetDialog::CreateFilamentPresetDialog(wxWindow *parent)
|
|||
m_main_sizer->Add(line_divider, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(10));
|
||||
m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
|
||||
wxStaticText *presets_infomation = new wxStaticText(this, wxID_ANY, _L("Add Filament Preset under this filament"));
|
||||
presets_infomation->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(presets_infomation, 0, wxLEFT | wxRIGHT, FromDIP(15));
|
||||
wxStaticText *presets_information = new wxStaticText(this, wxID_ANY, _L("Add Filament Preset under this filament"));
|
||||
presets_information->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(presets_information, 0, wxLEFT | wxRIGHT, FromDIP(15));
|
||||
|
||||
m_main_sizer->Add(create_item(FilamentOptionType::FILAMENT_PRESET), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
|
||||
|
||||
|
@ -692,11 +701,19 @@ wxBoxSizer *CreateFilamentPresetDialog::create_vendor_item()
|
|||
optionSizer->SetMinSize(OPTION_SIZE);
|
||||
horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5));
|
||||
|
||||
wxArrayString choices;
|
||||
for (const wxString vendor : filament_vendors) {
|
||||
choices.push_back(vendor);
|
||||
// Convert all std::any to std::string
|
||||
std::vector<std::string> string_vendors;
|
||||
for (const auto& vendor_any : filament_vendors) {
|
||||
string_vendors.push_back(std::any_cast<std::string>(vendor_any));
|
||||
}
|
||||
|
||||
// Sort the vendors alphabetically
|
||||
std::sort(string_vendors.begin(), string_vendors.end(), caseInsensitiveCompare);
|
||||
|
||||
wxArrayString choices;
|
||||
for (const std::string &vendor : string_vendors) {
|
||||
choices.push_back(wxString(vendor)); // Convert std::string to wxString before adding
|
||||
}
|
||||
choices.Sort();
|
||||
|
||||
wxBoxSizer *vendor_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_filament_vendor_combobox = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE, 0, nullptr, wxCB_READONLY);
|
||||
|
@ -995,7 +1012,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_button_item()
|
|||
wxString serial_str = m_filament_serial_input->GetTextCtrl()->GetValue();
|
||||
std::string serial_name;
|
||||
if (serial_str.empty()) {
|
||||
MessageDialog dlg(this, _L("Filament serial is not inputed, please input serial."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Filament serial is not entered, please enter serial."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
|
@ -1641,7 +1658,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_printer_item(wxWindow *parent)
|
|||
m_select_model->SetLabelColor(*wxBLACK);
|
||||
}
|
||||
} else {
|
||||
MessageDialog dlg(this, _L("The model is not found, place reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The model is not found, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
}
|
||||
e.Skip();
|
||||
|
@ -2121,7 +2138,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
|||
varient = model_varient.substr(index_at + 3, index_nozzle - index_at - 4);
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "get nozzle failed";
|
||||
MessageDialog dlg(this, _L("The nozzle diameter is not found, place reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The nozzle diameter is not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
|
@ -2132,7 +2149,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
|||
if (temp_printer_preset) {
|
||||
m_printer_preset = new Preset(*temp_printer_preset);
|
||||
} else {
|
||||
MessageDialog dlg(this, _L("The printer preset is not found, place reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The printer preset is not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
|
@ -2590,7 +2607,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_page2_btns_item(wxWindow *parent)
|
|||
std::string custom_vendor = into_u8(m_custom_vendor_text_ctrl->GetValue());
|
||||
std::string custom_model = into_u8(m_custom_model_text_ctrl->GetValue());
|
||||
if (custom_vendor.empty() || custom_model.empty()) {
|
||||
MessageDialog dlg(this, _L("The custom printer or model is not inputed, place input."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("The custom printer or model is not entered, please enter it."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
show_page1();
|
||||
|
@ -3116,7 +3133,7 @@ bool CreatePrinterPresetDialog::validate_input_valid()
|
|||
model_name = into_u8(m_select_model->GetStringSelection());
|
||||
}
|
||||
if ((vendor_name.empty() || model_name.empty())) {
|
||||
MessageDialog dlg(this, _L("You have not selected the vendor and model or inputed the custom vendor and model."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("You have not selected the vendor and model or entered the custom vendor and model."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
|
@ -3542,7 +3559,7 @@ wxBoxSizer *ExportConfigsDialog::create_export_config_item(wxWindow *parent)
|
|||
static_export_printer_preset_bundle_text->SetForegroundColour(wxColour("#6B6B6B"));
|
||||
radioBoxSizer->Add(static_export_printer_preset_bundle_text, 0, wxEXPAND | wxLEFT, FromDIP(22));
|
||||
radioBoxSizer->Add(create_radio_item(m_exprot_type.filament_bundle, parent, wxEmptyString, m_export_type_btns), 0, wxEXPAND | wxTOP, FromDIP(10));
|
||||
wxStaticText *static_export_filament_preset_bundle_text = new wxStaticText(parent, wxID_ANY, _L("User's fillment preset set. \nCan be shared with others."), wxDefaultPosition, wxDefaultSize);
|
||||
wxStaticText *static_export_filament_preset_bundle_text = new wxStaticText(parent, wxID_ANY, _L("User's filament preset set. \nCan be shared with others."), wxDefaultPosition, wxDefaultSize);
|
||||
static_export_filament_preset_bundle_text->SetFont(Label::Body_12);
|
||||
static_export_filament_preset_bundle_text->SetForegroundColour(wxColour("#6B6B6B"));
|
||||
radioBoxSizer->Add(static_export_filament_preset_bundle_text, 0, wxEXPAND | wxLEFT, FromDIP(22));
|
||||
|
@ -4215,7 +4232,7 @@ void ExportConfigsDialog::data_init()
|
|||
}
|
||||
}
|
||||
|
||||
EditFilamentPresetDialog::EditFilamentPresetDialog(wxWindow *parent, FilamentInfomation *filament_info)
|
||||
EditFilamentPresetDialog::EditFilamentPresetDialog(wxWindow *parent, Filamentinformation *filament_info)
|
||||
: DPIDialog(parent ? parent : nullptr, wxID_ANY, _L("Edit Filament"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
, m_filament_id("")
|
||||
, m_filament_name("")
|
||||
|
@ -4238,10 +4255,10 @@ EditFilamentPresetDialog::EditFilamentPresetDialog(wxWindow *parent, FilamentInf
|
|||
m_main_sizer->Add(m_line_top, 0, wxEXPAND, 0);
|
||||
m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
|
||||
wxStaticText* basic_infomation = new wxStaticText(this, wxID_ANY, _L("Basic Information"));
|
||||
basic_infomation->SetFont(Label::Head_16);
|
||||
wxStaticText* basic_information = new wxStaticText(this, wxID_ANY, _L("Basic Information"));
|
||||
basic_information->SetFont(Label::Head_16);
|
||||
|
||||
m_main_sizer->Add(basic_infomation, 0, wxALL, FromDIP(10));
|
||||
m_main_sizer->Add(basic_information, 0, wxALL, FromDIP(10));
|
||||
m_filament_id = filament_info->filament_id;
|
||||
//std::string filament_name = filament_info->filament_name;
|
||||
bool get_filament_presets = get_same_filament_id_presets(m_filament_id);
|
||||
|
@ -4280,9 +4297,9 @@ EditFilamentPresetDialog::EditFilamentPresetDialog(wxWindow *parent, FilamentInf
|
|||
m_main_sizer->Add(line_divider, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(10));
|
||||
m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
|
||||
wxStaticText *presets_infomation = new wxStaticText(this, wxID_ANY, _L("Filament presets under this filament"));
|
||||
presets_infomation->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(presets_infomation, 0, wxLEFT | wxRIGHT, FromDIP(10));
|
||||
wxStaticText *presets_information = new wxStaticText(this, wxID_ANY, _L("Filament presets under this filament"));
|
||||
presets_information->SetFont(Label::Head_16);
|
||||
m_main_sizer->Add(presets_information, 0, wxLEFT | wxRIGHT, FromDIP(10));
|
||||
|
||||
m_main_sizer->Add(create_add_filament_btn(), 0, wxEXPAND | wxALL, 0);
|
||||
m_main_sizer->Add(create_preset_tree_sizer(), 0, wxEXPAND | wxALL, 0);
|
||||
|
@ -4695,9 +4712,9 @@ CreatePresetForPrinterDialog::CreatePresetForPrinterDialog(wxWindow *parent, std
|
|||
main_sizer->Add(m_line_top, 0, wxEXPAND, 0);
|
||||
main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
|
||||
wxStaticText *basic_infomation = new wxStaticText(this, wxID_ANY, _L("Add preset for new printer"));
|
||||
basic_infomation->SetFont(Label::Head_16);
|
||||
main_sizer->Add(basic_infomation, 0, wxALL, FromDIP(10));
|
||||
wxStaticText *basic_information = new wxStaticText(this, wxID_ANY, _L("Add preset for new printer"));
|
||||
basic_information->SetFont(Label::Head_16);
|
||||
main_sizer->Add(basic_information, 0, wxALL, FromDIP(10));
|
||||
|
||||
main_sizer->Add(create_selected_printer_preset_sizer(), 0, wxALL, FromDIP(10));
|
||||
main_sizer->Add(create_selected_filament_preset_sizer(), 0, wxALL, FromDIP(10));
|
||||
|
|
|
@ -352,7 +352,7 @@ private:
|
|||
class EditFilamentPresetDialog : public DPIDialog
|
||||
{
|
||||
public:
|
||||
EditFilamentPresetDialog(wxWindow *parent, FilamentInfomation *filament_info);
|
||||
EditFilamentPresetDialog(wxWindow *parent, Filamentinformation *filament_info);
|
||||
~EditFilamentPresetDialog();
|
||||
|
||||
wxPanel *get_preset_tree_panel() { return m_preset_tree_panel; }
|
||||
|
|
|
@ -145,9 +145,10 @@ void Downloader::start_download(const std::string& full_url)
|
|||
// Orca: Replace PS workaround for "mysterious slash" with a more dynamic approach
|
||||
// Windows seems to have fixed the issue and this provides backwards compatability for those it still affects
|
||||
boost::regex re(R"(^(orcaslicer|prusaslicer|bambustudio|cura):\/\/open[\/]?\?file=)", boost::regbase::icase);
|
||||
boost::regex re2(R"(^(bambustudioopen):\/\/)", boost::regex::icase);
|
||||
boost::smatch results;
|
||||
|
||||
if (!boost::regex_search(full_url, results, re)) {
|
||||
if (!boost::regex_search(full_url, results, re) && !boost::regex_search(full_url, results, re2)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Could not start download due to wrong URL: " << full_url;
|
||||
// Orca: show error
|
||||
NotificationManager* ntf_mngr = wxGetApp().notification_manager();
|
||||
|
|
|
@ -1244,7 +1244,7 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin)
|
|||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
render_shells();
|
||||
render_shells(canvas_width, canvas_height);
|
||||
|
||||
if (m_roles.empty())
|
||||
return;
|
||||
|
@ -1447,9 +1447,6 @@ void GCodeViewer::_render_calibration_thumbnail_internal(ThumbnailData& thumbnai
|
|||
//shader->set_uniform("emission_factor", 0.0f);
|
||||
}
|
||||
else {
|
||||
switch (buffer.render_primitive_type) {
|
||||
default: break;
|
||||
}
|
||||
int uniform_color = shader->get_uniform_location("uniform_color");
|
||||
auto it_path = buffer.render_paths.begin();
|
||||
for (unsigned int ibuffer_id = 0; ibuffer_id < static_cast<unsigned int>(buffer.indices.size()); ++ibuffer_id) {
|
||||
|
@ -4023,7 +4020,7 @@ void GCodeViewer::render_toolpaths()
|
|||
}
|
||||
}
|
||||
|
||||
void GCodeViewer::render_shells()
|
||||
void GCodeViewer::render_shells(int canvas_width, int canvas_height)
|
||||
{
|
||||
//BBS: add shell previewing logic
|
||||
if ((!m_shells.previewing && !m_shells.visible) || m_shells.volumes.empty())
|
||||
|
@ -4039,7 +4036,9 @@ void GCodeViewer::render_shells()
|
|||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, camera.get_view_matrix(), camera.get_projection_matrix());
|
||||
shader->set_uniform("z_far", camera.get_far_z());
|
||||
shader->set_uniform("z_near", camera.get_near_z());
|
||||
m_shells.volumes.render(GLVolumeCollection::ERenderType::Transparent, false, camera.get_view_matrix(), camera.get_projection_matrix(), {canvas_width, canvas_height});
|
||||
shader->set_uniform("emission_factor", 0.0f);
|
||||
shader->stop_using();
|
||||
|
||||
|
|
|
@ -893,7 +893,7 @@ private:
|
|||
//void load_shells(const Print& print);
|
||||
void refresh_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last) const;
|
||||
void render_toolpaths();
|
||||
void render_shells();
|
||||
void render_shells(int canvas_width, int canvas_height);
|
||||
|
||||
//BBS: GUI refactor: add canvas size
|
||||
void render_legend(float &legend_height, int canvas_width, int canvas_height, int right_margin);
|
||||
|
|
|
@ -666,8 +666,9 @@ void GLCanvas3D::LayersEditing::update_slicing_parameters()
|
|||
{
|
||||
if (m_slicing_parameters == nullptr) {
|
||||
m_slicing_parameters = new SlicingParameters();
|
||||
*m_slicing_parameters = PrintObject::slicing_parameters(*m_config, *m_model_object, m_object_max_z);
|
||||
*m_slicing_parameters = PrintObject::slicing_parameters(*m_config, *m_model_object, m_object_max_z, m_shrinkage_compensation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
float GLCanvas3D::LayersEditing::thickness_bar_width(const GLCanvas3D & canvas)
|
||||
|
@ -1489,6 +1490,11 @@ void GLCanvas3D::set_config(const DynamicPrintConfig* config)
|
|||
{
|
||||
m_config = config;
|
||||
m_layers_editing.set_config(config);
|
||||
|
||||
// Orca: Filament shrinkage compensation
|
||||
const Print *print = fff_print();
|
||||
if (print != nullptr)
|
||||
m_layers_editing.set_shrinkage_compensation(fff_print()->shrinkage_compensation());
|
||||
}
|
||||
|
||||
void GLCanvas3D::set_process(BackgroundSlicingProcess *process)
|
||||
|
@ -3961,9 +3967,12 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
#ifdef SLIC3R_DEBUG_MOUSE_EVENTS
|
||||
printf((format_mouse_event_debug_message(evt) + " - other\n").c_str());
|
||||
#endif /* SLIC3R_DEBUG_MOUSE_EVENTS */
|
||||
}
|
||||
}
|
||||
const int selected_object_idx = m_selection.get_object_idx();
|
||||
const int layer_editing_object_idx = is_layers_editing_enabled() ? selected_object_idx : -1;
|
||||
const bool mouse_in_layer_editing = layer_editing_object_idx != -1 && m_layers_editing.bar_rect_contains(*this, pos(0), pos(1));
|
||||
|
||||
if (m_main_toolbar.on_mouse(evt, *this)) {
|
||||
if (!mouse_in_layer_editing && m_main_toolbar.on_mouse(evt, *this)) {
|
||||
if (m_main_toolbar.is_any_item_pressed())
|
||||
m_gizmos.reset_all_states();
|
||||
if (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())
|
||||
|
@ -3973,14 +3982,14 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
}
|
||||
|
||||
//BBS: GUI refactor: GLToolbar
|
||||
if (m_assemble_view_toolbar.on_mouse(evt, *this)) {
|
||||
if (!mouse_in_layer_editing && m_assemble_view_toolbar.on_mouse(evt, *this)) {
|
||||
if (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())
|
||||
mouse_up_cleanup();
|
||||
m_mouse.set_start_position_3D_as_invalid();
|
||||
return;
|
||||
}
|
||||
|
||||
if (wxGetApp().plater()->get_collapse_toolbar().on_mouse(evt, *this)) {
|
||||
if (!mouse_in_layer_editing && wxGetApp().plater()->get_collapse_toolbar().on_mouse(evt, *this)) {
|
||||
if (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())
|
||||
mouse_up_cleanup();
|
||||
m_mouse.set_start_position_3D_as_invalid();
|
||||
|
@ -4009,7 +4018,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
m_dirty = true;
|
||||
};
|
||||
|
||||
if (m_gizmos.on_mouse(evt)) {
|
||||
if (!mouse_in_layer_editing && m_gizmos.on_mouse(evt)) {
|
||||
if (m_gizmos.is_running()) {
|
||||
_deactivate_arrange_menu();
|
||||
_deactivate_orient_menu();
|
||||
|
@ -4061,10 +4070,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
|
||||
bool any_gizmo_active = m_gizmos.get_current() != nullptr;
|
||||
|
||||
int selected_object_idx = m_selection.get_object_idx();
|
||||
int layer_editing_object_idx = is_layers_editing_enabled() ? selected_object_idx : -1;
|
||||
|
||||
|
||||
if (m_mouse.drag.move_requires_threshold && m_mouse.is_move_start_threshold_position_2D_defined() && m_mouse.is_move_threshold_met(pos)) {
|
||||
m_mouse.drag.move_requires_threshold = false;
|
||||
m_mouse.set_move_start_threshold_position_2D_as_invalid();
|
||||
|
@ -4084,8 +4089,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
while (p->GetParent())
|
||||
p = p->GetParent();
|
||||
auto *top_level_wnd = dynamic_cast<wxTopLevelWindow*>(p);
|
||||
if (top_level_wnd && top_level_wnd->IsActive() && !wxGetApp().get_side_menu_popup_status())
|
||||
;// m_canvas->SetFocus();
|
||||
m_mouse.position = pos.cast<double>();
|
||||
m_tooltip_enabled = false;
|
||||
// 1) forces a frame render to ensure that m_hover_volume_idxs is updated even when the user right clicks while
|
||||
|
@ -4120,7 +4123,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
|
||||
// If user pressed left or right button we first check whether this happened on a volume or not.
|
||||
m_layers_editing.state = LayersEditing::Unknown;
|
||||
if (layer_editing_object_idx != -1 && m_layers_editing.bar_rect_contains(*this, pos(0), pos(1))) {
|
||||
if (mouse_in_layer_editing) {
|
||||
// A volume is selected and the mouse is inside the layer thickness bar.
|
||||
// Start editing the layer height.
|
||||
m_layers_editing.state = LayersEditing::Editing;
|
||||
|
@ -5223,13 +5226,12 @@ void GLCanvas3D::update_sequential_clearance()
|
|||
// the results are then cached for following displacements
|
||||
if (m_sequential_print_clearance_first_displacement) {
|
||||
m_sequential_print_clearance.m_hull_2d_cache.clear();
|
||||
bool all_objects_are_short = std::all_of(fff_print()->objects().begin(), fff_print()->objects().end(), \
|
||||
[&](PrintObject* obj) { return obj->height() < scale_(fff_print()->config().nozzle_height.value - MARGIN_HEIGHT); });
|
||||
auto [object_skirt_offset, _] = fff_print()->object_skirt_offset();
|
||||
float shrink_factor;
|
||||
if (all_objects_are_short)
|
||||
shrink_factor = scale_(0.5 * MAX_OUTER_NOZZLE_DIAMETER - 0.1);
|
||||
if (fff_print()->is_all_objects_are_short())
|
||||
shrink_factor = scale_(std::max(0.5f * MAX_OUTER_NOZZLE_DIAMETER, object_skirt_offset) - 0.1);
|
||||
else
|
||||
shrink_factor = static_cast<float>(scale_(0.5 * fff_print()->config().extruder_clearance_radius.value - EPSILON));
|
||||
shrink_factor = static_cast<float>(scale_(0.5 * fff_print()->config().extruder_clearance_radius.value + object_skirt_offset - 0.1));
|
||||
|
||||
double mitter_limit = scale_(0.1);
|
||||
m_sequential_print_clearance.m_hull_2d_cache.reserve(m_model->objects.size());
|
||||
|
@ -7228,6 +7230,12 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
|
||||
const Size& cvn_size = get_canvas_size();
|
||||
{
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
shader->set_uniform("z_far", camera.get_far_z());
|
||||
shader->set_uniform("z_near", camera.get_near_z());
|
||||
}
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
|
@ -7239,7 +7247,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
if (m_picking_enabled && m_layers_editing.is_enabled() && (m_layers_editing.last_object_id != -1) && (m_layers_editing.object_max_z() > 0.0f)) {
|
||||
int object_id = m_layers_editing.last_object_id;
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), [object_id](const GLVolume& volume) {
|
||||
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), cvn_size, [object_id](const GLVolume& volume) {
|
||||
// Which volume to paint without the layer height profile shader?
|
||||
return volume.is_active && (volume.is_modifier || volume.composite_id.object_id != object_id);
|
||||
});
|
||||
|
@ -7255,14 +7263,14 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
//BBS:add assemble view related logic
|
||||
// do not cull backfaces to show broken geometry, if any
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
m_volumes.render(type, m_picking_enabled, camera.get_view_matrix(), camera.get_projection_matrix(), [this, canvas_type](const GLVolume& volume) {
|
||||
m_volumes.render(type, m_picking_enabled, camera.get_view_matrix(), camera.get_projection_matrix(), cvn_size, [this, canvas_type](const GLVolume& volume) {
|
||||
if (canvas_type == ECanvasType::CanvasAssembleView) {
|
||||
return !volume.is_modifier && !volume.is_wipe_tower;
|
||||
}
|
||||
else {
|
||||
return (m_render_sla_auxiliaries || volume.composite_id.volume_id >= 0);
|
||||
}
|
||||
}, with_outline);
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -7289,14 +7297,14 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with
|
|||
}*/
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
//BBS:add assemble view related logic
|
||||
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), [this, canvas_type](const GLVolume& volume) {
|
||||
m_volumes.render(type, false, camera.get_view_matrix(), camera.get_projection_matrix(), cvn_size, [this, canvas_type](const GLVolume& volume) {
|
||||
if (canvas_type == ECanvasType::CanvasAssembleView) {
|
||||
return !volume.is_modifier;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}, with_outline);
|
||||
});
|
||||
if (m_canvas_type == CanvasAssembleView && m_gizmos.m_assemble_view_data->model_objects_clipper()->get_position() > 0) {
|
||||
const GLGizmosManager& gm = get_gizmos_manager();
|
||||
shader->stop_using();
|
||||
|
|
|
@ -216,6 +216,9 @@ class GLCanvas3D
|
|||
};
|
||||
|
||||
static const float THICKNESS_BAR_WIDTH;
|
||||
|
||||
// Orca: Shrinkage compensation
|
||||
void set_shrinkage_compensation(const Vec3d &shrinkage_compensation) { m_shrinkage_compensation = shrinkage_compensation; };
|
||||
|
||||
private:
|
||||
bool m_enabled{ false };
|
||||
|
@ -229,6 +232,9 @@ class GLCanvas3D
|
|||
// Owned by LayersEditing.
|
||||
SlicingParameters* m_slicing_parameters{ nullptr };
|
||||
std::vector<double> m_layer_height_profile;
|
||||
|
||||
// Orca: Shrinkage compensation to apply when we need to use object_max_z with Z compensation.
|
||||
Vec3d m_shrinkage_compensation{ Vec3d::Ones() };
|
||||
|
||||
mutable float m_adaptive_quality{ 0.5f };
|
||||
mutable HeightProfileSmoothingParams m_smooth_params;
|
||||
|
|
|
@ -1908,23 +1908,31 @@ void GUI_App::init_app_config()
|
|||
// Mac : "~/Library/Application Support/Slic3r"
|
||||
|
||||
if (data_dir().empty()) {
|
||||
boost::filesystem::path data_dir_path;
|
||||
#ifndef __linux__
|
||||
std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
//BBS create folder if not exists
|
||||
data_dir_path = boost::filesystem::path(data_dir);
|
||||
set_data_dir(data_dir);
|
||||
#else
|
||||
// Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}.
|
||||
// https://github.com/prusa3d/PrusaSlicer/issues/2911
|
||||
wxString dir;
|
||||
if (! wxGetEnv(wxS("XDG_CONFIG_HOME"), &dir) || dir.empty() )
|
||||
dir = wxFileName::GetHomeDir() + wxS("/.config");
|
||||
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
||||
data_dir_path = boost::filesystem::path(data_dir());
|
||||
#endif
|
||||
if (!boost::filesystem::exists(data_dir_path)){
|
||||
boost::filesystem::create_directory(data_dir_path);
|
||||
// Orca: check if data_dir folder exists in application folder
|
||||
// use it if it exists
|
||||
boost::filesystem::path app_data_dir_path = boost::filesystem::current_path() / "data_dir";
|
||||
if (boost::filesystem::exists(app_data_dir_path)) {
|
||||
set_data_dir(app_data_dir_path.string());
|
||||
}
|
||||
else{
|
||||
boost::filesystem::path data_dir_path;
|
||||
#ifndef __linux__
|
||||
std::string data_dir = wxStandardPaths::Get().GetUserDataDir().ToUTF8().data();
|
||||
//BBS create folder if not exists
|
||||
data_dir_path = boost::filesystem::path(data_dir);
|
||||
set_data_dir(data_dir);
|
||||
#else
|
||||
// Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}.
|
||||
// https://github.com/prusa3d/PrusaSlicer/issues/2911
|
||||
wxString dir;
|
||||
if (! wxGetEnv(wxS("XDG_CONFIG_HOME"), &dir) || dir.empty() )
|
||||
dir = wxFileName::GetHomeDir() + wxS("/.config");
|
||||
set_data_dir((dir + "/" + GetAppName()).ToUTF8().data());
|
||||
data_dir_path = boost::filesystem::path(data_dir());
|
||||
#endif
|
||||
if (!boost::filesystem::exists(data_dir_path)){
|
||||
boost::filesystem::create_directory(data_dir_path);
|
||||
}
|
||||
}
|
||||
|
||||
// Change current dirtory of application
|
||||
|
@ -3672,7 +3680,7 @@ void GUI_App::request_user_logout()
|
|||
/* delete old user settings */
|
||||
bool transfer_preset_changes = false;
|
||||
wxString header = _L("Some presets are modified.") + "\n" +
|
||||
_L("You can keep the modifield presets to the new project, discard or save changes as new presets.");
|
||||
_L("You can keep the modified presets to the new project, discard or save changes as new presets.");
|
||||
wxGetApp().check_and_keep_current_preset_changes(_L("User logged out"), header, ActionButtons::KEEP | ActionButtons::SAVE, &transfer_preset_changes);
|
||||
|
||||
m_device_manager->clean_user_info();
|
||||
|
|
|
@ -344,6 +344,9 @@ private:
|
|||
bool show_3d_navigator() const { return app_config->get_bool("show_3d_navigator"); }
|
||||
void toggle_show_3d_navigator() const { app_config->set_bool("show_3d_navigator", !show_3d_navigator()); }
|
||||
|
||||
bool show_outline() const { return app_config->get_bool("show_outline"); }
|
||||
void toggle_show_outline() const { app_config->set_bool("show_outline", !show_outline()); }
|
||||
|
||||
wxString get_inf_dialog_contect () {return m_info_dialog_content;};
|
||||
|
||||
std::vector<std::string> split_str(std::string src, std::string separator);
|
||||
|
|
|
@ -106,7 +106,7 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CAT
|
|||
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
|
||||
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
|
||||
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
||||
{"infill_combination", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"rotate_solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||
}},
|
||||
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
|
||||
{"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
|
||||
|
@ -708,13 +708,6 @@ wxMenuItem* MenuFactory::append_menu_item_settings(wxMenu* menu_)
|
|||
if (sel_vol && sel_vol->type() >= ModelVolumeType::SUPPORT_ENFORCER)
|
||||
return nullptr;
|
||||
|
||||
|
||||
// Create new items for settings popupmenu
|
||||
|
||||
if (printer_technology() == ptFFF ||
|
||||
(menu->GetMenuItems().size() > 0 && !menu->GetMenuItems().back()->IsSeparator()))
|
||||
;// menu->SetFirstSeparator();
|
||||
|
||||
// detect itemm for adding of the setting
|
||||
ObjectList* object_list = obj_list();
|
||||
ObjectDataViewModel* obj_model = list_model();
|
||||
|
|
|
@ -68,7 +68,7 @@ int GUI_Run(GUI_InitParams ¶ms)
|
|||
wxMessageBox(boost::nowide::widen(ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
|
||||
} catch (const std::exception &ex) {
|
||||
BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
|
||||
wxMessageBox(format_wxstr(_L("Fatal error, exception catched: %1%"), ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
|
||||
wxMessageBox(format_wxstr(_L("Fatal error, exception caught: %1%"), ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
|
||||
}
|
||||
// error
|
||||
return 1;
|
||||
|
|
|
@ -2434,7 +2434,7 @@ bool ObjectList::del_from_cut_object(bool is_cut_connector, bool is_model_part/*
|
|||
(_L("This action will break a cut correspondence.\n"
|
||||
"After that model consistency can't be guaranteed .\n"
|
||||
"\n"
|
||||
"To manipulate with solid parts or negative volumes you have to invalidate cut infornation first.") + msg_end ),
|
||||
"To manipulate with solid parts or negative volumes you have to invalidate cut information first.") + msg_end ),
|
||||
false, buttons_style | wxCANCEL_DEFAULT | wxICON_WARNING);
|
||||
|
||||
dialog.SetButtonLabel(wxID_YES, _L("Invalidate cut info"));
|
||||
|
@ -2543,7 +2543,7 @@ void ObjectList::split()
|
|||
const ConfigOptionStrings* filament_colors = config.option<ConfigOptionStrings>("filament_colour", false);
|
||||
const auto filament_cnt = (filament_colors == nullptr) ? size_t(1) : filament_colors->size();
|
||||
if (!volume->is_splittable()) {
|
||||
wxMessageBox(_(L("The target object contains only one part and can not be splited.")));
|
||||
wxMessageBox(_(L("The target object contains only one part and can not be split.")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2772,12 +2772,17 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors, floa
|
|||
render_part_action_line(_L("Upper part"), "##upper", m_keep_upper, m_place_on_cut_upper, m_rotate_upper);
|
||||
render_part_action_line(_L("Lower part"), "##lower", m_keep_lower, m_place_on_cut_lower, m_rotate_lower);
|
||||
|
||||
m_imgui->disabled_begin(has_connectors);
|
||||
m_imgui->bbl_checkbox(_L("Cut to parts"), m_keep_as_parts);
|
||||
if (m_keep_as_parts) {
|
||||
m_keep_upper = true;
|
||||
m_keep_lower = true;
|
||||
}
|
||||
m_imgui->disabled_begin(has_connectors || m_part_selection.valid() || mode == CutMode::cutTongueAndGroove);
|
||||
|
||||
if (m_part_selection.valid())
|
||||
m_keep_as_parts = false;
|
||||
|
||||
m_imgui->bbl_checkbox(_L("Cut to parts"), m_keep_as_parts);
|
||||
if (m_keep_as_parts) {
|
||||
m_keep_upper = m_keep_lower = true;
|
||||
m_place_on_cut_upper = m_place_on_cut_lower = false;
|
||||
m_rotate_upper = m_rotate_lower = false;
|
||||
}
|
||||
m_imgui->disabled_end();
|
||||
}
|
||||
|
||||
|
|
|
@ -3057,7 +3057,7 @@ bool GLGizmoEmboss::choose_font_by_wxdialog()
|
|||
}
|
||||
#endif // ALLOW_ADD_FONT_BY_OS_SELECTOR
|
||||
|
||||
#if defined ALLOW_ADD_FONT_BY_FILE or defined ALLOW_DEBUG_MODE
|
||||
#if defined ALLOW_ADD_FONT_BY_FILE || defined ALLOW_DEBUG_MODE
|
||||
namespace priv {
|
||||
static std::string get_file_name(const std::string &file_path)
|
||||
{
|
||||
|
|
|
@ -1111,11 +1111,11 @@ std::vector<std::string> create_shape_warnings(const EmbossShape &shape, float s
|
|||
if (!shape.final_shape.is_healed) {
|
||||
for (const ExPolygonsWithId &i : shape.shapes_with_ids)
|
||||
if (!i.is_healed)
|
||||
add_warning(i.id, _u8L("Path can't be healed from selfintersection and multiple points."));
|
||||
add_warning(i.id, _u8L("Path can't be healed from self-intersection and multiple points."));
|
||||
|
||||
// This waning is not connected to NSVGshape. It is about union of paths, but Zero index is shown first
|
||||
size_t index = 0;
|
||||
add_warning(index, _u8L("Final shape constains selfintersection or multiple points with same coordinate."));
|
||||
add_warning(index, _u8L("Final shape contains self-intersection or multiple points with same coordinate."));
|
||||
}
|
||||
|
||||
size_t shape_index = 0;
|
||||
|
|
|
@ -272,7 +272,7 @@ bool GLGizmoText::on_init()
|
|||
m_desc["thickness"] = _L("Thickness");
|
||||
m_desc["text_gap"] = _L("Text Gap");
|
||||
m_desc["angle"] = _L("Angle");
|
||||
m_desc["embeded_depth"] = _L("Embeded\ndepth");
|
||||
m_desc["embeded_depth"] = _L("Embedded\ndepth");
|
||||
m_desc["input_text"] = _L("Input text");
|
||||
|
||||
m_desc["surface"] = _L("Surface");
|
||||
|
|
|
@ -499,8 +499,6 @@ HintData* HintDatabase::get_hint(HintDataNavigation nav)
|
|||
m_hint_id = get_next_hint_id();
|
||||
if(nav == HintDataNavigation::Prev)
|
||||
m_hint_id = get_prev_hint_id();
|
||||
if (nav == HintDataNavigation::Curr)
|
||||
;
|
||||
if (nav == HintDataNavigation::Random)
|
||||
init_random_hint_id();
|
||||
}
|
||||
|
|
|
@ -240,10 +240,6 @@ void IMSlider::SetTicksValues(const Info &custom_gcode_per_print_z)
|
|||
if (tick >= 0) m_ticks.ticks.emplace(TickCode{tick, h.type, h.extruder, h.color, h.extra});
|
||||
}
|
||||
|
||||
if (!was_empty && m_ticks.empty())
|
||||
// Switch to the "Feature type"/"Tool" from the very beginning of a new object slicing after deleting of the old one
|
||||
;// post_ticks_changed_event();
|
||||
|
||||
if (m_ticks.has_tick_with_code(ToolChange) && !m_can_change_color) {
|
||||
if (!wxGetApp().plater()->only_gcode_mode() && !wxGetApp().plater()->using_exported_file())
|
||||
{
|
||||
|
|
|
@ -502,6 +502,7 @@ void OtherInstanceMessageHandler::handle_message(const std::string& message)
|
|||
std::vector<boost::filesystem::path> paths;
|
||||
std::vector<std::string> downloads;
|
||||
boost::regex re(R"(^(orcaslicer|prusaslicer|cura|bambustudio):\/\/open[\/]?\?file=)", boost::regbase::icase);
|
||||
boost::regex re2(R"(^(bambustudioopen):\/\/)", boost::regex::icase);
|
||||
boost::smatch results;
|
||||
|
||||
// Skip the first argument, it is the path to the slicer executable.
|
||||
|
@ -510,7 +511,7 @@ void OtherInstanceMessageHandler::handle_message(const std::string& message)
|
|||
boost::filesystem::path p = MessageHandlerInternal::get_path(*it);
|
||||
if (! p.string().empty())
|
||||
paths.emplace_back(p);
|
||||
else if (boost::regex_search(*it, results, re))
|
||||
else if (boost::regex_search(*it, results, re) || boost::regex_search(*it, results, re2))
|
||||
downloads.emplace_back(*it);
|
||||
}
|
||||
if (! paths.empty()) {
|
||||
|
|
|
@ -237,7 +237,7 @@ void ArrangeJob::prepare_all() {
|
|||
if (m_selected.empty()) {
|
||||
if (!selected_is_locked) {
|
||||
m_plater->get_notification_manager()->push_notification(NotificationType::BBLPlateInfo,
|
||||
NotificationManager::NotificationLevel::WarningNotificationLevel, into_u8(_L("No arrangable objects are selected.")));
|
||||
NotificationManager::NotificationLevel::WarningNotificationLevel, into_u8(_L("No arrangeable objects are selected.")));
|
||||
}
|
||||
else {
|
||||
m_plater->get_notification_manager()->push_notification(NotificationType::BBLPlateInfo,
|
||||
|
@ -766,12 +766,16 @@ arrangement::ArrangeParams init_arrange_params(Plater *p)
|
|||
auto &print = wxGetApp().plater()->get_partplate_list().get_current_fff_print();
|
||||
const PrintConfig &print_config = print.config();
|
||||
|
||||
auto [object_skirt_offset, object_skirt_witdh] = print.object_skirt_offset();
|
||||
|
||||
params.clearance_height_to_rod = print_config.extruder_clearance_height_to_rod.value;
|
||||
params.clearance_height_to_lid = print_config.extruder_clearance_height_to_lid.value;
|
||||
params.cleareance_radius = print_config.extruder_clearance_radius.value;
|
||||
params.clearance_radius = print_config.extruder_clearance_radius.value + object_skirt_offset * 2;
|
||||
params.object_skirt_offset = object_skirt_offset;
|
||||
params.printable_height = print_config.printable_height.value;
|
||||
params.allow_rotations = settings.enable_rotation;
|
||||
params.nozzle_height = print.config().nozzle_height.value;
|
||||
params.nozzle_height = print_config.nozzle_height.value;
|
||||
params.all_objects_are_short = print.is_all_objects_are_short();
|
||||
params.align_center = print_config.best_object_pos.value;
|
||||
params.allow_multi_materials_on_same_plate = settings.allow_multi_materials_on_same_plate;
|
||||
params.avoid_extrusion_cali_region = settings.avoid_extrusion_cali_region;
|
||||
|
|
|
@ -88,7 +88,7 @@ class PlaterWorker: public Worker {
|
|||
if (eptr) try {
|
||||
std::rethrow_exception(eptr);
|
||||
} catch (std::exception &e) {
|
||||
show_error(m_plater, _L("An unexpected error occured") + ": " + e.what());
|
||||
show_error(m_plater, _L("An unexpected error occurred") + ": " + e.what());
|
||||
eptr = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,9 +103,6 @@ wxString PrintJob::get_http_error_msg(unsigned int status, std::string body)
|
|||
if (!j["message"].is_null())
|
||||
message = j["message"].get<std::string>();
|
||||
}
|
||||
switch (status) {
|
||||
;
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
;
|
||||
|
@ -446,7 +443,7 @@ void PrintJob::process(Ctl &ctl)
|
|||
std::string curr_job_id;
|
||||
json job_info_j;
|
||||
try {
|
||||
job_info_j.parse(job_info);
|
||||
std::ignore = job_info_j.parse(job_info);
|
||||
if (job_info_j.contains("job_id")) {
|
||||
curr_job_id = job_info_j["job_id"].get<std::string>();
|
||||
}
|
||||
|
|
|
@ -57,11 +57,6 @@ void RotoptimizeJob::process(Ctl &ctl)
|
|||
.print_config(&m_default_print_cfg)
|
||||
.statucb([this, &prev_status, &ctl/*, &statustxt*/](int s)
|
||||
{
|
||||
if (s > 0 && s < 100)
|
||||
;
|
||||
// ctl.update_status(prev_status + s / m_selected_object_ids.size(),
|
||||
// statustxt);
|
||||
|
||||
return !ctl.was_canceled();
|
||||
});
|
||||
|
||||
|
|
|
@ -67,9 +67,6 @@ wxString SendJob::get_http_error_msg(unsigned int status, std::string body)
|
|||
if (!j["message"].is_null())
|
||||
message = j["message"].get<std::string>();
|
||||
}
|
||||
switch (status) {
|
||||
;
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
;
|
||||
|
|
|
@ -1104,7 +1104,9 @@ void MainFrame::show_device(bool bBBLPrinter) {
|
|||
m_calibration->SetBackgroundColour(*wxWHITE);
|
||||
}
|
||||
m_calibration->Show(false);
|
||||
m_tabpanel->InsertPage(tpCalibration, m_calibration, _L("Calibration"), std::string("tab_calibration_active"),
|
||||
// Calibration is always the last page, so don't use InsertPage here. Otherwise, if multi_machine page is not enabled,
|
||||
// the calibration tab won't be properly added as well, due to the TabPosition::tpCalibration no longer matches the real tab position.
|
||||
m_tabpanel->AddPage(m_calibration, _L("Calibration"), std::string("tab_calibration_active"),
|
||||
std::string("tab_calibration_active"), false);
|
||||
|
||||
#ifdef _MSW_DARK_MODE
|
||||
|
@ -2431,6 +2433,12 @@ void MainFrame::init_menubar_as_editor()
|
|||
},
|
||||
"menu_remove", nullptr, [this](){return can_clone(); }, this);
|
||||
editMenu->AppendSeparator();
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Duplicate Current Plate"),
|
||||
_L("Duplicate the current plate"),[this](wxCommandEvent&) {
|
||||
m_plater->duplicate_plate();
|
||||
},
|
||||
"menu_remove", nullptr, [this](){return true;}, this);
|
||||
editMenu->AppendSeparator();
|
||||
#else
|
||||
// BBS undo
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Undo") + "\t" + ctrl + "Z",
|
||||
|
@ -2528,6 +2536,13 @@ void MainFrame::init_menubar_as_editor()
|
|||
},
|
||||
"", nullptr, [this](){return can_clone(); }, this);
|
||||
editMenu->AppendSeparator();
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Duplicate Current Plate"),
|
||||
_L("Duplicate the current plate"),[this, handle_key_event](wxCommandEvent&) {
|
||||
m_plater->duplicate_plate();
|
||||
},
|
||||
"", nullptr, [this](){return true;}, this);
|
||||
editMenu->AppendSeparator();
|
||||
|
||||
#endif
|
||||
|
||||
// BBS Select All
|
||||
|
@ -2605,7 +2620,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
viewMenu->Check(wxID_CAMERA_ORTHOGONAL + camera_id_base, true);
|
||||
|
||||
viewMenu->AppendSeparator();
|
||||
append_menu_check_item(viewMenu, wxID_ANY, _L("Show &G-code Window") + "\tC", _L("Show g-code window in Previce scene"),
|
||||
append_menu_check_item(viewMenu, wxID_ANY, _L("Show &G-code Window") + "\tC", _L("Show g-code window in Preview scene"),
|
||||
[this](wxCommandEvent &) {
|
||||
wxGetApp().toggle_show_gcode_window();
|
||||
m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT));
|
||||
|
@ -2642,6 +2657,16 @@ void MainFrame::init_menubar_as_editor()
|
|||
m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT));
|
||||
},
|
||||
this, [this]() { return m_plater->is_view3D_shown(); }, [this]() { return m_plater->is_view3D_overhang_shown(); }, this);
|
||||
|
||||
append_menu_check_item(
|
||||
viewMenu, wxID_ANY, _L("Show Selected Outline (Experimental)"), _L("Show outline around selected object in 3D scene"),
|
||||
[this](wxCommandEvent&) {
|
||||
wxGetApp().toggle_show_outline();
|
||||
m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT));
|
||||
},
|
||||
this, [this]() { return m_tabpanel->GetSelection() == TabPosition::tp3DEditor; },
|
||||
[this]() { return wxGetApp().show_outline(); }, this);
|
||||
|
||||
/*viewMenu->AppendSeparator();
|
||||
append_menu_check_item(viewMenu, wxID_ANY, _L("Show &Wireframe") + "\tCtrl+Shift+Enter", _L("Show wireframes in 3D scene"),
|
||||
[this](wxCommandEvent&) { m_plater->toggle_show_wireframe(); m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT)); }, this,
|
||||
|
|
|
@ -535,7 +535,7 @@ void MediaFilePanel::doAction(size_t index, int action)
|
|||
if (fs->GetFileType() == PrinterFileSystem::F_MODEL) {
|
||||
if (index != -1) {
|
||||
auto dlg = new MediaProgressDialog(_L("Print"), this, [fs] { fs->FetchModelCancel(); });
|
||||
dlg->Update(0, _L("Fetching model infomations ..."));
|
||||
dlg->Update(0, _L("Fetching model information..."));
|
||||
fs->FetchModel(index, [this, fs, dlg, index](int result, std::string const &data) {
|
||||
dlg->Destroy();
|
||||
if (result == PrinterFileSystem::ERROR_CANCEL)
|
||||
|
|
|
@ -292,7 +292,7 @@ void MediaPlayCtrl::Play()
|
|||
|
||||
if (m_lan_proto <= MachineObject::LVL_Disable && (m_lan_mode || !m_remote_support)) {
|
||||
Stop(m_lan_proto == MachineObject::LVL_None
|
||||
? _L("Problem occured. Please update the printer firmware and try again.")
|
||||
? _L("Problem occurred. Please update the printer firmware and try again.")
|
||||
: _L("LAN Only Liveview is off. Please turn on the liveview on printer screen."));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -406,8 +406,8 @@ void Mouse3DController::load_config(const AppConfig &appconfig)
|
|||
params.zoom.scale = Params::DefaultZoomScale * std::clamp(zoom_speed, 0.1, 10.0);
|
||||
params.swap_yz = swap_yz;
|
||||
params.invert_x = invert_x;
|
||||
params.invert_y = invert_x;
|
||||
params.invert_z = invert_x;
|
||||
params.invert_y = invert_y;
|
||||
params.invert_z = invert_z;
|
||||
params.invert_yaw = invert_yaw;
|
||||
params.invert_pitch = invert_pitch;
|
||||
params.invert_roll = invert_roll;
|
||||
|
|
|
@ -27,11 +27,13 @@ const int HEADER_BORDER = 5;
|
|||
const int CONTENT_BORDER = 3;
|
||||
const int PANEL_WIDTH = 370;
|
||||
const int COLOR_LABEL_WIDTH = 180;
|
||||
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
||||
|
||||
#undef ICON_SIZE
|
||||
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
||||
#define MIN_OBJCOLOR_DIALOG_WIDTH FromDIP(400)
|
||||
#define FIX_SCROLL_HEIGTH FromDIP(400)
|
||||
#define BTN_SIZE wxSize(FromDIP(58), FromDIP(24))
|
||||
#define BTN_GAP FromDIP(20)
|
||||
#define BTN_SIZE wxSize(FromDIP(58), FromDIP(24))
|
||||
#define BTN_GAP FromDIP(20)
|
||||
|
||||
static void update_ui(wxWindow* window)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ ParamsDialog::ParamsDialog(wxWindow * parent)
|
|||
#else
|
||||
Hide();
|
||||
if (!m_editing_filament_id.empty()) {
|
||||
FilamentInfomation *filament_info = new FilamentInfomation();
|
||||
Filamentinformation *filament_info = new Filamentinformation();
|
||||
filament_info->filament_id = m_editing_filament_id;
|
||||
wxQueueEvent(wxGetApp().plater(), new SimpleEvent(EVT_MODIFY_FILAMENT, filament_info));
|
||||
m_editing_filament_id.clear();
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace GUI {
|
|||
|
||||
wxDECLARE_EVENT(EVT_MODIFY_FILAMENT, SimpleEvent);
|
||||
|
||||
class FilamentInfomation : public wxObject
|
||||
class Filamentinformation : public wxObject
|
||||
{
|
||||
public:
|
||||
std::string filament_id;
|
||||
|
|
|
@ -1035,6 +1035,13 @@ void PartPlate::render_icons(bool bottom, bool only_name, int hover_id)
|
|||
else
|
||||
render_icon_texture(m_plate_name_edit_icon.model, m_partplate_list->m_plate_name_edit_texture);
|
||||
|
||||
if (hover_id == 7) {
|
||||
render_icon_texture(m_move_front_icon.model, m_partplate_list->m_move_front_hovered_texture);
|
||||
show_tooltip(_u8L("Move plate to the front"));
|
||||
} else
|
||||
render_icon_texture(m_move_front_icon.model, m_partplate_list->m_move_front_texture);
|
||||
|
||||
|
||||
if (m_partplate_list->render_plate_settings) {
|
||||
bool has_plate_settings = get_bed_type() != BedType::btDefault || get_print_seq() != PrintSequence::ByDefault || !get_first_layer_print_sequence().empty() || !get_other_layers_print_sequence().empty() || has_spiral_mode_config();
|
||||
if (hover_id == 5) {
|
||||
|
@ -1336,6 +1343,7 @@ void PartPlate::register_raycasters_for_picking(GLCanvas3D &canvas)
|
|||
|
||||
canvas.remove_raycasters_for_picking(SceneRaycaster::EType::Bed, picking_id_component(6));
|
||||
register_model_for_picking(canvas, m_plate_name_edit_icon, picking_id_component(6));
|
||||
register_model_for_picking(canvas, m_move_front_icon, picking_id_component(7));
|
||||
}
|
||||
|
||||
int PartPlate::picking_id_component(int idx) const
|
||||
|
@ -2533,59 +2541,9 @@ void PartPlate::generate_print_polygon(ExPolygon &print_polygon)
|
|||
}
|
||||
};
|
||||
|
||||
int points_count = 8;
|
||||
if (m_shape.size() == 4)
|
||||
{
|
||||
//rectangle case
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const Vec2d& p = m_shape[i];
|
||||
Vec2d center;
|
||||
double start_angle, stop_angle, radius_x, radius_y, radius;
|
||||
switch (i) {
|
||||
case 0:
|
||||
radius = 5.f;
|
||||
center(0) = p(0) + radius;
|
||||
center(1) = p(1) + radius;
|
||||
start_angle = PI;
|
||||
stop_angle = 1.5 * PI;
|
||||
compute_points(center, radius, start_angle, stop_angle, points_count);
|
||||
break;
|
||||
case 1:
|
||||
print_polygon.contour.append({ scale_(p(0)), scale_(p(1)) });
|
||||
break;
|
||||
case 2:
|
||||
radius_x = (int)(p(0)) % 10;
|
||||
radius_y = (int)(p(1)) % 10;
|
||||
radius = (radius_x > radius_y)?radius_y: radius_x;
|
||||
if (radius < 5.0)
|
||||
radius = 5.f;
|
||||
center(0) = p(0) - radius;
|
||||
center(1) = p(1) - radius;
|
||||
start_angle = 0;
|
||||
stop_angle = 0.5 * PI;
|
||||
compute_points(center, radius, start_angle, stop_angle, points_count);
|
||||
break;
|
||||
case 3:
|
||||
radius_x = (int)(p(0)) % 10;
|
||||
radius_y = (int)(p(1)) % 10;
|
||||
radius = (radius_x > radius_y)?radius_y: radius_x;
|
||||
if (radius < 5.0)
|
||||
radius = 5.f;
|
||||
center(0) = p(0) + radius;
|
||||
center(1) = p(1) - radius;
|
||||
start_angle = 0.5 * PI;
|
||||
stop_angle = PI;
|
||||
compute_points(center, radius, start_angle, stop_angle, points_count);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const Vec2d& p : m_shape) {
|
||||
print_polygon.contour.append({ scale_(p(0)), scale_(p(1)) });
|
||||
for (const Vec2d& p : m_shape) {
|
||||
print_polygon.contour.append({scale_(p(0)), scale_(p(1))});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PartPlate::generate_exclude_polygon(ExPolygon &exclude_polygon)
|
||||
|
@ -2712,11 +2670,12 @@ bool PartPlate::set_shape(const Pointfs& shape, const Pointfs& exclude_areas, Ve
|
|||
calc_vertex_for_icons(2, m_arrange_icon);
|
||||
calc_vertex_for_icons(3, m_lock_icon);
|
||||
calc_vertex_for_icons(4, m_plate_settings_icon);
|
||||
calc_vertex_for_icons(5, m_move_front_icon);
|
||||
//calc_vertex_for_number(0, (m_plate_index < 9), m_plate_idx_icon);
|
||||
calc_vertex_for_number(0, false, m_plate_idx_icon);
|
||||
if (m_plater) {
|
||||
// calc vertex for plate name
|
||||
generate_plate_name_texture();
|
||||
generate_plate_name_texture();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3284,6 +3243,23 @@ void PartPlateList::generate_icon_textures()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// if (m_move_front_texture.get_id() == 0)
|
||||
{
|
||||
file_name = path + (m_is_dark ? "plate_move_front_dark.svg" : "plate_move_front.svg");
|
||||
if (!m_move_front_texture.load_from_svg_file(file_name, true, false, false, icon_size)) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(":load file %1% failed") % file_name;
|
||||
}
|
||||
}
|
||||
|
||||
// if (m_move_front_hovered_texture.get_id() == 0)
|
||||
{
|
||||
file_name = path + (m_is_dark ? "plate_move_front_hover_dark.svg" : "plate_move_front_hover.svg");
|
||||
if (!m_move_front_hovered_texture.load_from_svg_file(file_name, true, false, false, icon_size)) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(":load file %1% failed") % file_name;
|
||||
}
|
||||
}
|
||||
|
||||
//if (m_arrange_texture.get_id() == 0)
|
||||
{
|
||||
file_name = path + (m_is_dark ? "plate_arrange_dark.svg" : "plate_arrange.svg");
|
||||
|
@ -3419,6 +3395,8 @@ void PartPlateList::release_icon_textures()
|
|||
m_logo_texture.reset();
|
||||
m_del_texture.reset();
|
||||
m_del_hovered_texture.reset();
|
||||
m_move_front_hovered_texture.reset();
|
||||
m_move_front_texture.reset();
|
||||
m_arrange_texture.reset();
|
||||
m_arrange_hovered_texture.reset();
|
||||
m_orient_texture.reset();
|
||||
|
@ -3580,6 +3558,13 @@ void PartPlateList::reinit()
|
|||
/*basic plate operations*/
|
||||
//create an empty plate, and return its index
|
||||
//these model instances which are not in any plates should not be affected also
|
||||
|
||||
void PartPlateList::update_plates()
|
||||
{
|
||||
update_all_plates_pos_and_size(true, false);
|
||||
set_shapes(m_shape, m_exclude_areas, m_logo_texture_filename, m_height_to_lid, m_height_to_rod);
|
||||
}
|
||||
|
||||
int PartPlateList::create_plate(bool adjust_position)
|
||||
{
|
||||
PartPlate* plate = NULL;
|
||||
|
@ -3654,6 +3639,38 @@ int PartPlateList::create_plate(bool adjust_position)
|
|||
return new_index;
|
||||
}
|
||||
|
||||
|
||||
int PartPlateList::duplicate_plate(int index)
|
||||
{
|
||||
// create a new plate
|
||||
int new_plate_index = create_plate(true);
|
||||
PartPlate* old_plate = NULL;
|
||||
PartPlate* new_plate = NULL;
|
||||
old_plate = get_plate(index);
|
||||
new_plate = get_plate(new_plate_index);
|
||||
|
||||
// get the offset between plate centers
|
||||
Vec3d plate_to_plate_offset = new_plate->m_origin - old_plate->m_origin;
|
||||
|
||||
// iterate over all the objects in this plate
|
||||
ModelObjectPtrs obj_ptrs = old_plate->get_objects_on_this_plate();
|
||||
for (ModelObject* object : obj_ptrs){
|
||||
// copy and move the object to the same relative position in the new plate
|
||||
ModelObject* object_copy = m_model->add_object(*object);
|
||||
int new_obj_id = new_plate->m_model->objects.size() - 1;
|
||||
// go over the instances and pair with the object
|
||||
for (size_t new_instance_id = 0; new_instance_id < object_copy->instances.size(); new_instance_id++){
|
||||
new_plate->obj_to_instance_set.emplace(std::pair(new_obj_id, new_instance_id));
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": duplicate object into plate: index_pair [%1%,%2%], obj_id %3%") % new_obj_id % new_instance_id % object_copy->id().id;
|
||||
}
|
||||
}
|
||||
new_plate->translate_all_instance(plate_to_plate_offset);
|
||||
// update the plates
|
||||
wxGetApp().obj_list()->reload_all_plates();
|
||||
return new_plate_index;
|
||||
}
|
||||
|
||||
|
||||
//destroy print's objects and results
|
||||
int PartPlateList::destroy_print(int print_index)
|
||||
{
|
||||
|
@ -4781,7 +4798,7 @@ void PartPlateList::render(const Transform3d& view_matrix, const Transform3d& pr
|
|||
if (m_is_dark != last_dark_mode_status) {
|
||||
last_dark_mode_status = m_is_dark;
|
||||
generate_icon_textures();
|
||||
}else if(m_del_texture.get_id() == 0)
|
||||
} else if(m_del_texture.get_id() == 0)
|
||||
generate_icon_textures();
|
||||
for (it = m_plate_list.begin(); it != m_plate_list.end(); it++) {
|
||||
int current_index = (*it)->get_index();
|
||||
|
@ -5481,6 +5498,7 @@ void PartPlateList::BedTextureInfo::reset()
|
|||
|
||||
void PartPlateList::init_bed_type_info()
|
||||
{
|
||||
BedTextureInfo::TexturePart pct_part_left(10, 130, 10, 110, "orca_bed_pct_left.svg");
|
||||
BedTextureInfo::TexturePart pc_part1(10, 130, 10, 110, "bbl_bed_pc_left.svg");
|
||||
BedTextureInfo::TexturePart pc_part2(74, -10, 148, 12, "bbl_bed_pc_bottom.svg");
|
||||
BedTextureInfo::TexturePart ep_part1(7.5, 90, 12.5, 150, "bbl_bed_ep_left.svg");
|
||||
|
@ -5495,6 +5513,8 @@ void PartPlateList::init_bed_type_info()
|
|||
}
|
||||
bed_texture_info[btPC].parts.push_back(pc_part1);
|
||||
bed_texture_info[btPC].parts.push_back(pc_part2);
|
||||
bed_texture_info[btPCT].parts.push_back(pct_part_left);
|
||||
bed_texture_info[btPCT].parts.push_back(pc_part2);
|
||||
bed_texture_info[btEP].parts.push_back(ep_part1);
|
||||
bed_texture_info[btEP].parts.push_back(ep_part2);
|
||||
bed_texture_info[btPEI].parts.push_back(pei_part1);
|
||||
|
|
|
@ -141,6 +141,7 @@ private:
|
|||
PickingModel m_lock_icon;
|
||||
PickingModel m_plate_settings_icon;
|
||||
PickingModel m_plate_name_edit_icon;
|
||||
PickingModel m_move_front_icon;
|
||||
GLModel m_plate_idx_icon;
|
||||
GLTexture m_texture;
|
||||
|
||||
|
@ -199,7 +200,7 @@ private:
|
|||
public:
|
||||
static const unsigned int PLATE_BASE_ID = 255 * 255 * 253;
|
||||
static const unsigned int PLATE_NAME_HOVER_ID = 6;
|
||||
static const unsigned int GRABBER_COUNT = 7;
|
||||
static const unsigned int GRABBER_COUNT = 8;
|
||||
|
||||
static ColorRGBA SELECT_COLOR;
|
||||
static ColorRGBA UNSELECT_COLOR;
|
||||
|
@ -546,6 +547,8 @@ class PartPlateList : public ObjectBase
|
|||
GLTexture m_logo_texture;
|
||||
GLTexture m_del_texture;
|
||||
GLTexture m_del_hovered_texture;
|
||||
GLTexture m_move_front_hovered_texture;
|
||||
GLTexture m_move_front_texture;
|
||||
GLTexture m_arrange_texture;
|
||||
GLTexture m_arrange_hovered_texture;
|
||||
GLTexture m_orient_texture;
|
||||
|
@ -656,10 +659,16 @@ public:
|
|||
height = m_plate_height;
|
||||
}
|
||||
|
||||
// Pantheon: update plates after moving plate to the front
|
||||
void update_plates();
|
||||
|
||||
/*basic plate operations*/
|
||||
//create an empty plate and return its index
|
||||
int create_plate(bool adjust_position = true);
|
||||
|
||||
// duplicate plate
|
||||
int duplicate_plate(int index);
|
||||
|
||||
//destroy print which has the index of print_index
|
||||
int destroy_print(int print_index);
|
||||
|
||||
|
|
|
@ -1284,21 +1284,24 @@ void Sidebar::update_all_preset_comboboxes()
|
|||
|
||||
//p->m_staticText_filament_settings->Update();
|
||||
|
||||
|
||||
if (is_bbl_vendor || cfg.opt_bool("support_multi_bed_types")) {
|
||||
m_bed_type_list->Enable();
|
||||
auto str_bed_type = wxGetApp().app_config->get_printer_setting(wxGetApp().preset_bundle->printers.get_selected_preset_name(),
|
||||
"curr_bed_type");
|
||||
if (!str_bed_type.empty()) {
|
||||
int bed_type_value = atoi(str_bed_type.c_str());
|
||||
if (bed_type_value == 0)
|
||||
bed_type_value = 1;
|
||||
m_bed_type_list->SelectAndNotify(bed_type_value - 1);
|
||||
} else {
|
||||
BedType bed_type = preset_bundle.printers.get_edited_preset().get_default_bed_type(&preset_bundle);
|
||||
m_bed_type_list->SelectAndNotify((int) bed_type - 1);
|
||||
// Orca: don't update bed type if loading project
|
||||
if (!p->plater->is_loading_project()) {
|
||||
auto str_bed_type = wxGetApp().app_config->get_printer_setting(wxGetApp().preset_bundle->printers.get_selected_preset_name(),
|
||||
"curr_bed_type");
|
||||
if (!str_bed_type.empty()) {
|
||||
int bed_type_value = atoi(str_bed_type.c_str());
|
||||
if (bed_type_value == 0)
|
||||
bed_type_value = 1;
|
||||
m_bed_type_list->SelectAndNotify(bed_type_value - 1);
|
||||
} else {
|
||||
BedType bed_type = preset_bundle.printers.get_edited_preset().get_default_bed_type(&preset_bundle);
|
||||
m_bed_type_list->SelectAndNotify((int) bed_type - 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Orca: combobox don't have the btDefault option, so we need to -1
|
||||
m_bed_type_list->SelectAndNotify(btPEI - 1);
|
||||
m_bed_type_list->Disable();
|
||||
}
|
||||
|
@ -1789,7 +1792,7 @@ void Sidebar::sync_ams_list()
|
|||
|
||||
// BBS:Record consumables information before synchronization
|
||||
std::vector<string> color_before_sync;
|
||||
std::vector<int> is_support_before;
|
||||
std::vector<bool> is_support_before;
|
||||
DynamicPrintConfig& project_config = wxGetApp().preset_bundle->project_config;
|
||||
ConfigOptionStrings* color_opt = project_config.option<ConfigOptionStrings>("filament_colour");
|
||||
for (int i = 0; i < p->combos_filament.size(); ++i) {
|
||||
|
@ -2770,7 +2773,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
|
||||
"printable_area", "bed_exclude_area", "bed_custom_texture", "bed_custom_model", "print_sequence",
|
||||
"extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
|
||||
"nozzle_height", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance",
|
||||
"nozzle_height", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle",
|
||||
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material", "preferred_orientation",
|
||||
"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",
|
||||
|
@ -2951,19 +2954,19 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
view3D_canvas->Bind(EVT_GLCANVAS_PLATE_RIGHT_CLICK, &priv::on_plate_right_click, this);
|
||||
view3D_canvas->Bind(EVT_GLCANVAS_REMOVE_OBJECT, [q](SimpleEvent&) { q->remove_selected(); });
|
||||
view3D_canvas->Bind(EVT_GLCANVAS_ARRANGE, [this](SimpleEvent& evt) {
|
||||
//BBS arrage from EVT set default state.
|
||||
//BBS arrange from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_DEFAULT);
|
||||
this->q->arrange(); });
|
||||
view3D_canvas->Bind(EVT_GLCANVAS_ARRANGE_PARTPLATE, [this](SimpleEvent& evt) {
|
||||
//BBS arrage from EVT set default state.
|
||||
//BBS arrange from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_MENU);
|
||||
this->q->arrange(); });
|
||||
view3D_canvas->Bind(EVT_GLCANVAS_ORIENT, [this](SimpleEvent& evt) {
|
||||
//BBS oriant from EVT set default state.
|
||||
//BBS orient from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_DEFAULT);
|
||||
this->q->orient(); });
|
||||
view3D_canvas->Bind(EVT_GLCANVAS_ORIENT_PARTPLATE, [this](SimpleEvent& evt) {
|
||||
//BBS oriant from EVT set default state.
|
||||
//BBS orient from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_MENU);
|
||||
this->q->orient(); });
|
||||
//BBS
|
||||
|
@ -3002,11 +3005,11 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
view3D_canvas->Bind(EVT_GLTOOLBAR_ADD_PLATE, &priv::on_action_add_plate, this);
|
||||
view3D_canvas->Bind(EVT_GLTOOLBAR_DEL_PLATE, &priv::on_action_del_plate, this);
|
||||
view3D_canvas->Bind(EVT_GLTOOLBAR_ORIENT, [this](SimpleEvent&) {
|
||||
//BBS arrage from EVT set default state.
|
||||
//BBS arrange from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_DEFAULT);
|
||||
this->q->orient(); });
|
||||
view3D_canvas->Bind(EVT_GLTOOLBAR_ARRANGE, [this](SimpleEvent&) {
|
||||
//BBS arrage from EVT set default state.
|
||||
//BBS arrange from EVT set default state.
|
||||
this->q->set_prepare_state(Job::PREPARE_STATE_DEFAULT);
|
||||
this->q->arrange();
|
||||
});
|
||||
|
@ -4765,7 +4768,7 @@ wxString Plater::priv::get_export_file(GUI::FileType file_type)
|
|||
wxString out_path = dlg.GetPath();
|
||||
fs::path path(into_path(out_path));
|
||||
#ifdef __WXMSW__
|
||||
if (path.extension() != output_file.extension()) {
|
||||
if (boost::iequals(path.extension().string(), output_file.extension().string()) == false) {
|
||||
out_path += output_file.extension().string();
|
||||
boost::system::error_code ec;
|
||||
if (boost::filesystem::exists(into_u8(out_path), ec)) {
|
||||
|
@ -8300,7 +8303,7 @@ void Plater::priv::on_create_filament(SimpleEvent &)
|
|||
|
||||
void Plater::priv::on_modify_filament(SimpleEvent &evt)
|
||||
{
|
||||
FilamentInfomation *filament_info = static_cast<FilamentInfomation *>(evt.GetEventObject());
|
||||
Filamentinformation *filament_info = static_cast<Filamentinformation *>(evt.GetEventObject());
|
||||
int res;
|
||||
std::shared_ptr<Preset> need_edit_preset;
|
||||
{
|
||||
|
@ -8826,7 +8829,7 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_
|
|||
auto check = [&transfer_preset_changes](bool yes_or_no) {
|
||||
wxString header = _L("Some presets are modified.") + "\n" +
|
||||
(yes_or_no ? _L("You can keep the modified presets to the new project or discard them") :
|
||||
_L("You can keep the modifield presets to the new project, discard or save changes as new presets."));
|
||||
_L("You can keep the modified presets to the new project, discard or save changes as new presets."));
|
||||
int act_buttons = ActionButtons::KEEP | ActionButtons::REMEMBER_CHOISE;
|
||||
if (!yes_or_no)
|
||||
act_buttons |= ActionButtons::SAVE;
|
||||
|
@ -9722,7 +9725,17 @@ auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config
|
|||
obj_name = obj_name.substr(9);
|
||||
if (obj_name[0] == 'm')
|
||||
obj_name[0] = '-';
|
||||
auto modifier = stof(obj_name);
|
||||
// Orca: force set locale to C to avoid parsing error
|
||||
const std::string _loc = std::setlocale(LC_NUMERIC, nullptr);
|
||||
std::setlocale(LC_NUMERIC,"C");
|
||||
auto modifier = 1.0f;
|
||||
try {
|
||||
modifier = stof(obj_name);
|
||||
} catch (...) {
|
||||
}
|
||||
// restore locale
|
||||
std::setlocale(LC_NUMERIC, _loc.c_str());
|
||||
|
||||
if(linear)
|
||||
_obj->config.set_key_value("print_flow_ratio", new ConfigOptionFloat((cur_flowrate + modifier)/cur_flowrate));
|
||||
else
|
||||
|
@ -10848,7 +10861,7 @@ bool Plater::load_files(const wxArrayString& filenames)
|
|||
|
||||
case LoadFilesType::Multiple3MFOther:
|
||||
for (const auto &path : normal_paths) {
|
||||
if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) {
|
||||
if (boost::iends_with(path.filename().string(), ".3mf")){
|
||||
if (first_file.size() <= 0)
|
||||
first_file.push_back(path);
|
||||
else
|
||||
|
@ -10928,7 +10941,9 @@ int Plater::get_3mf_file_count(std::vector<fs::path> paths)
|
|||
{
|
||||
auto count = 0;
|
||||
for (const auto &path : paths) {
|
||||
if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) count++;
|
||||
if (boost::iends_with(path.filename().string(), ".3mf")) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
@ -11007,7 +11022,7 @@ void Plater::add_file()
|
|||
}
|
||||
case LoadFilesType::Multiple3MFOther:
|
||||
for (const auto &path : paths) {
|
||||
if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) {
|
||||
if (boost::iends_with(path.filename().string(), ".3mf")) {
|
||||
if (first_file.size() <= 0)
|
||||
first_file.push_back(path);
|
||||
else
|
||||
|
@ -11671,14 +11686,37 @@ void Plater::export_stl(bool extended, bool selection_only, bool multi_stls)
|
|||
}
|
||||
|
||||
// Following lambda generates a combined mesh for export with normals pointing outwards.
|
||||
auto mesh_to_export_fff_no_boolean = [](const ModelObject &mo, int instance_id) {
|
||||
auto mesh_to_export_fff_no_boolean = [this](const ModelObject &mo, int instance_id) {
|
||||
TriangleMesh mesh;
|
||||
for (const ModelVolume *v : mo.volumes)
|
||||
if (v->is_model_part()) {
|
||||
TriangleMesh vol_mesh(v->mesh());
|
||||
vol_mesh.transform(v->get_matrix(), true);
|
||||
mesh.merge(vol_mesh);
|
||||
}
|
||||
|
||||
//Prusa export negative parts
|
||||
std::vector<csg::CSGPart> csgmesh;
|
||||
csgmesh.reserve(2 * mo.volumes.size());
|
||||
csg::model_to_csgmesh(mo, Transform3d::Identity(), std::back_inserter(csgmesh),
|
||||
csg::mpartsPositive | csg::mpartsNegative | csg::mpartsDoSplits);
|
||||
|
||||
auto csgrange = range(csgmesh);
|
||||
if (csg::is_all_positive(csgrange)) {
|
||||
mesh = TriangleMesh{csg::csgmesh_merge_positive_parts(csgrange)};
|
||||
} else if (std::get<2>(csg::check_csgmesh_booleans(csgrange)) == csgrange.end()) {
|
||||
try {
|
||||
auto cgalm = csg::perform_csgmesh_booleans(csgrange);
|
||||
mesh = MeshBoolean::cgal::cgal_to_triangle_mesh(*cgalm);
|
||||
} catch (...) {}
|
||||
}
|
||||
|
||||
if (mesh.empty()) {
|
||||
get_notification_manager()->push_plater_error_notification(
|
||||
_u8L("Unable to perform boolean operation on model meshes. "
|
||||
"Only positive parts will be exported."));
|
||||
|
||||
for (const ModelVolume* v : mo.volumes)
|
||||
if (v->is_model_part()) {
|
||||
TriangleMesh vol_mesh(v->mesh());
|
||||
vol_mesh.transform(v->get_matrix(), true);
|
||||
mesh.merge(vol_mesh);
|
||||
}
|
||||
}
|
||||
if (instance_id == -1) {
|
||||
TriangleMesh vols_mesh(mesh);
|
||||
mesh = TriangleMesh();
|
||||
|
@ -13382,8 +13420,10 @@ void Plater::clone_selection()
|
|||
}
|
||||
Selection& selection = p->get_selection();
|
||||
selection.clone(res);
|
||||
if (wxGetApp().app_config->get("auto_arrange") == "true")
|
||||
if (wxGetApp().app_config->get("auto_arrange") == "true") {
|
||||
this->set_prepare_state(Job::PREPARE_STATE_MENU);
|
||||
this->arrange();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Vec2f> Plater::get_empty_cells(const Vec2f step)
|
||||
|
@ -13986,7 +14026,18 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
|||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "can not select plate %1%" << plate_index;
|
||||
ret = -1;
|
||||
}
|
||||
} else if ((action == 7) && (!right_click)) {
|
||||
// move plate to the front
|
||||
take_snapshot("move plate to the front");
|
||||
ret = p->partplate_list.move_plate_to_index(plate_index,0);
|
||||
p->partplate_list.update_slice_context_to_current_plate(p->background_process);
|
||||
p->preview->update_gcode_result(p->partplate_list.get_current_slice_result());
|
||||
p->sidebar->obj_list()->reload_all_plates();
|
||||
p->partplate_list.update_plates();
|
||||
update();
|
||||
p->partplate_list.select_plate(0);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "invalid action %1%, with right_click=%2%" << action << right_click;
|
||||
|
@ -13997,6 +14048,19 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi
|
|||
return ret;
|
||||
}
|
||||
|
||||
int Plater::duplicate_plate(int plate_index)
|
||||
{
|
||||
int index = plate_index, ret;
|
||||
if (plate_index == -1)
|
||||
index = p->partplate_list.get_curr_plate_index();
|
||||
|
||||
ret = p->partplate_list.duplicate_plate(index);
|
||||
|
||||
//need to call update
|
||||
update();
|
||||
return ret;
|
||||
}
|
||||
|
||||
//BBS: delete the plate, index= -1 means the current plate
|
||||
int Plater::delete_plate(int plate_index)
|
||||
{
|
||||
|
|
|
@ -599,6 +599,7 @@ public:
|
|||
int select_plate_by_hover_id(int hover_id, bool right_click = false, bool isModidyPlateName = false);
|
||||
//BBS: delete the plate, index= -1 means the current plate
|
||||
int delete_plate(int plate_index = -1);
|
||||
int duplicate_plate(int plate_index = -1);
|
||||
//BBS: select the sliced plate by index
|
||||
int select_sliced_plate(int plate_index);
|
||||
//BBS: set bed positions
|
||||
|
@ -780,6 +781,8 @@ public:
|
|||
};
|
||||
std::atomic<bool> m_arrange_running{false};
|
||||
|
||||
bool is_loading_project() const { return m_loading_project; }
|
||||
|
||||
private:
|
||||
struct priv;
|
||||
std::unique_ptr<priv> p;
|
||||
|
|
|
@ -1130,7 +1130,7 @@ wxWindow* PreferencesDialog::create_general_page()
|
|||
auto item_show_splash_screen = create_item_checkbox(_L("Show splash screen"), page, _L("Show the splash screen during startup."), 50, "show_splash_screen");
|
||||
auto item_hints = create_item_checkbox(_L("Show \"Tip of the day\" notification after start"), page, _L("If enabled, useful hints are displayed at startup."), 50, "show_hints");
|
||||
|
||||
auto item_calc_mode = create_item_checkbox(_L("Flushing volumes: Auto-calculate everytime the color changed."), page, _L("If enabled, auto-calculate everytime the color changed."), 50, "auto_calculate");
|
||||
auto item_calc_mode = create_item_checkbox(_L("Flushing volumes: Auto-calculate every time the color changed."), page, _L("If enabled, auto-calculate every time the color changed."), 50, "auto_calculate");
|
||||
auto item_calc_in_long_retract = create_item_checkbox(_L("Flushing volumes: Auto-calculate every time when the filament is changed."), page, _L("If enabled, auto-calculate every time when filament is changed"), 50, "auto_calculate_when_filament_change");
|
||||
auto item_remember_printer_config = create_item_checkbox(_L("Remember printer configuration"), page, _L("If enabled, Orca will remember and switch filament/process configuration for each printer automatically."), 50, "remember_printer_config");
|
||||
auto item_multi_machine = create_item_checkbox(_L("Multi-device Management(Take effect after restarting Orca)."), page, _L("With this option enabled, you can send a task to multiple devices at the same time and manage multiple devices."), 50, "enable_multi_machine");
|
||||
|
@ -1177,7 +1177,7 @@ wxWindow* PreferencesDialog::create_general_page()
|
|||
// auto item_backup = create_item_switch(_L("Backup switch"), page, _L("Backup switch"), "units");
|
||||
auto item_gcodes_warning = create_item_checkbox(_L("No warnings when loading 3MF with modified G-codes"), page,_L("No warnings when loading 3MF with modified G-codes"), 50, "no_warn_when_modified_gcodes");
|
||||
auto item_backup = create_item_checkbox(_L("Auto-Backup"), page,_L("Backup your project periodically for restoring from the occasional crash."), 50, "backup_switch");
|
||||
auto item_backup_interval = create_item_backup_input(_L("every"), page, _L("The peroid of backup in seconds."), "backup_interval");
|
||||
auto item_backup_interval = create_item_backup_input(_L("every"), page, _L("The period of backup in seconds."), "backup_interval");
|
||||
|
||||
//downloads
|
||||
auto title_downloads = create_item_title(_L("Downloads"), page, _L("Downloads"));
|
||||
|
|
|
@ -24,7 +24,7 @@ static wxString PUBLISH_STEP_STRING[STEP_COUNT] = {
|
|||
_L("Jump to model publish web page")
|
||||
};
|
||||
|
||||
static wxString NOTE_STRING = _L("Note: The preparation may takes several minutes. Please be patiant.");
|
||||
static wxString NOTE_STRING = _L("Note: The preparation may takes several minutes. Please be patient.");
|
||||
|
||||
PublishDialog::PublishDialog(Plater *plater)
|
||||
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, _L("Publish"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
|
||||
|
|
|
@ -31,14 +31,13 @@ void NotificationManager::SlicingProgressNotification::init()
|
|||
m_endlines.push_back(0);
|
||||
}
|
||||
if (m_lines_count >= 2) {
|
||||
m_lines_count = 3;
|
||||
m_lines_count = std::min((size_t)3, m_lines_count);
|
||||
m_multiline = true;
|
||||
while (m_endlines.size() < 3)
|
||||
while (m_endlines.size() < m_lines_count)
|
||||
m_endlines.push_back(m_endlines.back());
|
||||
}
|
||||
else {
|
||||
m_lines_count = 2;
|
||||
m_endlines.push_back(m_endlines.back());
|
||||
m_lines_count = 1;
|
||||
m_multiline = false;
|
||||
}
|
||||
if (m_state == EState::Shown)
|
||||
|
@ -222,7 +221,7 @@ void NotificationManager::SlicingProgressNotification::render(GLCanvas3D& canvas
|
|||
const ImVec2 dailytips_child_window_padding = m_dailytips_panel->is_expanded() ? ImVec2(15.f, 10.f) * scale : ImVec2(15.f, 0.f) * scale;
|
||||
const ImVec2 bottom_padding = ImVec2(0.f, 0.f) * scale;
|
||||
const float progress_panel_width = (m_window_width - 2 * progress_child_window_padding.x);
|
||||
const float progress_panel_height = (58.0f * scale);
|
||||
const float progress_panel_height = (58.0f * scale) + (m_lines_count - 1) * m_line_height;
|
||||
const float dailytips_panel_width = (m_window_width - 2 * dailytips_child_window_padding.x);
|
||||
const float gcodeviewer_height = wxGetApp().plater()->get_preview_canvas3D()->get_gcode_viewer().get_legend_height();
|
||||
//const float dailytips_panel_height = std::min(380.0f * scale, std::max(90.0f, (cnv_size.get_height() - gcodeviewer_height - progress_panel_height - dailytips_child_window_padding.y - initial_y - m_line_height * 4)));
|
||||
|
@ -272,11 +271,12 @@ void NotificationManager::SlicingProgressNotification::render(GLCanvas3D& canvas
|
|||
if (ImGui::BeginChild(child_name.c_str(), ImVec2(progress_panel_width, progress_panel_height), false, child_window_flags)) {
|
||||
ImVec2 child_window_pos = ImGui::GetWindowPos();
|
||||
ImVec2 button_size = ImVec2(38.f, 38.f) * scale;
|
||||
ImVec2 button_pos = child_window_pos + ImVec2(progress_panel_width - button_size.x, (progress_panel_height - button_size.y) / 2.0f);
|
||||
float margin_x = 8.0f * scale;
|
||||
ImVec2 progress_bar_pos = child_window_pos + ImVec2(0, progress_panel_height / 2.0f);
|
||||
ImVec2 progress_bar_size = ImVec2(progress_panel_width - button_size.x - margin_x, 4.0f * scale);
|
||||
ImVec2 text_pos = ImVec2(progress_bar_pos.x, progress_bar_pos.y - m_line_height * 1.2f);
|
||||
float text_bottom = progress_bar_size.y + m_line_height * 1.2f + 7.f * scale;
|
||||
ImVec2 progress_bar_pos = child_window_pos + ImVec2(0, progress_panel_height - text_bottom);
|
||||
ImVec2 button_pos = child_window_pos + ImVec2(progress_panel_width - button_size.x, progress_panel_height - text_bottom - button_size.y / 2.0f);
|
||||
ImVec2 text_pos = ImVec2(progress_bar_pos.x, progress_bar_pos.y - m_line_height * (1.2f + m_lines_count - 1));
|
||||
|
||||
render_text(text_pos);
|
||||
render_close_button(button_pos, button_size);
|
||||
|
@ -353,9 +353,13 @@ void Slic3r::GUI::NotificationManager::SlicingProgressNotification::render_text(
|
|||
imgui.pop_bold_font();
|
||||
}
|
||||
if(m_sp_state == SlicingProgressState::SP_PROGRESS) {
|
||||
//one line text
|
||||
ImGui::SetCursorScreenPos(pos);
|
||||
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
||||
// multi-line text
|
||||
int last_end = 0;
|
||||
for (auto i = 0; i < m_lines_count; i++) {
|
||||
ImGui::SetCursorScreenPos(pos + ImVec2(0, i * m_line_height));
|
||||
imgui.text(m_text1.substr(last_end, m_endlines[i] - last_end).c_str());
|
||||
last_end = m_endlines[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4908,7 +4908,7 @@ wxBoxSizer *ScoreDialog::get_button_sizer()
|
|||
int need_upload_nums = need_upload_images.size();
|
||||
int upload_nums = 0;
|
||||
int upload_failed_nums = 0;
|
||||
ProgressDialog *progress_dialog = new ProgressDialog(_L("Upload Pictrues"), _L("Number of images successfully uploaded") + ": " + std::to_string(upload_nums) + "/" + std::to_string(need_upload_nums), need_upload_nums, this);
|
||||
ProgressDialog *progress_dialog = new ProgressDialog(_L("Upload Pictures"), _L("Number of images successfully uploaded") + ": " + std::to_string(upload_nums) + "/" + std::to_string(need_upload_nums), need_upload_nums, this);
|
||||
for (std::set<std::pair<wxStaticBitmap *, wxString>>::iterator it = need_upload_images.begin(); it != need_upload_images.end();) {
|
||||
std::pair<wxStaticBitmap *, wxString> need_upload = *it;
|
||||
std::string need_upload_uf8 = into_u8(need_upload.second);
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace GUI {
|
|||
|
||||
#define DISABLE_UNDO_SYS
|
||||
|
||||
static const std::vector<std::string> plate_keys = { "curr_bed_type", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"};
|
||||
static const std::vector<std::string> plate_keys = { "curr_bed_type", "skirt_start_angle", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"};
|
||||
|
||||
void Tab::Highlighter::set_timer_owner(wxEvtHandler* owner, int timerid/* = wxID_ANY*/)
|
||||
{
|
||||
|
@ -1439,7 +1439,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
||||
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
|
||||
if (!boost::any_cast<bool>(value) && timelapse_enabled) {
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required for smooth timeplase. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
|
||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_NO) {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
|
@ -2141,6 +2141,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("bridge_angle");
|
||||
optgroup->append_single_option_line("minimum_sparse_infill_area");
|
||||
optgroup->append_single_option_line("infill_combination");
|
||||
optgroup->append_single_option_line("infill_combination_max_layer_height");
|
||||
optgroup->append_single_option_line("detect_narrow_internal_solid_infill");
|
||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
||||
|
||||
|
@ -2163,7 +2164,8 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("support_interface_speed");
|
||||
optgroup = page->new_optgroup(L("Overhang speed"), L"param_overhang_speed", 15);
|
||||
optgroup->append_single_option_line("enable_overhang_speed", "slow-down-for-overhang");
|
||||
optgroup->append_single_option_line("overhang_speed_classic", "slow-down-for-overhang");
|
||||
// Orca: DEPRECATED
|
||||
// optgroup->append_single_option_line("overhang_speed_classic", "slow-down-for-overhang");
|
||||
optgroup->append_single_option_line("slowdown_for_curled_perimeters");
|
||||
Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") };
|
||||
line.label_path = "slow-down-for-overhang";
|
||||
|
@ -2311,9 +2313,11 @@ void TabPrint::build()
|
|||
|
||||
page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only visible on placeholders
|
||||
optgroup = page->new_optgroup(L("Skirt"), L"param_skirt");
|
||||
optgroup->append_single_option_line("skirt_type");
|
||||
optgroup->append_single_option_line("skirt_loops");
|
||||
optgroup->append_single_option_line("min_skirt_length");
|
||||
optgroup->append_single_option_line("skirt_distance");
|
||||
optgroup->append_single_option_line("skirt_start_angle");
|
||||
optgroup->append_single_option_line("skirt_height");
|
||||
optgroup->append_single_option_line("skirt_speed");
|
||||
optgroup->append_single_option_line("draft_shield");
|
||||
|
@ -2782,6 +2786,7 @@ void TabPrintPlate::build()
|
|||
auto page = add_options_page(L("Plate Settings"), "empty");
|
||||
auto optgroup = page->new_optgroup("");
|
||||
optgroup->append_single_option_line("curr_bed_type");
|
||||
optgroup->append_single_option_line("skirt_start_angle");
|
||||
optgroup->append_single_option_line("print_sequence");
|
||||
optgroup->append_single_option_line("spiral_mode");
|
||||
optgroup->append_single_option_line("first_layer_sequence_choice");
|
||||
|
@ -2830,6 +2835,8 @@ void TabPrintPlate::on_value_change(const std::string& opt_key, const boost::any
|
|||
auto plate = dynamic_cast<PartPlate*>(plate_item.first);
|
||||
if (k == "curr_bed_type")
|
||||
plate->reset_bed_type();
|
||||
if (k == "skirt_start_angle")
|
||||
plate->config()->erase("skirt_start_angle");
|
||||
if (k == "print_sequence")
|
||||
plate->set_print_seq(PrintSequence::ByDefault);
|
||||
if (k == "first_layer_sequence_choice")
|
||||
|
@ -2853,6 +2860,10 @@ void TabPrintPlate::on_value_change(const std::string& opt_key, const boost::any
|
|||
bed_type = m_config->opt_enum<BedType>("curr_bed_type");
|
||||
plate->set_bed_type(BedType(bed_type));
|
||||
}
|
||||
if (k == "skirt_start_angle") {
|
||||
float angle = m_config->opt_float("skirt_start_angle");
|
||||
plate->config()->set_key_value("skirt_start_angle", new ConfigOptionFloat(angle));
|
||||
}
|
||||
if (k == "print_sequence") {
|
||||
print_seq = m_config->opt_enum<PrintSequence>("print_sequence");
|
||||
plate->set_print_seq(print_seq);
|
||||
|
@ -3263,6 +3274,7 @@ void TabFilament::build()
|
|||
|
||||
optgroup->append_single_option_line("filament_density");
|
||||
optgroup->append_single_option_line("filament_shrink");
|
||||
optgroup->append_single_option_line("filament_shrinkage_compensation_z");
|
||||
optgroup->append_single_option_line("filament_cost");
|
||||
//BBS
|
||||
optgroup->append_single_option_line("temperature_vitrification");
|
||||
|
@ -3321,6 +3333,11 @@ void TabFilament::build()
|
|||
line.append_option(optgroup->get_option("cool_plate_temp"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Textured Cool plate"), L("Bed temperature when cool plate is installed. Value 0 means the filament does not support to print on the Textured Cool Plate") };
|
||||
line.append_option(optgroup->get_option("textured_cool_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("textured_cool_plate_temp"));
|
||||
optgroup->append_line(line);
|
||||
|
||||
line = { L("Engineering plate"), L("Bed temperature when engineering plate is installed. Value 0 means the filament does not support to print on the Engineering Plate") };
|
||||
line.append_option(optgroup->get_option("eng_plate_temp_initial_layer"));
|
||||
line.append_option(optgroup->get_option("eng_plate_temp"));
|
||||
|
@ -3584,6 +3601,7 @@ void TabFilament::toggle_options()
|
|||
toggle_option("pressure_advance", pa);
|
||||
auto support_multi_bed_types = is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
|
||||
toggle_line("cool_plate_temp_initial_layer", support_multi_bed_types );
|
||||
toggle_line("textured_cool_plate_temp_initial_layer", support_multi_bed_types);
|
||||
toggle_line("eng_plate_temp_initial_layer", support_multi_bed_types);
|
||||
toggle_line("textured_plate_temp_initial_layer", support_multi_bed_types);
|
||||
|
||||
|
@ -4124,7 +4142,7 @@ if (is_marlin_flavor)
|
|||
if (from_initial_build) {
|
||||
// create a page, but pretend it's an extruder page, so we can add it to m_pages ourselves
|
||||
auto page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material", true); // ORCA: icon only visible on placeholders
|
||||
auto optgroup = page->new_optgroup(L("Single extruder multimaterial setup"), "param_multi_material");
|
||||
auto optgroup = page->new_optgroup(L("Single extruder multi-material setup"), "param_multi_material");
|
||||
optgroup->append_single_option_line("single_extruder_multi_material", "semm");
|
||||
ConfigOptionDef def;
|
||||
def.type = coInt, def.set_default_value(new ConfigOptionInt((int) m_extruders_count));
|
||||
|
@ -4213,7 +4231,7 @@ if (is_marlin_flavor)
|
|||
optgroup->append_single_option_line("enable_filament_ramming", "semm");
|
||||
|
||||
|
||||
optgroup = page->new_optgroup(L("Single extruder multimaterial parameters"), "param_settings");
|
||||
optgroup = page->new_optgroup(L("Single extruder multi-material parameters"), "param_settings");
|
||||
optgroup->append_single_option_line("cooling_tube_retraction", "semm");
|
||||
optgroup->append_single_option_line("cooling_tube_length", "semm");
|
||||
optgroup->append_single_option_line("parking_pos_retraction", "semm");
|
||||
|
@ -4261,7 +4279,7 @@ if (is_marlin_flavor)
|
|||
// if value was changed
|
||||
if (fabs(nozzle_diameters[extruder_idx == 0 ? 1 : 0] - new_nd) > EPSILON)
|
||||
{
|
||||
const wxString msg_text = _(L("This is a single extruder multimaterial printer, diameters of all extruders "
|
||||
const wxString msg_text = _(L("This is a single extruder multi-material printer, diameters of all extruders "
|
||||
"will be set to the new value. Do you want to proceed?"));
|
||||
//wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
|
||||
MessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
|
||||
|
@ -4474,7 +4492,7 @@ void TabPrinter::toggle_options()
|
|||
toggle_line(el, is_BBL_printer);
|
||||
|
||||
// SoftFever: hide non-BBL settings
|
||||
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer"})
|
||||
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer", "bed_mesh_max", "bed_mesh_min", "bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "thumbnails"})
|
||||
toggle_line(el, !is_BBL_printer);
|
||||
}
|
||||
|
||||
|
|
|
@ -975,7 +975,7 @@ bool GuideFrame::run()
|
|||
return false;
|
||||
} else if (result == wxID_EDIT) {
|
||||
this->Close();
|
||||
FilamentInfomation *filament_info = new FilamentInfomation();
|
||||
Filamentinformation *filament_info = new Filamentinformation();
|
||||
filament_info->filament_id = m_editing_filament_id;
|
||||
wxQueueEvent(wxGetApp().plater(), new SimpleEvent(EVT_MODIFY_FILAMENT, filament_info));
|
||||
return false;
|
||||
|
@ -1139,8 +1139,8 @@ int GuideFrame::LoadProfile()
|
|||
//cout << iter->path().string() << endl;
|
||||
|
||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||
strVendor = strVendor.AfterLast( '\\');
|
||||
strVendor = strVendor.AfterLast('\/');
|
||||
strVendor = strVendor.AfterLast('\\');
|
||||
strVendor = strVendor.AfterLast('/');
|
||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||
|
||||
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0)
|
||||
|
@ -1158,8 +1158,8 @@ int GuideFrame::LoadProfile()
|
|||
//cout << "is a file" << endl;
|
||||
//cout << iter->path().string() << endl;
|
||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||
strVendor = strVendor.AfterLast( '\\');
|
||||
strVendor = strVendor.AfterLast('\/');
|
||||
strVendor = strVendor.AfterLast('\\');
|
||||
strVendor = strVendor.AfterLast('/');
|
||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||
|
||||
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0)
|
||||
|
@ -1656,7 +1656,7 @@ std::string GuideFrame::w2s(wxString sSrc)
|
|||
|
||||
void GuideFrame::GetStardardFilePath(std::string &FilePath) {
|
||||
StrReplace(FilePath, "\\", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
StrReplace(FilePath, "\/", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
StrReplace(FilePath, "/" , w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
}
|
||||
|
||||
bool GuideFrame::LoadFile(std::string jPath, std::string &sContent)
|
||||
|
|
|
@ -472,7 +472,7 @@ void AMSextruder::doRender(wxDC& dc)
|
|||
{
|
||||
//m_current_colur =
|
||||
wxSize size = GetSize();
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
|
||||
if (!m_none_ams_mode) {
|
||||
|
@ -484,24 +484,24 @@ void AMSextruder::doRender(wxDC& dc)
|
|||
|
||||
if (m_vams_loading) {
|
||||
|
||||
if (m_current_colur.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxSOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_colur, 6, wxSOLID)); }
|
||||
if (m_current_colur.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_colur, 6, wxPENSTYLE_SOLID)); }
|
||||
dc.DrawRoundedRectangle(-size.x / 2, size.y * 0.1, size.x, size.y, 4);
|
||||
|
||||
if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawRoundedRectangle(-size.x / 2 - FromDIP(3), size.y * 0.1 + FromDIP(3), size.x, size.y, 3);
|
||||
dc.DrawRoundedRectangle(-size.x / 2 + FromDIP(3), size.y * 0.1 - FromDIP(3), size.x, size.y, 5);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_ams_loading && !m_none_ams_mode) {
|
||||
if (m_current_colur.Alpha() == 0) {dc.SetPen(wxPen(*wxWHITE, 6, wxSOLID));}
|
||||
else {dc.SetPen(wxPen(m_current_colur, 6, wxSOLID));}
|
||||
if (m_current_colur.Alpha() == 0) {dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID));}
|
||||
else {dc.SetPen(wxPen(m_current_colur, 6, wxPENSTYLE_SOLID));}
|
||||
dc.DrawLine(size.x / 2, -1, size.x / 2, size.y * 0.6 - 1);
|
||||
|
||||
if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(size.x / 2 - FromDIP(4), -1, size.x / 2 - FromDIP(3), size.y * 0.6 - 1);
|
||||
dc.DrawLine(size.x / 2 + FromDIP(3), -1, size.x / 2 + FromDIP(3), size.y * 0.6 - 1);
|
||||
}
|
||||
|
@ -509,12 +509,12 @@ void AMSextruder::doRender(wxDC& dc)
|
|||
}
|
||||
else {
|
||||
if (m_ams_loading) {
|
||||
if (m_current_colur.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxSOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_colur, 6, wxSOLID)); }
|
||||
if (m_current_colur.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_colur, 6, wxPENSTYLE_SOLID)); }
|
||||
dc.DrawLine(size.x / 2, -1, size.x / 2, size.y * 0.6 - 1);
|
||||
|
||||
if ((m_current_colur == *wxWHITE || m_current_colur.Alpha() == 0) && !wxGetApp().dark_mode()) {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(size.x / 2 - FromDIP(4), -1, size.x / 2 - FromDIP(3), size.y * 0.6 - 1);
|
||||
dc.DrawLine(size.x / 2 + FromDIP(3), -1, size.x / 2 + FromDIP(3), size.y * 0.6 - 1);
|
||||
}
|
||||
|
@ -587,18 +587,18 @@ void AMSVirtualRoad::doRender(wxDC& dc)
|
|||
|
||||
wxSize size = GetSize();
|
||||
if (m_vams_loading) {
|
||||
if (m_current_color.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxSOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_color, 6, wxSOLID)); }
|
||||
if (m_current_color.Alpha() == 0) { dc.SetPen(wxPen(*wxWHITE, 6, wxPENSTYLE_SOLID)); }
|
||||
else { dc.SetPen(wxPen(m_current_color, 6, wxPENSTYLE_SOLID)); }
|
||||
}
|
||||
else {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxPENSTYLE_SOLID));
|
||||
}
|
||||
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawRoundedRectangle(size.x / 2, -size.y / 1.1 + FromDIP(1), size.x, size.y, 4);
|
||||
|
||||
if ((m_current_color == *wxWHITE || m_current_color.Alpha() == 0) && !wxGetApp().dark_mode()) {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_DEF_BLOCK_BK_COLOUR, 1, wxPENSTYLE_SOLID));
|
||||
dc.DrawRoundedRectangle(size.x / 2 - FromDIP(3), -size.y / 1.1 + FromDIP(4), size.x, size.y, 5);
|
||||
dc.DrawRoundedRectangle(size.x / 2 + FromDIP(3), -size.y / 1.1 - FromDIP(2), size.x, size.y, 3);
|
||||
}
|
||||
|
@ -988,11 +988,11 @@ void AMSLib::render_extra_lib(wxDC& dc)
|
|||
//draw road
|
||||
|
||||
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
|
||||
if (m_pass_road) {
|
||||
dc.SetPen(wxPen(m_info.material_colour, 6, wxSOLID));
|
||||
dc.SetPen(wxPen(m_info.material_colour, 6, wxPENSTYLE_SOLID));
|
||||
}
|
||||
|
||||
if (m_can_index == 0 || m_can_index == 3) {
|
||||
|
@ -1114,9 +1114,9 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
|
||||
// selected
|
||||
if (m_selected) {
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 2, wxPENSTYLE_SOLID));
|
||||
if (tmp_lib_colour.Alpha() == 0) {
|
||||
dc.SetPen(wxPen(wxColour(tmp_lib_colour.Red(), tmp_lib_colour.Green(),tmp_lib_colour.Blue(),128), 2, wxSOLID));
|
||||
dc.SetPen(wxPen(wxColour(tmp_lib_colour.Red(), tmp_lib_colour.Green(),tmp_lib_colour.Blue(),128), 2, wxPENSTYLE_SOLID));
|
||||
}
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
if (m_radius == 0) {
|
||||
|
@ -1131,7 +1131,7 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
}
|
||||
|
||||
if (!m_selected && m_hover) {
|
||||
dc.SetPen(wxPen(AMS_CONTROL_BRAND_COLOUR, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_BRAND_COLOUR, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
if (m_radius == 0) {
|
||||
dc.DrawRectangle(0, 0, size.x, size.y);
|
||||
|
@ -1144,7 +1144,7 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
dc.SetBrush(wxBrush(tmp_lib_colour));
|
||||
}
|
||||
else {
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(tmp_lib_colour));
|
||||
}
|
||||
|
||||
|
@ -1230,7 +1230,7 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
dc.SetBrush(wxBrush(tmp_lib_colour));
|
||||
}
|
||||
else {
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 1, wxSOLID));
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(tmp_lib_colour));
|
||||
}
|
||||
}
|
||||
|
@ -1260,7 +1260,7 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
#endif
|
||||
}
|
||||
if (tmp_lib_colour.Red() > 238 && tmp_lib_colour.Green() > 238 && tmp_lib_colour.Blue() > 238) {
|
||||
dc.SetPen(wxPen(wxColour(130, 129, 128), 1, wxSOLID));
|
||||
dc.SetPen(wxPen(wxColour(130, 129, 128), 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
dc.DrawLine(FromDIP(4), FromDIP(4) + top, size.x - FromDIP(4), FromDIP(4) + top);
|
||||
}
|
||||
|
@ -1268,10 +1268,10 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
else {
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
if (tmp_lib_colour.Red() > 238 && tmp_lib_colour.Green() > 238 && tmp_lib_colour.Blue() > 238) {
|
||||
dc.SetPen(wxPen(wxColour(130, 129, 128), 2, wxSOLID));
|
||||
dc.SetPen(wxPen(wxColour(130, 129, 128), 2, wxPENSTYLE_SOLID));
|
||||
}
|
||||
else {
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(tmp_lib_colour, 2, wxPENSTYLE_SOLID));
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -1285,7 +1285,7 @@ void AMSLib::render_generic_lib(wxDC &dc)
|
|||
}
|
||||
|
||||
//border
|
||||
dc.SetPen(wxPen(wxColour(130, 130, 128), 1, wxSOLID));
|
||||
dc.SetPen(wxPen(wxColour(130, 130, 128), 1, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
#ifdef __APPLE__
|
||||
dc.DrawRoundedRectangle(FromDIP(4), FromDIP(4), size.x - FromDIP(7), size.y - FromDIP(7), m_radius);
|
||||
|
@ -1492,7 +1492,7 @@ void AMSRoad::doRender(wxDC &dc)
|
|||
{
|
||||
wxSize size = GetSize();
|
||||
|
||||
dc.SetPen(wxPen(m_road_def_color, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_def_color, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
// left mode
|
||||
if (m_rode_mode == AMSRoadMode::AMS_ROAD_MODE_LEFT) { dc.DrawRoundedRectangle(-10, -10, size.x / 2 + 10, size.y * 0.6 + 10, 4); }
|
||||
|
@ -1535,8 +1535,8 @@ void AMSRoad::doRender(wxDC &dc)
|
|||
// mode none
|
||||
// if (m_pass_rode_mode.size() == 1 && m_pass_rode_mode[0] == AMSPassRoadMode::AMS_ROAD_MODE_NONE) return;
|
||||
|
||||
if (m_road_color.Alpha() == 0) {dc.SetPen(wxPen(*wxWHITE, m_passroad_width, wxSOLID));}
|
||||
else {dc.SetPen(wxPen(m_road_color, m_passroad_width, wxSOLID));}
|
||||
if (m_road_color.Alpha() == 0) {dc.SetPen(wxPen(*wxWHITE, m_passroad_width, wxPENSTYLE_SOLID));}
|
||||
else {dc.SetPen(wxPen(m_road_color, m_passroad_width, wxPENSTYLE_SOLID));}
|
||||
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
|
||||
|
@ -1563,7 +1563,7 @@ void AMSRoad::doRender(wxDC &dc)
|
|||
|
||||
// end mode
|
||||
if (m_rode_mode == AMSRoadMode::AMS_ROAD_MODE_END || m_rode_mode == AMSRoadMode::AMS_ROAD_MODE_END_ONLY) {
|
||||
dc.SetPen(wxPen(m_road_def_color, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_def_color, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(m_road_def_color));
|
||||
dc.DrawRoundedRectangle(size.x * 0.37 / 2, size.y * 0.6 - size.y / 6, size.x * 0.63, size.y / 3, m_radius);
|
||||
}
|
||||
|
@ -2244,7 +2244,7 @@ void AmsCans::doRender(wxDC& dc)
|
|||
|
||||
|
||||
// A1
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
|
||||
try
|
||||
|
@ -2285,32 +2285,32 @@ void AmsCans::doRender(wxDC& dc)
|
|||
|
||||
if (!m_road_canid.empty()) {
|
||||
if (m_road_canid == "0") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(a1_left, FromDIP(30), a1_left, a1_top);
|
||||
dc.DrawLine(a1_left, a1_top, end_top, a1_top);
|
||||
}
|
||||
|
||||
if (m_road_canid == "1") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(a2_left, FromDIP(160), a2_left, a2_top);
|
||||
dc.DrawLine(a2_left, a2_top, end_top, a2_top);
|
||||
}
|
||||
|
||||
if (m_road_canid == "2") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(a3_left, FromDIP(160), a3_left, a3_top);
|
||||
dc.DrawLine(a3_left, a3_top, end_top, a3_top);
|
||||
}
|
||||
|
||||
if (m_road_canid == "3") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(a4_left, FromDIP(30), a4_left, a4_top);
|
||||
dc.DrawLine(a4_left, a4_top, end_top, a4_top);
|
||||
}
|
||||
}
|
||||
|
||||
//to Extruder
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxSOLID));
|
||||
dc.SetPen(wxPen(AMS_CONTROL_GRAY500, 2, wxPENSTYLE_SOLID));
|
||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||
|
||||
dc.DrawLine(end_top, a1_top, end_top, size.y);
|
||||
|
@ -2318,19 +2318,19 @@ void AmsCans::doRender(wxDC& dc)
|
|||
if (!m_road_canid.empty()) {
|
||||
if (!m_road_canid.empty()) {
|
||||
if (m_road_canid == "0") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(end_top, a1_top, end_top, size.y);
|
||||
}
|
||||
else if (m_road_canid == "1") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(end_top, a2_top, end_top, size.y);
|
||||
}
|
||||
else if (m_road_canid == "2") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(end_top, a3_top, end_top, size.y);
|
||||
}
|
||||
else if (m_road_canid == "3") {
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxSOLID));
|
||||
dc.SetPen(wxPen(m_road_colour, passroad_width, wxPENSTYLE_SOLID));
|
||||
dc.DrawLine(end_top, a4_top, end_top, size.y);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ int scale(const int val) { return val * Slic3r::GUI::wxGetApp().em_unit() / 10;
|
|||
int ITEM_WIDTH() { return scale(30); }
|
||||
static const wxColour g_text_color = wxColour(107, 107, 107, 255);
|
||||
|
||||
#undef ICON_SIZE
|
||||
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
||||
#define TABLE_BORDER FromDIP(28)
|
||||
#define HEADER_VERT_PADDING FromDIP(12)
|
||||
|
@ -527,7 +528,7 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, con
|
|||
auto message_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
tip_message_panel->SetSizer(message_sizer);
|
||||
{
|
||||
wxString message = _L("Orca would re-calculate your flushing volumes everytime the filaments color changed. You could disable the auto-calculate in Orca Slicer > Preferences");
|
||||
wxString message = _L("Orca would re-calculate your flushing volumes every time the filaments color changed. You could disable the auto-calculate in Orca Slicer > Preferences");
|
||||
m_tip_message_label = new Label(tip_message_panel, wxEmptyString);
|
||||
wxClientDC dc(tip_message_panel);
|
||||
wxString multiline_message;
|
||||
|
|
|
@ -435,8 +435,11 @@ MaxVolumetricSpeed_Test_Dlg::MaxVolumetricSpeed_Test_Dlg(wxWindow* parent, wxWin
|
|||
text_size.x = text_size.x * 1.5;
|
||||
wxStaticBoxSizer* settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _L("Settings"));
|
||||
|
||||
wxString input_str = _L("mm³/s");
|
||||
auto input_text_size = wxWindow::GetTextExtent(input_str);
|
||||
|
||||
auto st_size = FromDIP(wxSize(text_size.x, -1));
|
||||
auto ti_size = FromDIP(wxSize(90, -1));
|
||||
auto ti_size = FromDIP(wxSize(input_text_size.x + 90, -1));
|
||||
// start vol
|
||||
auto start_vol_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto start_vol_text = new wxStaticText(this, wxID_ANY, start_vol_str, wxDefaultPosition, st_size, wxALIGN_LEFT);
|
||||
|
@ -540,8 +543,11 @@ VFA_Test_Dlg::VFA_Test_Dlg(wxWindow* parent, wxWindowID id, Plater* plater)
|
|||
text_size.x = text_size.x * 1.5;
|
||||
wxStaticBoxSizer* settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _L("Settings"));
|
||||
|
||||
wxString input_str = _L("mm/s");
|
||||
auto input_text_size = wxWindow::GetTextExtent(input_str);
|
||||
|
||||
auto st_size = FromDIP(wxSize(text_size.x, -1));
|
||||
auto ti_size = FromDIP(wxSize(90, -1));
|
||||
auto ti_size = FromDIP(wxSize(input_text_size.x + 90, -1));
|
||||
// start vol
|
||||
auto start_vol_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto start_vol_text = new wxStaticText(this, wxID_ANY, start_str, wxDefaultPosition, st_size, wxALIGN_LEFT);
|
||||
|
@ -646,8 +652,11 @@ Retraction_Test_Dlg::Retraction_Test_Dlg(wxWindow* parent, wxWindowID id, Plater
|
|||
text_size.x = text_size.x * 1.5;
|
||||
wxStaticBoxSizer* settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _L("Settings"));
|
||||
|
||||
wxString input_text_str = _L("mm/mm");
|
||||
auto input_text_size = wxWindow::GetTextExtent(input_text_str);
|
||||
|
||||
auto st_size = FromDIP(wxSize(text_size.x, -1));
|
||||
auto ti_size = FromDIP(wxSize(90, -1));
|
||||
auto ti_size = FromDIP(wxSize(input_text_size.x + 90, -1));
|
||||
// start length
|
||||
auto start_length_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto start_length_text = new wxStaticText(this, wxID_ANY, start_length_str, wxDefaultPosition, st_size, wxALIGN_LEFT);
|
||||
|
@ -670,7 +679,7 @@ Retraction_Test_Dlg::Retraction_Test_Dlg(wxWindow* parent, wxWindowID id, Plater
|
|||
// length step
|
||||
auto length_step_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto length_step_text = new wxStaticText(this, wxID_ANY, length_step_str, wxDefaultPosition, st_size, wxALIGN_LEFT);
|
||||
m_tiStep = new TextInput(this, wxString::FromDouble(0.1), _L("mm/mm"), "", wxDefaultPosition, ti_size, wxTE_CENTRE);
|
||||
m_tiStep = new TextInput(this, wxString::FromDouble(0.1), _L("mm/mm"), "", wxDefaultPosition, ti_size, wxTE_RIGHT);
|
||||
m_tiStart->GetTextCtrl()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
|
||||
length_step_sizer->Add(length_step_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||
length_step_sizer->Add(m_tiStep, 0, wxALL | wxALIGN_CENTER_VERTICAL, 2);
|
||||
|
|
|
@ -123,7 +123,7 @@ void wxMediaCtrl2::Load(wxURI url)
|
|||
});
|
||||
} else {
|
||||
CallAfter([] {
|
||||
wxMessageBox(_L("Missing BambuSource component registered for media playing! Please re-install BambuStutio or seek after-sales help."), _L("Error"), wxOK);
|
||||
wxMessageBox(_L("Missing BambuSource component registered for media playing! Please re-install BambuStudio or seek after-sales help."), _L("Error"), wxOK);
|
||||
});
|
||||
}
|
||||
m_error = clsid != CLSID_BAMBU_SOURCE ? 101 : path.empty() ? 102 : 103;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue