Merge pull request #293618 from adisbladis/bambu-studio-fix-cgal

bambu-studio: Fix build
This commit is contained in:
adisbladis 2024-03-11 21:50:01 +13:00 committed by GitHub
commit b0c17f0c63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 0 deletions

View File

@ -113,6 +113,8 @@ stdenv.mkDerivation rec {
patches = [
# Fix for webkitgtk linking
./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
# Fix build with cgal-5.6.1+
./meshboolean-const.patch
];
doCheck = true;

View File

@ -0,0 +1,21 @@
Fix build with cgal 5.6.1+
diff --git a/src/libslic3r/MeshBoolean.cpp b/src/libslic3r/MeshBoolean.cpp
index 50bbc099..b05245d3 100644
--- a/src/libslic3r/MeshBoolean.cpp
+++ b/src/libslic3r/MeshBoolean.cpp
@@ -200,12 +200,12 @@ indexed_triangle_set cgal_to_indexed_triangle_set(const _Mesh &cgalmesh)
const auto &vertices = cgalmesh.vertices();
int vsize = int(vertices.size());
- for (auto &vi : vertices) {
+ for (const auto &vi : vertices) {
auto &v = cgalmesh.point(vi); // Don't ask...
its.vertices.emplace_back(to_vec3f(v));
}
- for (auto &face : faces) {
+ for (const auto &face : faces) {
auto vtc = cgalmesh.vertices_around_face(cgalmesh.halfedge(face));
int i = 0;