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