mirror of https://github.com/CGAL/cgal
bugfix. endleft and endright were not initialized if the surface has a border
This commit is contained in:
parent
f2b7e919ae
commit
d4f88fd138
|
|
@ -135,16 +135,16 @@ void Edge_profile<ECM>::Extract_triangles_and_link()
|
||||||
{
|
{
|
||||||
// look at the two faces or holes adjacent to edge (v0,v1)
|
// look at the two faces or holes adjacent to edge (v0,v1)
|
||||||
// and at the opposite vertex if it exists
|
// and at the opposite vertex if it exists
|
||||||
edge_descriptor endleft, endright;
|
edge_descriptor endleft = next_edge(v1_v0(), surface_mesh());
|
||||||
|
edge_descriptor endright = next_edge(v0_v1(), surface_mesh());
|
||||||
|
|
||||||
if(vL() != vertex_descriptor()){
|
if(vL() != vertex_descriptor()){
|
||||||
mLink.push_back(vL());
|
mLink.push_back(vL());
|
||||||
mTriangles.push_back(Triangle(v0(),v1(),vL()) ) ;
|
mTriangles.push_back(Triangle(v0(),v1(),vL()) ) ;
|
||||||
endright = next_edge(v0_v1(), surface_mesh());
|
|
||||||
}
|
}
|
||||||
if(vR() != vertex_descriptor()){
|
if(vR() != vertex_descriptor()){
|
||||||
mLink.push_back(vR());
|
mLink.push_back(vR());
|
||||||
mTriangles.push_back(Triangle(v1(),v0(),vR()) ) ;
|
mTriangles.push_back(Triangle(v1(),v0(),vR()) ) ;
|
||||||
endleft = next_edge(v1_v0(), surface_mesh());
|
|
||||||
}
|
}
|
||||||
// counterclockwise around v0
|
// counterclockwise around v0
|
||||||
edge_descriptor e02 = opposite_edge(prev_edge(v0_v1(),surface_mesh()), surface_mesh());
|
edge_descriptor e02 = opposite_edge(prev_edge(v0_v1(),surface_mesh()), surface_mesh());
|
||||||
|
|
@ -165,7 +165,7 @@ void Edge_profile<ECM>::Extract_triangles_and_link()
|
||||||
mLink.push_back(v);
|
mLink.push_back(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vounterclockwise around v1
|
// counterclockwise around v1
|
||||||
e02 = opposite_edge(prev_edge(v1_v0(),surface_mesh()), surface_mesh());
|
e02 = opposite_edge(prev_edge(v1_v0(),surface_mesh()), surface_mesh());
|
||||||
v2 =target(e02,surface_mesh());
|
v2 =target(e02,surface_mesh());
|
||||||
while(e02 != endright) {
|
while(e02 != endright) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue