1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 55cffb78d4..83cba91601 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -393,7 +393,7 @@ endif()
# boost::process was introduced first in version 1.64.0,
# boost::beast::detail::base64 was introduced first in version 1.66.0
set(MINIMUM_BOOST_VERSION "1.66.0")
-set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
+set(_boost_components "filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
# boost compile only in release & debug. We have to force the release version for RELWITHDEBINFO compilation
if (MSVC)
@@ -494,13 +494,15 @@ include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR})
# no matter what.
find_package(EXPAT REQUIRED)
-add_library(libexpat INTERFACE)
+if(NOT TARGET libexpat)
+ add_library(libexpat INTERFACE)
-if (TARGET EXPAT::EXPAT )
- target_link_libraries(libexpat INTERFACE EXPAT::EXPAT)
-elseif(TARGET expat::expat)
- target_link_libraries(libexpat INTERFACE expat::expat)
-endif ()
+ if (TARGET EXPAT::EXPAT )
+ target_link_libraries(libexpat INTERFACE EXPAT::EXPAT)
+ elseif(TARGET expat::expat)
+ target_link_libraries(libexpat INTERFACE expat::expat)
+ endif ()
+endif()
find_package(PNG REQUIRED)
@@ -604,7 +606,7 @@ endif ()
find_package(OpenVDB 5.0 COMPONENTS openvdb)
if(OpenVDB_FOUND)
- slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release)
+ slic3r_remap_configs(Imath::Imath RelWithDebInfo Release)
slic3r_remap_configs(Blosc::blosc RelWithDebInfo Release)
else ()
message(FATAL_ERROR "OpenVDB could not be found with the bundled find module. "
diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake
index bcc8745709..cf1e0a4387 100644
--- a/cmake/modules/FindOpenVDB.cmake
+++ b/cmake/modules/FindOpenVDB.cmake
@@ -349,7 +349,8 @@ endmacro()
find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
find_package(ZLIB ${_quiet} ${_required})
-find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
+find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams)
+find_package(Imath CONFIG)
# Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
# which we can query for optional deps. This basically runs ldd/otoll/objdump
@@ -401,7 +402,8 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
endif()
string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
- if(NOT ${_HAS_DEP} EQUAL -1)
+ string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP_EXR)
+ if(NOT ${_HAS_DEP} EQUAL -1 OR NOT ${_HAS_DEP_EXR} EQUAL -1)
set(OpenVDB_USES_ILM ON)
endif()
endforeach()
@@ -431,11 +433,7 @@ if(OpenVDB_USES_LOG4CPLUS)
find_package(Log4cplus ${_quiet} ${_required})
endif()
-if(OpenVDB_USES_ILM)
- find_package(IlmBase ${_quiet} ${_required})
-endif()
-
-if(OpenVDB_USES_EXR)
+if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
find_package(OpenEXR ${_quiet} ${_required})
endif()
@@ -451,9 +449,12 @@ endif()
set(_OPENVDB_VISIBLE_DEPENDENCIES
Boost::iostreams
- Boost::system
)
+if(TARGET Imath::Imath)
+ list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES Imath::Imath)
+endif()
+
set(_OPENVDB_DEFINITIONS)
if(OpenVDB_ABI)
list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_ABI_VERSION_NUMBER=${OpenVDB_ABI}")
@@ -461,10 +462,7 @@ endif()
if(OpenVDB_USES_EXR)
list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
- IlmBase::IlmThread
- IlmBase::Iex
- IlmBase::Imath
- OpenEXR::IlmImf
+ OpenEXR::OpenEXR
)
list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
endif()
diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp
index a9df29c760..bb7a62061f 100644
--- a/src/libslic3r/CutSurface.cpp
+++ b/src/libslic3r/CutSurface.cpp
@@ -1431,8 +1431,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
// detect anomalities in visitor.
bool is_valid = true;
// NOTE: map are created when convert shapes to cgal model
- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
- const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
+ const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).value();
+ const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).value();
Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
// a property map containing the constrained-or-not status of each edge
@@ -1581,8 +1581,8 @@ void priv::collect_surface_data(std::queue<FI> &process,
void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
{
- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
- const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
+ const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
+ const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).value();
// check if vertex was made by edge_2 which is diagonal of quad
auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
@@ -1766,11 +1766,11 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
priv::VDistances result(count_shapes_points);
for (const SurfacePatch &patch : patches) {
// map is created during intersection by corefine visitor
- const VertexShapeMap &vert_shape_map =
- models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
+ const VertexShapeMap &vert_shape_map =
+ models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
uint32_t patch_index = &patch - &patches.front();
// map is created during patch creation / dividing
- const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
+ const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).value();
// for each point on outline
for (const Loop &loop : patch.loops)
for (const VI &vi_patch : loop) {
@@ -2776,7 +2776,7 @@ using BBS = std::vector<BoundingBoxf3>;
BBS create_bbs(const VCutAOIs &cuts, const CutMeshes &cut_models);
using Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh>;
-using Traits = CGAL::AABB_traits<EpicKernel, Primitive>;
+using Traits = CGAL::AABB_traits_3<EpicKernel, Primitive>;
using Ray = EpicKernel::Ray_3;
using Tree = CGAL::AABB_tree<Traits>;
using Trees = std::vector<Tree>;
@@ -2930,7 +2930,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
{
// map is created during intersection by corefine visitor
- const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
+ const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).value();
// for each half edge of outline
for (HI hi : cut.second) {
VI vi = model.source(hi);
@@ -2955,7 +2955,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
patch_new.model_id = patch.model_id;
patch_new.shape_id = patch.shape_id;
// fix cvt
- CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
+ CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).value();
for (VI &vi : cvt) {
if (!vi.is_valid()) continue;
vi = cvt_from[vi];
@@ -2975,7 +2975,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
std::string patch_number_name = "f:patch_number";
CutMesh::Property_map<FI,bool> is_processed = access_pmap(cm.add_property_map<FI, bool>(patch_number_name, false));
- const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
+ const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).value();
std::vector<FI> fis;
fis.reserve(cm.faces().size());
@@ -3162,7 +3162,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI,
const CutMesh &mesh)
{
// NonInterupted contour is without other point and contain all from shape
- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
+ const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).value();
for (HI hi : cutAOI.second) {
const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];
diff --git a/src/libslic3r/GCode/PostProcessor.cpp b/src/libslic3r/GCode/PostProcessor.cpp
index 844201ba9a..453d581d45 100644
--- a/src/libslic3r/GCode/PostProcessor.cpp
+++ b/src/libslic3r/GCode/PostProcessor.cpp
@@ -33,7 +33,7 @@
#else
// POSIX
#include <sstream>
-#include <boost/process.hpp>
+#include <boost/process/v1.hpp>
#include <unistd.h> //readlink
#endif
diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp
index 0e1fe0686a..83b27e8bf2 100644
--- a/src/libslic3r/utils.cpp
+++ b/src/libslic3r/utils.cpp
@@ -92,7 +92,7 @@
#else
// POSIX
#include <sstream>
-#include <boost/process.hpp>
+#include <boost/process/v1.hpp>
#include <unistd.h> //readlink
#endif
diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp
index fd9313e2a9..8854c828dd 100644
--- a/src/slic3r/GUI/FreeCADDialog.cpp
+++ b/src/slic3r/GUI/FreeCADDialog.cpp
@@ -50,7 +50,7 @@
// and so boost/process has a line 'typedef int int'instead of 'typedef int pid_t' that makes it crash
// note: don't put it in a header, as it can create problems. Here it's safe enough to be used, as it's just applied for the process.hpp file and this source code.
#define pid_t pid_t
-#include <boost/process.hpp>
+#include <boost/process/v1.hpp>
#include <cstdlib> // getenv()
diff --git a/src/slic3r/GUI/OpenGLManager.cpp b/src/slic3r/GUI/OpenGLManager.cpp
index dc285a764d..18468c7363 100644
--- a/src/slic3r/GUI/OpenGLManager.cpp
+++ b/src/slic3r/GUI/OpenGLManager.cpp
@@ -363,9 +363,13 @@ bool OpenGLManager::init_gl()
if (!m_gl_initialized) {
#if ENABLE_GL_CORE_PROFILE || ENABLE_OPENGL_ES
glewExperimental = true;
+#else
+ glewExperimental = true;
#endif // ENABLE_GL_CORE_PROFILE || ENABLE_OPENGL_ES
GLenum err = glewInit();
- if (err != GLEW_OK) {
+ // GLEW_ERROR_NO_GLX_DISPLAY occurs when GTK3 uses EGL (Wayland/XWayland).
+ // OpenGL core still works; only GLX extensions are unavailable.
+ if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
BOOST_LOG_TRIVIAL(error) << "Unable to init glew library: " << glewGetErrorString(err);
return false;
}
diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp
index dfee446890..c48fce4fab 100644
--- a/src/slic3r/GUI/RemovableDriveManager.cpp
+++ b/src/slic3r/GUI/RemovableDriveManager.cpp
@@ -38,7 +38,7 @@
#include <pwd.h>
#include <boost/filesystem.hpp>
#include <boost/system/error_code.hpp>
-#include <boost/process.hpp>
+#include <boost/process/v1.hpp>
#endif
namespace Slic3r {
diff --git a/src/slic3r/Utils/Bonjour.cpp b/src/slic3r/Utils/Bonjour.cpp
index ad7049f57c..8877591531 100644
--- a/src/slic3r/Utils/Bonjour.cpp
+++ b/src/slic3r/Utils/Bonjour.cpp
@@ -15,6 +15,7 @@
#include <thread>
#include <vector>
+#include <boost/asio/deadline_timer.hpp>
#include <boost/bind/bind.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/endian/conversion.hpp>
diff --git a/src/slic3r/Utils/Process.cpp b/src/slic3r/Utils/Process.cpp
index 8c6bc74926..138f6f2dc5 100644
--- a/src/slic3r/Utils/Process.cpp
+++ b/src/slic3r/Utils/Process.cpp
@@ -25,8 +25,8 @@
// For starting another PrusaSlicer instance on OSX.
// Fails to compile on Windows on the build server.
#ifdef __APPLE__
- #include <boost/process/spawn.hpp>
- #include <boost/process/args.hpp>
+ #include <boost/process/v1/spawn.hpp>
+ #include <boost/process/v1/args.hpp>
#endif
#include <wx/stdpaths.h>
|