diff --git a/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h index 948ecdbb497..792fbbddaa2 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h @@ -99,7 +99,7 @@ returns the squared length of `s`. Kernel::FT squared_length() const; /*! -returns the vector `s.target()` - `s`.`source()`. +returns the vector `s.target()` - `s.source()`. */ Vector_3 to_vector() const; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h index 71cba41b6cd..5ee5ce25b2b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h @@ -32,6 +32,10 @@ #include #include +#ifdef CGAL_DEBUG_DECIMATION +#include +#endif + #include #include @@ -243,7 +247,7 @@ bool is_edge_between_coplanar_faces(edge_descriptor e, Point_ref_3 s = get(vpm, target(next(opposite(h, tm), tm), tm) ); if (coplanar_cos_threshold==-1) - return coplanar(p, q, r, s); + return coplanar(p, q, r, s) && coplanar_orientation(p, q, r, s)!=CGAL::POSITIVE; else { typename Kernel::Compare_dihedral_angle_3 pred; @@ -848,6 +852,10 @@ bool decimate_impl(const TriangleMeshIn& tm_in, if (!is_polygon_soup_a_polygon_mesh(faces)) { +#ifdef CGAL_DEBUG_DECIMATION + CGAL::IO::write_polygon_soup("soup.off", corners, faces); + std::cout << "the output is not a valid polygon mesh!" << std::endl; +#endif return false; }