From 88958acc33c858e39a2a4eab29e9181ec2f9d216 Mon Sep 17 00:00:00 2001 From: Christina Vaz Date: Tue, 26 Jun 2018 18:43:11 -0400 Subject: [PATCH] case for border edges --- .../Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h | 7 ++++++- .../intrinsic_delaunay_triangulation_test.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h index f09d51d0224..cd527c6f4a6 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Intrinsic_Delaunay_Triangulation_3.h @@ -24,7 +24,7 @@ #define CGAL_INTRINSIC_DELAUNAY_TRIANGULATION_3_H #include - +#include #include #include @@ -217,6 +217,8 @@ namespace Intrinsic_Delaunay_Triangulation_3 { //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_border(ed,tm))) + { a++; change_edge_length(edge_i,ed); halfedge_descriptor hd = (halfedge(ed, tm)); @@ -252,6 +254,7 @@ namespace Intrinsic_Delaunay_Triangulation_3 { stack.push(next_edge); marked_edges(next_edge_i,0) = 1; } + } //then go back to top of the stack } } @@ -286,6 +289,8 @@ namespace Intrinsic_Delaunay_Triangulation_3 { } loop_over_edges(stack, mark_edges); + + } //todo:: determine which can be const TriangleMesh tm; diff --git a/Heat_method_3/test/Heat_method_3/intrinsic_delaunay_triangulation_test.cpp b/Heat_method_3/test/Heat_method_3/intrinsic_delaunay_triangulation_test.cpp index 2ae6b46d3f8..e4a01505302 100644 --- a/Heat_method_3/test/Heat_method_3/intrinsic_delaunay_triangulation_test.cpp +++ b/Heat_method_3/test/Heat_method_3/intrinsic_delaunay_triangulation_test.cpp @@ -27,7 +27,7 @@ int main() Mesh 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; if(!in || num_vertices(sm) == 0) { std::cerr << "Problem loading the input data" << std::endl;