diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h index 8032314c532..caf6d97c1c1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h @@ -84,8 +84,9 @@ public: void intersection(const Point_3& query, const Primitive& primitive) { - const Index_type& id = get(index_map, primitive.id()); - std::cout << id << "\t" << primitive.patch_id() << std::endl; + const Index_type& id = primitive.patch_id(); +// get(index_map, primitive.id()); +// std::cout << id << "\t" << primitive.patch_id() << std::endl; CGAL_assertion(id == primitive.patch_id()); if(keep != (set_of_indices.count(id) > 0)) return; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h index 3f36d093648..7acd00572e4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h @@ -200,6 +200,7 @@ namespace internal { input_triangles_.push_back(triangle(f)); input_patch_ids_.push_back(get_patch_id(f)); } + CGAL_assertion(input_triangles_.size() == input_patch_ids_.size()); tree_ptr_ = new AABB_tree(input_triangles_.begin(), input_triangles_.end(), @@ -850,8 +851,8 @@ namespace internal { ); tree_ptr_->traversal(get(vpmap_, v), projection_traits); - if(!projection_traits.found()) - tree_ptr_->traversal(get(vpmap_, v), projection_traits); + CGAL_assertion(projection_traits.found()); + Point proj = projection_traits.closest_point(); put(vpmap_, v, proj); }