I am parametrizing a simple mesh (see the picture below) with the seam_Polyhedron_3.cpp example of CGAL 4.14.
I identified the vertices to "cut it open" that I wrote into a seam file (they lie along one polyline connecting the lower and upper boundary):
73 75 80 120
However, I am confused about what the line
halfedge_descriptor bhd = CGAL::Polygon_mesh_processing::longest_border(mesh).first;
returns: it seems to iterate through the lower boundary only. This I could check by counting the vertices on the boundary,
typedef typename boost::graph_traits<Mesh>::vertex_descriptor Mesh_vertex_descriptor;
Mesh_vertex_descriptor beg = source(bhd, mesh);
int i=0;
do
{
i++;
bhd = next(bhd, mesh);
}
while(source(bhd, mesh) != beg);
std::cout << "There were " << i << " vertices on the boundary." << std::endl;
which returned 34 (which, in turn, is the number of vertices on the lower boundary).
Question: How can I modify the construction of bhd
so that it encompasses the entire (virtual) boundary? I.e., the iteration I just showed should iterate through the lower boundary, seam upwards, upper boundary and the seam downwards and return 32 + 3 + 32 + 3 = 70?
So far I tried to find an alternative to longest_boundary and to see if there is a possibility to modify the behaviour through the named parameters. I also tried adding the vertices on the lower and upper boundaries to the mesh but this does not change anything, as noted in the documentation of Seam_mesh. Reversing the order of the seam vertices also made no visible change.
Thanks in advance!