From 6e891c08862510f2209d1f92333480b52d0f47a9 Mon Sep 17 00:00:00 2001 From: "Stuart P. Bentley" Date: Sat, 8 Jun 2019 13:52:03 -0700 Subject: [PATCH 1/6] Update usage string to match new executable name --- src/PrusaSlicer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index fef1f6e7f..0aebec420 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -576,7 +576,7 @@ void CLI::print_help(bool include_print_options, PrinterTechnology printer_techn #endif /* SLIC3R_GUI */ << std::endl << "https://github.com/prusa3d/PrusaSlicer" << std::endl << std::endl - << "Usage: slic3r [ ACTIONS ] [ TRANSFORM ] [ OPTIONS ] [ file.stl ... ]" << std::endl + << "Usage: prusa-slicer [ ACTIONS ] [ TRANSFORM ] [ OPTIONS ] [ file.stl ... ]" << std::endl << std::endl << "Actions:" << std::endl; cli_actions_config_def.print_cli_help(boost::nowide::cout, false); From d818d1b429044f547699f2625d2a74501528968f Mon Sep 17 00:00:00 2001 From: BeldrothTheGold Date: Sat, 15 Jun 2019 19:10:14 -0600 Subject: [PATCH 2/6] Add debug option to display picking pass to screen --- src/libslic3r/Technologies.hpp | 2 ++ src/slic3r/GUI/GLCanvas3D.cpp | 2 ++ src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index a5f93b24f..86a00480b 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -15,6 +15,8 @@ #define ENABLE_RENDER_STATISTICS 0 // Shows an imgui dialog with camera related data #define ENABLE_CAMERA_STATISTICS 0 +// Render the picking pass instead of the main scene +#define ENABLE_RENDER_PICKING_PASS 0 //==================== diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index c828e0ec6..5d73c9248 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1625,6 +1625,7 @@ void GLCanvas3D::render() _picking_pass(); } +#if !ENABLE_RENDER_PICKING_PASS // draw scene glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)); _render_background(); @@ -1654,6 +1655,7 @@ void GLCanvas3D::render() _render_current_gizmo(); _render_selection_sidebar_hints(); +#endif // !ENABLE_RENDER_PICKING_PASS #if ENABLE_SHOW_CAMERA_TARGET _render_camera_target(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index cfe07a61c..7e2b558d9 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -259,6 +259,10 @@ void GLGizmoSlaSupports::render_clipping_plane(const Selection& selection) const void GLGizmoSlaSupports::on_render_for_picking(const Selection& selection) const { +#if ENABLE_RENDER_PICKING_PASS + m_z_shift = selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z(); +#endif + glsafe(::glEnable(GL_DEPTH_TEST)); render_points(selection, true); } From a07088a8d99499ef3dd770fb95a83d52e10b60b5 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 26 Jun 2019 14:25:05 +0200 Subject: [PATCH 3/6] #2561 - Fixed freezing of perspective camera when zooming-in --- src/slic3r/GUI/Camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Camera.cpp b/src/slic3r/GUI/Camera.cpp index 6cb8ff520..242d00a07 100644 --- a/src/slic3r/GUI/Camera.cpp +++ b/src/slic3r/GUI/Camera.cpp @@ -24,7 +24,7 @@ namespace GUI { const double Camera::DefaultDistance = 1000.0; double Camera::FrustrumMinZSize = 50.0; double Camera::FrustrumZMargin = 10.0; -double Camera::FovMinDeg = 5.0; +double Camera::FovMinDeg = 0.5; double Camera::FovMaxDeg = 75.0; Camera::Camera() From dd108f4513c8dcd105dfd8ecd399c36eaa615cfe Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 26 Jun 2019 14:59:39 +0200 Subject: [PATCH 4/6] Hotfix for inconsistent slice index --- src/libslic3r/MTUtils.hpp | 4 ++-- src/libslic3r/SLAPrint.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/MTUtils.hpp b/src/libslic3r/MTUtils.hpp index 70603cd15..ce26887f2 100644 --- a/src/libslic3r/MTUtils.hpp +++ b/src/libslic3r/MTUtils.hpp @@ -286,7 +286,7 @@ template> inline SLIC3R_CONSTEXPR Tout scaled(const Tin &v) SLIC3R_NOEXCEPT { - return static_cast(v / static_cast(SCALING_FACTOR)); + return static_cast(v / static_cast(SCALING_FACTOR)); } // Conversion definition from unscaled to integer 'scaled coord'. @@ -297,7 +297,7 @@ template> inline SLIC3R_CONSTEXPR ScaledCoordOnly scaled(const Tin &v) SLIC3R_NOEXCEPT { //return static_cast(std::round(v / SCALING_FACTOR)); - return static_cast(v / static_cast(SCALING_FACTOR)); + return static_cast(v / static_cast(SCALING_FACTOR)); } // Conversion for Eigen vectors (N dimensional points) diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index 7ae481ffb..1902e74ae 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -720,8 +720,9 @@ void SLAPrint::process() if(slindex_it == po.m_slice_index.end()) //TRN To be shown at the status bar on SLA slicing error. - throw std::runtime_error(L("Slicing had to be stopped " - "due to an internal error.")); + throw std::runtime_error( + L("Slicing had to be stopped due to an internal error: " + "Inconsistent slice index.")); po.m_model_height_levels.clear(); po.m_model_height_levels.reserve(po.m_slice_index.size()); From 74b420d608623793f00a94f1cde97c3c1e3c0306 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 26 Jun 2019 17:06:41 +0200 Subject: [PATCH 5/6] Remove option for igl static build due to Eigen version mismatch . --- deps/CMakeLists.txt | 9 +++++---- deps/deps-unix-common.cmake | 2 +- deps/deps-windows.cmake | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 5bc33c896..d8e72370b 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -36,10 +36,11 @@ set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination direct option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON) option(DEP_WX_STABLE "Build against wxWidgets stable 3.0 as opposed to default 3.1 (Linux only)" OFF) -# IGL static library in release mode produces 50MB binary. On the build server, it should be -# disabled and used in header-only mode. On developer machines, it can be enabled to speed -# up conpilation and suppress warnings coming from IGL. -option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF) +# On developer machines, it can be enabled to speed up compilation and suppress warnings coming from IGL. +# FIXME: +# Enabling this option is not safe. IGL will compile itself with its own version of Eigen while +# Slic3r compiles with a different version which will cause runtime errors. +# option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF) message(STATUS "PrusaSlicer deps DESTDIR: ${DESTDIR}") message(STATUS "PrusaSlicer deps debug build: ${DEP_DEBUG}") diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake index c44a6ec20..3614e9444 100644 --- a/deps/deps-unix-common.cmake +++ b/deps/deps-unix-common.cmake @@ -54,7 +54,7 @@ ExternalProject_Add(dep_libigl -DLIBIGL_BUILD_PYTHON=OFF -DLIBIGL_BUILD_TESTS=OFF -DLIBIGL_BUILD_TUTORIALS=OFF - -DLIBIGL_USE_STATIC_LIBRARY=${DEP_BUILD_IGL_STATIC} + -DLIBIGL_USE_STATIC_LIBRARY=OFF #${DEP_BUILD_IGL_STATIC} -DLIBIGL_WITHOUT_COPYLEFT=OFF -DLIBIGL_WITH_CGAL=OFF -DLIBIGL_WITH_COMISO=OFF diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake index d7daf8425..0b3fcb13c 100644 --- a/deps/deps-windows.cmake +++ b/deps/deps-windows.cmake @@ -264,7 +264,7 @@ ExternalProject_Add(dep_libigl -DLIBIGL_BUILD_PYTHON=OFF -DLIBIGL_BUILD_TESTS=OFF -DLIBIGL_BUILD_TUTORIALS=OFF - -DLIBIGL_USE_STATIC_LIBRARY=${DEP_BUILD_IGL_STATIC} + -DLIBIGL_USE_STATIC_LIBRARY=OFF #${DEP_BUILD_IGL_STATIC} -DLIBIGL_WITHOUT_COPYLEFT=OFF -DLIBIGL_WITH_CGAL=OFF -DLIBIGL_WITH_COMISO=OFF From ec28e55ff00617b711cd46f0302d93219e3c3702 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 26 Jun 2019 18:03:13 +0200 Subject: [PATCH 6/6] Get rid of the test.cpp warning --- src/libnest2d/tests/test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnest2d/tests/test.cpp b/src/libnest2d/tests/test.cpp index 363a3930c..2f2b9beb5 100644 --- a/src/libnest2d/tests/test.cpp +++ b/src/libnest2d/tests/test.cpp @@ -555,7 +555,7 @@ TEST(GeometryAlgorithms, NestTest) { size_t partsum = std::accumulate(result.begin(), result.end(), size_t(0), - [](int s, + [](size_t s, const decltype( result)::value_type &bin) { return s += bin.size();