This commit is contained in:
bubnikv 2019-06-27 09:48:31 +02:00
commit 71d1255219
11 changed files with 23 additions and 13 deletions

9
deps/CMakeLists.txt vendored
View File

@ -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}")

View File

@ -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

View File

@ -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

View File

@ -579,7 +579,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);

View File

@ -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();

View File

@ -286,7 +286,7 @@ template<class Tout,
class = FloatingOnly<Tout>>
inline SLIC3R_CONSTEXPR Tout scaled(const Tin &v) SLIC3R_NOEXCEPT
{
return static_cast<Tout>(v / static_cast<Tout>(SCALING_FACTOR));
return static_cast<Tout>(v / static_cast<Tin>(SCALING_FACTOR));
}
// Conversion definition from unscaled to integer 'scaled coord'.
@ -297,7 +297,7 @@ template<class Tout = coord_t, class Tin, class = FloatingOnly<Tin>>
inline SLIC3R_CONSTEXPR ScaledCoordOnly<Tout> scaled(const Tin &v) SLIC3R_NOEXCEPT
{
//return static_cast<Tout>(std::round(v / SCALING_FACTOR));
return static_cast<Tout>(v / static_cast<Tout>(SCALING_FACTOR));
return static_cast<Tout>(v / static_cast<Tin>(SCALING_FACTOR));
}
// Conversion for Eigen vectors (N dimensional points)

View File

@ -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());

View File

@ -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
//====================

View File

@ -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()

View File

@ -1627,6 +1627,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();
@ -1656,6 +1657,7 @@ void GLCanvas3D::render()
_render_current_gizmo();
_render_selection_sidebar_hints();
#endif // !ENABLE_RENDER_PICKING_PASS
#if ENABLE_SHOW_CAMERA_TARGET
_render_camera_target();

View File

@ -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);
}