From 65ab83d6a90855212f62bac47cd1f7810cc5bfd3 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Fri, 3 Mar 2023 13:07:32 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20of=20Build=20failed=20with=20CGAL=205.5:?= =?UTF-8?q?=20UserVisitor=E2=80=99=20{aka=20=E2=80=98struct=20priv::Visito?= =?UTF-8?q?r=E2=80=99}=20has=20no=20member=20named=20=E2=80=98start=5Ffilt?= =?UTF-8?q?ering=5Fintersections=E2=80=99=20Fixes=20#9582=20Co-authored-by?= =?UTF-8?q?:=20@hexane360?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libslic3r/CutSurface.cpp | 18 +++++++----------- tests/libslic3r/test_emboss.cpp | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp index df46ad7f4..a8db9e418 100644 --- a/src/libslic3r/CutSurface.cpp +++ b/src/libslic3r/CutSurface.cpp @@ -1098,7 +1098,13 @@ namespace priv { /// Track source of intersection /// Help for anotate inner and outer faces /// -struct Visitor { +struct Visitor : public CGAL::Polygon_mesh_processing::Corefinement::Default_visitor { + Visitor(const CutMesh &object, const CutMesh &shape, EdgeShapeMap edge_shape_map, + FaceShapeMap face_shape_map, VertexShapeMap vert_shape_map, bool* is_valid) : + object(object), shape(shape), edge_shape_map(edge_shape_map), face_shape_map(face_shape_map), + vert_shape_map(vert_shape_map), is_valid(is_valid) + {} + const CutMesh &object; const CutMesh &shape; @@ -1160,16 +1166,6 @@ struct Visitor { /// New added vertex /// Affected mesh void new_vertex_added(std::size_t i_id, VI v, const CutMesh &tm); - - // Not used visitor functions - void before_subface_creations(FI /* f_old */, CutMesh &/* mesh */){} - void after_subface_created(FI /* f_new */, CutMesh &/* mesh */) {} - void after_subface_creations(CutMesh&) {} - void before_subface_created(CutMesh&) {} - void before_edge_split(HI /* h */, CutMesh& /* tm */) {} - void edge_split(HI /* hnew */, CutMesh& /* tm */) {} - void after_edge_split() {} - void add_retriangulation_edge(HI /* h */, CutMesh& /* tm */) {} }; /// diff --git a/tests/libslic3r/test_emboss.cpp b/tests/libslic3r/test_emboss.cpp index 2d98b1d4d..e90d0de19 100644 --- a/tests/libslic3r/test_emboss.cpp +++ b/tests/libslic3r/test_emboss.cpp @@ -848,7 +848,16 @@ TEST_CASE("Emboss extrude cut", "[Emboss-Cut]") using EcmType = CGAL::internal::Dynamic; EcmType ecm = get(d_prop_bool(), cgal_object); - struct Visitor { + struct Visitor : public CGAL::Polygon_mesh_processing::Corefinement::Default_visitor { + Visitor(const MyMesh &object, const MyMesh &shape, + MyMesh::Property_map edge_shape_map, + MyMesh::Property_map face_shape_map, + MyMesh::Property_map face_map, + MyMesh::Property_map vert_shape_map) : + object(object), shape(shape), edge_shape_map(edge_shape_map), face_shape_map(face_shape_map), + face_map(face_map), vert_shape_map(vert_shape_map) + {} + const MyMesh &object; const MyMesh &shape; // Properties of the shape mesh: @@ -946,13 +955,6 @@ TEST_CASE("Emboss extrude cut", "[Emboss-Cut]") assert(glyph->point_index != -1); vert_shape_map[vh] = glyph ? *glyph : IntersectingElemnt{}; } - - void after_subface_creations(MyMesh&) {} - void before_subface_created(MyMesh&) {} - void before_edge_split(halfedge_descriptor /* h */, MyMesh& /* tm */) {} - void edge_split(halfedge_descriptor /* hnew */, MyMesh& /* tm */) {} - void after_edge_split() {} - void add_retriangulation_edge(halfedge_descriptor /* h */, MyMesh& /* tm */) {} } visitor{cgal_object, cgal_shape, edge_shape_map, face_shape_map, face_map, vert_shape_map};