Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_plater_thumbnail

This commit is contained in:
Enrico Turri 2019-10-22 16:03:27 +02:00
commit 1809497c38
6 changed files with 67 additions and 131 deletions

View File

@ -53,8 +53,8 @@ find_package(Git REQUIRED)
ExternalProject_Add(dep_qhull ExternalProject_Add(dep_qhull
EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_ALL 1
URL "https://github.com/qhull/qhull/archive/v7.2.1.tar.gz" URL "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
URL_HASH SHA256=6fc251e0b75467e00943bfb7191e986fce0e1f8f6f0251f9c6ce5a843821ea78 URL_HASH SHA256=619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0
CMAKE_ARGS CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
@ -87,6 +87,6 @@ ExternalProject_Add(dep_libigl
-DLIBIGL_WITH_TETGEN=OFF -DLIBIGL_WITH_TETGEN=OFF
-DLIBIGL_WITH_TRIANGLE=OFF -DLIBIGL_WITH_TRIANGLE=OFF
-DLIBIGL_WITH_XML=OFF -DLIBIGL_WITH_XML=OFF
PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/igl-fixes.patch PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/igl-mods.patch
) )

View File

@ -238,8 +238,8 @@ find_package(Git REQUIRED)
ExternalProject_Add(dep_qhull ExternalProject_Add(dep_qhull
EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_ALL 1
URL "https://github.com/qhull/qhull/archive/v7.2.1.tar.gz" URL "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
URL_HASH SHA256=6fc251e0b75467e00943bfb7191e986fce0e1f8f6f0251f9c6ce5a843821ea78 URL_HASH SHA256=619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0
CMAKE_GENERATOR "${DEP_MSVC_GEN}" CMAKE_GENERATOR "${DEP_MSVC_GEN}"
CMAKE_ARGS CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
@ -300,7 +300,7 @@ ExternalProject_Add(dep_libigl
-DLIBIGL_WITH_XML=OFF -DLIBIGL_WITH_XML=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_DEBUG_POSTFIX=d -DCMAKE_DEBUG_POSTFIX=d
PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/igl-fixes.patch PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/igl-mods.patch
BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
INSTALL_COMMAND "" INSTALL_COMMAND ""
) )

144
deps/qhull-mods.patch vendored
View File

@ -1,121 +1,49 @@
From a31ae4781a4afa60e21c70e5b4ae784bcd447c8a Mon Sep 17 00:00:00 2001 From 7f55a56b3d112f4dffbf21b1722f400c64bf03b1 Mon Sep 17 00:00:00 2001
From: tamasmeszaros <meszaros.q@gmail.com> From: tamasmeszaros <meszaros.q@gmail.com>
Date: Thu, 6 Jun 2019 15:41:43 +0200 Date: Mon, 21 Oct 2019 16:52:04 +0200
Subject: [PATCH] prusa-slicer changes Subject: [PATCH] Fix the build on macOS
--- ---
CMakeLists.txt | 44 +++++++++++++++++++++++++++++++++++--- CMakeLists.txt | 10 +++++-----
Config.cmake.in | 2 ++ 1 file changed, 5 insertions(+), 5 deletions(-)
src/libqhull_r/qhull_r-exports.def | 2 ++
src/libqhull_r/user_r.h | 2 +-
4 files changed, 46 insertions(+), 4 deletions(-)
create mode 100644 Config.cmake.in
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59dff41..20c2ec5 100644 index 07d3da2..14df8e9 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -61,7 +61,7 @@ @@ -626,18 +626,18 @@ install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets
# $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $ include(CMakePackageConfigHelpers)
project(qhull) write_basic_package_version_file(
-cmake_minimum_required(VERSION 2.6) - "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
+cmake_minimum_required(VERSION 3.0) + "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfigVersion.cmake"
VERSION ${qhull_VERSION}
COMPATIBILITY AnyNewerVersion
)
# Define qhull_VERSION in CMakeLists.txt, Makefile, qhull-exports.def, qhull_p-exports.def, qhull_r-exports.def, qhull-warn.pri export(EXPORT QhullTargets
set(qhull_VERSION2 "2015.2 2016/01/18") # not used, See global.c, global_r.c, rbox.c, rbox_r.c - FILE "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullTargets.cmake"
@@ -610,10 +610,48 @@ add_test(NAME user_eg3 + FILE "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullTargets.cmake"
# Define install NAMESPACE Qhull::
# --------------------------------------- )
-install(TARGETS ${qhull_TARGETS_INSTALL} configure_file(${PROJECT_SOURCE_DIR}/build/config.cmake.in
+install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets - "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
RUNTIME DESTINATION ${BIN_INSTALL_DIR} + "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfig.cmake"
LIBRARY DESTINATION ${LIB_INSTALL_DIR} @ONLY
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) )
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ INCLUDES DESTINATION include)
+
+include(CMakePackageConfigHelpers)
+
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
+ VERSION ${qhull_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+
+export(EXPORT QhullTargets
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullTargets.cmake"
+ NAMESPACE Qhull::
+)
+
+configure_file(Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
+ @ONLY
+)
+
+set(ConfigPackageLocation lib/cmake/Qhull)
+install(EXPORT QhullTargets
+ FILE
+ QhullTargets.cmake
+ NAMESPACE
+ Qhull::
+ DESTINATION
+ ${ConfigPackageLocation}
+)
+install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
+ DESTINATION
+ ${ConfigPackageLocation}
+ COMPONENT
+ Devel
+)
install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) @@ -652,8 +652,8 @@ install(EXPORT QhullTargets
install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) )
diff --git a/Config.cmake.in b/Config.cmake.in install(
new file mode 100644 FILES
index 0000000..bc92bfe - "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
--- /dev/null - "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
+++ b/Config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfig.cmake"
@@ -0,0 +1,2 @@ + "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfigVersion.cmake"
+include("${CMAKE_CURRENT_LIST_DIR}/QhullTargets.cmake") DESTINATION
+ ${ConfigPackageLocation}
diff --git a/src/libqhull_r/qhull_r-exports.def b/src/libqhull_r/qhull_r-exports.def COMPONENT
index 325d57c..72f6ad0 100644
--- a/src/libqhull_r/qhull_r-exports.def
+++ b/src/libqhull_r/qhull_r-exports.def
@@ -185,6 +185,7 @@ qh_memsetup
qh_memsize
qh_memstatistics
qh_memtotal
+qh_memcheck
qh_merge_degenredundant
qh_merge_nonconvex
qh_mergecycle
@@ -372,6 +373,7 @@ qh_settruncate
qh_setunique
qh_setvoronoi_all
qh_setzero
+qh_setendpointer
qh_sharpnewfacets
qh_skipfacet
qh_skipfilename
diff --git a/src/libqhull_r/user_r.h b/src/libqhull_r/user_r.h
index fc105b9..7cca65a 100644
--- a/src/libqhull_r/user_r.h
+++ b/src/libqhull_r/user_r.h
@@ -139,7 +139,7 @@ Code flags --
REALfloat = 1 all numbers are 'float' type
= 0 all numbers are 'double' type
*/
-#define REALfloat 0
+#define REALfloat 1
#if (REALfloat == 1)
#define realT float
-- --
2.16.2.windows.1 2.17.1

View File

@ -778,22 +778,26 @@ void GCode::_do_export(Print &print, FILE *file)
{ {
m_silent_time_estimator.reset(); m_silent_time_estimator.reset();
m_silent_time_estimator.set_dialect(print.config().gcode_flavor); m_silent_time_estimator.set_dialect(print.config().gcode_flavor);
m_silent_time_estimator.set_max_acceleration((float)print.config().machine_max_acceleration_extruding.values[1]); /* "Stealth mode" values can be just a copy of "normal mode" values
m_silent_time_estimator.set_retract_acceleration((float)print.config().machine_max_acceleration_retracting.values[1]); * (when they aren't input for a printer preset).
m_silent_time_estimator.set_minimum_feedrate((float)print.config().machine_min_extruding_rate.values[1]); * Thus, use back value from values, instead of second one, which could be absent
m_silent_time_estimator.set_minimum_travel_feedrate((float)print.config().machine_min_travel_rate.values[1]); */
m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, (float)print.config().machine_max_acceleration_x.values[1]); m_silent_time_estimator.set_max_acceleration((float)print.config().machine_max_acceleration_extruding.values.back());
m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, (float)print.config().machine_max_acceleration_y.values[1]); m_silent_time_estimator.set_retract_acceleration((float)print.config().machine_max_acceleration_retracting.values.back());
m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, (float)print.config().machine_max_acceleration_z.values[1]); m_silent_time_estimator.set_minimum_feedrate((float)print.config().machine_min_extruding_rate.values.back());
m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, (float)print.config().machine_max_acceleration_e.values[1]); m_silent_time_estimator.set_minimum_travel_feedrate((float)print.config().machine_min_travel_rate.values.back());
m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, (float)print.config().machine_max_feedrate_x.values[1]); m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::X, (float)print.config().machine_max_acceleration_x.values.back());
m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, (float)print.config().machine_max_feedrate_y.values[1]); m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Y, (float)print.config().machine_max_acceleration_y.values.back());
m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, (float)print.config().machine_max_feedrate_z.values[1]); m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::Z, (float)print.config().machine_max_acceleration_z.values.back());
m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, (float)print.config().machine_max_feedrate_e.values[1]); m_silent_time_estimator.set_axis_max_acceleration(GCodeTimeEstimator::E, (float)print.config().machine_max_acceleration_e.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, (float)print.config().machine_max_jerk_x.values[1]); m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::X, (float)print.config().machine_max_feedrate_x.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, (float)print.config().machine_max_jerk_y.values[1]); m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Y, (float)print.config().machine_max_feedrate_y.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, (float)print.config().machine_max_jerk_z.values[1]); m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::Z, (float)print.config().machine_max_feedrate_z.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, (float)print.config().machine_max_jerk_e.values[1]); m_silent_time_estimator.set_axis_max_feedrate(GCodeTimeEstimator::E, (float)print.config().machine_max_feedrate_e.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::X, (float)print.config().machine_max_jerk_x.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Y, (float)print.config().machine_max_jerk_y.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::Z, (float)print.config().machine_max_jerk_z.values.back());
m_silent_time_estimator.set_axis_max_jerk(GCodeTimeEstimator::E, (float)print.config().machine_max_jerk_e.values.back());
if (print.config().single_extruder_multi_material) { if (print.config().single_extruder_multi_material) {
// As of now the fields are shown at the UI dialog in the same combo box as the ramming values, so they // As of now the fields are shown at the UI dialog in the same combo box as the ramming values, so they
// are considered to be active for the single extruder multi-material printers only. // are considered to be active for the single extruder multi-material printers only.

View File

@ -632,7 +632,11 @@ void ObjectManipulation::update_reset_buttons_visibility()
show_drop_to_bed = (std::abs(min_z) > EPSILON); show_drop_to_bed = (std::abs(min_z) > EPSILON);
} }
wxGetApp().CallAfter([this, show_rotation, show_scale, show_drop_to_bed]{ wxGetApp().CallAfter([this, show_rotation, show_scale, show_drop_to_bed] {
// There is a case (under OSX), when this function is called after the Manipulation panel is hidden
// So, let check if Manipulation panel is still shown for this moment
if (!this->IsShown())
return;
m_reset_rotation_button->Show(show_rotation); m_reset_rotation_button->Show(show_rotation);
m_reset_scale_button->Show(show_scale); m_reset_scale_button->Show(show_scale);
m_drop_to_bed_button->Show(show_drop_to_bed); m_drop_to_bed_button->Show(show_drop_to_bed);