I am working with CGAL to manipulate 2D alpha shapes in C++, and my objective is to simplify an alpha shape by removing certain vertices based on specific criteria. However, I encountered a challenge when attempting to remove vertices using alphaShape::remove, as it is declared as private.
Here's a simplified version of the code I tried:
AlphaShape alpha_shape;
// Construct the alpha shape and add points...
for (AlphaShape::Finite_vertices_iterator it = alpha_shape.finite_vertices_begin();
it != alpha_shape.finite_vertices_end(); ++it) {
AlphaShape::Vertex_handle vertex = it;
// Check criteria and remove vertex
if (/* Criteria */) {
alpha_shape.remove(vertex); // This results in a compilation error (C2248)
}
}
I understand that alphaShape::remove is a private member function, and directly calling it leads to a compilation error. My overall goal is to simplify the alpha shape by removing certain vertices that meet specific criteria. The criteria could be related to vertex coordinates.
I would greatly appreciate guidance on how to achieve the desired simplification of the alpha shape. Is there an alternative method or approach I can use to iterate over the vertices and remove specific vertices based on my criteria? Are there any available functions or techniques in CGAL that can help me achieve this simplification?
I appreciate any help or insights on this matter. Thank you in advance!