From f32cc3240136c2a6da95764f8134945adad166de Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 26 Mar 2019 09:54:05 +0100 Subject: [PATCH 1/4] doc: typo --- doc/How to build - Windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/How to build - Windows.md b/doc/How to build - Windows.md index 020b28958a9..dec85ae483b 100644 --- a/doc/How to build - Windows.md +++ b/doc/How to build - Windows.md @@ -89,7 +89,7 @@ Then `cd` into the `deps` directory and use these commands to build: You can also use the Visual Studio GUI or other generators as mentioned above. The `DESTDIR` option is the location where the bundle will be installed. -This may be customized. If you leave it empty, the `DESTDIR` will be places inside the same `build` directory. +This may be customized. If you leave it empty, the `DESTDIR` will be placed inside the same `build` directory. Warning: If the `build` directory is nested too deep inside other folders, various file paths during the build become too long and the build might fail due to file writing errors. For this reason, it is recommended to From 3d1c0f182f06d702d3ca6ff9e58a10516b974197 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 26 Mar 2019 10:08:57 +0100 Subject: [PATCH 2/4] Fixed crash after change of a language + Updating of a mode after recreation --- src/slic3r/GUI/GUI_App.cpp | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index d68257a0a6a..d66e6f5ad70 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -279,31 +280,50 @@ void GUI_App::set_label_clr_sys(const wxColour& clr) { void GUI_App::recreate_GUI() { + // Weird things happen as the Paint messages are floating around the windows being destructed. + // Avoid the Paint messages by hiding the main window. + // Also the application closes much faster without these unnecessary screen refreshes. + // In addition, there were some crashes due to the Paint events sent to already destructed windows. + mainframe->Show(false); + + const auto msg_name = _(L("Changing of an application language")) + dots; + wxProgressDialog dlg(msg_name, msg_name); + dlg.Pulse(); + // to make sure nobody accesses data from the soon-to-be-destroyed widgets: tabs_list.clear(); plater_ = nullptr; + dlg.Update(10, _(L("Recreating")) + dots); + MainFrame* topwindow = mainframe; mainframe = new MainFrame(); sidebar().obj_list()->init_objects(); // propagate model objects to object list if (topwindow) { SetTopWindow(mainframe); + + dlg.Update(30, _(L("Recreating")) + dots); topwindow->Destroy(); } + dlg.Update(80, _(L("Loading of a current presets")) + dots); + m_printhost_job_queue.reset(new PrintHostJobQueue(mainframe->printhost_queue_dlg())); load_current_presets(); mainframe->Show(true); - // On OSX the UI was not initialized correctly if the wizard was called - // before the UI was up and running. - CallAfter([]() { - // Run the config wizard, don't offer the "reset user profile" checkbox. - config_wizard_startup(true); - }); + dlg.Update(90, _(L("Loading of a mode view")) + dots); + + update_mode(); + + // #ys_FIXME_delete_after_testing Do we still need this ? +// CallAfter([]() { +// // Run the config wizard, don't offer the "reset user profile" checkbox. +// config_wizard_startup(true); +// }); } void GUI_App::system_info() From df51a16ffea5c98060cf754cca8675902c5a4352 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Mar 2019 10:38:50 +0100 Subject: [PATCH 3/4] Improved SLA layer view: Low layer shall be rendered from the slice above, triangulated slices are shifted slightly away from the clipping planes. FDM: Ported a "(bridged)" G-code comment from upstream. --- src/libslic3r/GCode.cpp | 3 +++ src/libslic3r/SLAPrint.hpp | 8 ++++---- src/slic3r/GUI/GLCanvas3D.cpp | 17 +++++++++++------ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 94be37b2189..d9f907f034c 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2408,6 +2408,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, { std::string gcode; + if (is_bridge(path.role())) + description += " (bridge)"; + // go to first point of extrusion path if (!m_last_pos_defined || m_last_pos != path.first_point()) { gcode += this->travel_to( diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp index fbe2821b216..d98f04294dc 100644 --- a/src/libslic3r/SLAPrint.hpp +++ b/src/libslic3r/SLAPrint.hpp @@ -350,10 +350,10 @@ public: } const PrintObjects& objects() const { return m_objects; } - const SLAPrintConfig& print_config() const { return m_print_config; } - const SLAPrinterConfig& printer_config() const { return m_printer_config; } - const SLAMaterialConfig& material_config() const { return m_material_config; } - + const SLAPrintConfig& print_config() const { return m_print_config; } + const SLAPrinterConfig& printer_config() const { return m_printer_config; } + const SLAMaterialConfig& material_config() const { return m_material_config; } + const SLAPrintObjectConfig& default_object_config() const { return m_default_object_config; } std::string output_filename() const override; diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 8be187dece5..2718eac6c0c 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5009,23 +5009,28 @@ void GLCanvas3D::_render_sla_slices() const if ((bottom_obj_triangles.empty() || bottom_sup_triangles.empty() || top_obj_triangles.empty() || top_sup_triangles.empty()) && obj->is_step_done(slaposIndexSlices)) { + double layer_height = print->default_object_config().layer_height.value; double initial_layer_height = print->material_config().initial_layer_height.value; LevelID key_zero = obj->get_slice_records().begin()->key(); - LevelID key_low = LevelID((clip_min_z - initial_layer_height) / SCALING_FACTOR) + key_zero; + // Slice at the center of the slab starting at clip_min_z will be rendered for the lower plane. + LevelID key_low = LevelID((clip_min_z - initial_layer_height + layer_height) / SCALING_FACTOR) + key_zero; + // Slice at the center of the slab ending at clip_max_z will be rendered for the upper plane. LevelID key_high = LevelID((clip_max_z - initial_layer_height) / SCALING_FACTOR) + key_zero; auto slice_range = obj->get_slice_records(key_low - LevelID(SCALED_EPSILON), key_high - LevelID(SCALED_EPSILON)); auto it_low = slice_range.begin(); auto it_high = std::prev(slice_range.end()); - + // Offset to avoid OpenGL Z fighting between the object's horizontal surfaces and the triangluated surfaces of the cuts. + double plane_shift_z = 0.002f; + if (! it_low.is_end() && it_low->key() < key_low + LevelID(SCALED_EPSILON)) { const ExPolygons& obj_bottom = obj->get_slices_from_record(it_low, soModel); const ExPolygons& sup_bottom = obj->get_slices_from_record(it_low, soSupport); // calculate model bottom cap if (bottom_obj_triangles.empty() && !obj_bottom.empty()) - bottom_obj_triangles = triangulate_expolygons_3d(obj_bottom, clip_min_z, true); + bottom_obj_triangles = triangulate_expolygons_3d(obj_bottom, clip_min_z - plane_shift_z, true); // calculate support bottom cap if (bottom_sup_triangles.empty() && !sup_bottom.empty()) - bottom_sup_triangles = triangulate_expolygons_3d(sup_bottom, clip_min_z, true); + bottom_sup_triangles = triangulate_expolygons_3d(sup_bottom, clip_min_z - plane_shift_z, true); } if (! it_high.is_end() && it_high->key() < key_high + LevelID(SCALED_EPSILON)) { @@ -5033,10 +5038,10 @@ void GLCanvas3D::_render_sla_slices() const const ExPolygons& sup_top = obj->get_slices_from_record(it_high, soSupport); // calculate model top cap if (top_obj_triangles.empty() && !obj_top.empty()) - top_obj_triangles = triangulate_expolygons_3d(obj_top, clip_max_z, false); + top_obj_triangles = triangulate_expolygons_3d(obj_top, clip_max_z + plane_shift_z, false); // calculate support top cap if (top_sup_triangles.empty() && !sup_top.empty()) - top_sup_triangles = triangulate_expolygons_3d(sup_top, clip_max_z, false); + top_sup_triangles = triangulate_expolygons_3d(sup_top, clip_max_z + plane_shift_z, false); } } From 6736b7d3a7be5316549508cde09a8e93406330b2 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 26 Mar 2019 14:00:53 +0100 Subject: [PATCH 4/4] Added tooltip [Ctrl - R] to the Slice now button --- src/slic3r/GUI/Plater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index e158821257c..0505d92761d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -853,7 +853,9 @@ void Sidebar::update_mode_sizer() const void Sidebar::update_reslice_btn_tooltip() const { - const wxString tooltip = m_mode == comSimple ? wxString("") : _(L("Hold Shift to Slice & Export G-code")); + wxString tooltip = wxString("Slice") + " [" + GUI::shortkey_ctrl_prefix() + "R]"; + if (m_mode != comSimple) + tooltip += wxString("\n") + _(L("Hold Shift to Slice & Export G-code")); p->btn_reslice->SetToolTip(tooltip); }