mirror of https://github.com/CGAL/cgal
case for border edges
This commit is contained in:
parent
9304dfa106
commit
88958acc33
|
|
@ -24,7 +24,7 @@
|
||||||
#define CGAL_INTRINSIC_DELAUNAY_TRIANGULATION_3_H
|
#define CGAL_INTRINSIC_DELAUNAY_TRIANGULATION_3_H
|
||||||
|
|
||||||
#include <CGAL/license/Heat_method_3.h>
|
#include <CGAL/license/Heat_method_3.h>
|
||||||
|
#include <CGAL/Surface_mesh.h>
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
@ -217,6 +217,8 @@ namespace Intrinsic_Delaunay_Triangulation_3 {
|
||||||
//if the edge itself is not locally delaunay, go back
|
//if the edge itself is not locally delaunay, go back
|
||||||
if(!(is_edge_locally_delaunay(ed))) // && !CGAL::is_boundary(ed,tm)) need to fix this
|
if(!(is_edge_locally_delaunay(ed))) // && !CGAL::is_boundary(ed,tm)) need to fix this
|
||||||
{
|
{
|
||||||
|
if(!(is_border(ed,tm)))
|
||||||
|
{
|
||||||
a++;
|
a++;
|
||||||
change_edge_length(edge_i,ed);
|
change_edge_length(edge_i,ed);
|
||||||
halfedge_descriptor hd = (halfedge(ed, tm));
|
halfedge_descriptor hd = (halfedge(ed, tm));
|
||||||
|
|
@ -252,6 +254,7 @@ namespace Intrinsic_Delaunay_Triangulation_3 {
|
||||||
stack.push(next_edge);
|
stack.push(next_edge);
|
||||||
marked_edges(next_edge_i,0) = 1;
|
marked_edges(next_edge_i,0) = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//then go back to top of the stack
|
//then go back to top of the stack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -286,6 +289,8 @@ namespace Intrinsic_Delaunay_Triangulation_3 {
|
||||||
}
|
}
|
||||||
loop_over_edges(stack, mark_edges);
|
loop_over_edges(stack, mark_edges);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//todo:: determine which can be const
|
//todo:: determine which can be const
|
||||||
TriangleMesh tm;
|
TriangleMesh tm;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ int main()
|
||||||
Mesh sm;
|
Mesh sm;
|
||||||
Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),sm);
|
Vertex_distance_map vertex_distance_map = get(Vertex_distance_tag(),sm);
|
||||||
|
|
||||||
std::ifstream in("data/spot_badmesh.off");
|
std::ifstream in("data/camel_not_delaunay.off");
|
||||||
in >> sm;
|
in >> sm;
|
||||||
if(!in || num_vertices(sm) == 0) {
|
if(!in || num_vertices(sm) == 0) {
|
||||||
std::cerr << "Problem loading the input data" << std::endl;
|
std::cerr << "Problem loading the input data" << std::endl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue