diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/fast.cpp b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/fast.cpp index e68b0980e32..20cf6834d21 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/fast.cpp +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/fast.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include #include @@ -28,7 +28,7 @@ int main(int argc, char* argv[]) typedef std::array Vector3i; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; - typedef CGAL::Envelope Envelope; + typedef CGAL::Polyhedral_envelope Envelope; std::vector env_vertices; std::vector env_faces; diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index f47df8aaa99..e9cc54c53ca 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -1745,13 +1745,6 @@ private: halfspace[i].emplace_back(plane);// number 2 - if (obtuse != 1) { - plane = get_corner_plane(ver[faces[i][1]], midpoint(ver[faces[i][0]], ver[faces[i][2]]) , normal, - tolerance, use_accurate_cross); - halfspace[i].emplace_back(plane);// number 3; - - } - edgedire = normalize(BC); // if (use_accurate_cross)edgenormaldist = accurate_cross_product_direction(ORIGIN, edgedire, ORIGIN, normal)*tolerance; // else @@ -1762,12 +1755,6 @@ private: ver[faces[i][1]] + edgenormaldist + normal); halfspace[i].emplace_back(plane);// number 4 - if (obtuse != 2) { - plane = get_corner_plane(ver[faces[i][2]], midpoint(ver[faces[i][0]], ver[faces[i][1]]), normal, - tolerance,use_accurate_cross); - halfspace[i].emplace_back(plane);// number 5; - - } edgedire = -normalize(AC); // if (use_accurate_cross)edgenormaldist = accurate_cross_product_direction(ORIGIN, edgedire, ORIGIN , normal)*tolerance; @@ -1779,11 +1766,21 @@ private: ver[faces[i][0]] + edgenormaldist + normal); halfspace[i].emplace_back(plane);// number 6 + + if (obtuse != 1) { + plane = get_corner_plane(ver[faces[i][1]], midpoint(ver[faces[i][0]], ver[faces[i][2]]) , normal, + tolerance, use_accurate_cross); + halfspace[i].emplace_back(plane);// number 3; + } if (obtuse != 0) { plane = get_corner_plane(ver[faces[i][0]], midpoint(ver[faces[i][1]], ver[faces[i][2]]) , normal, - tolerance,use_accurate_cross); + tolerance,use_accurate_cross); halfspace[i].emplace_back(plane);// number 7; - + } + if (obtuse != 2) { + plane = get_corner_plane(ver[faces[i][2]], midpoint(ver[faces[i][0]], ver[faces[i][1]]), normal, + tolerance,use_accurate_cross); + halfspace[i].emplace_back(plane);// number 5; } #ifdef CGAL_ENVELOPE_DEBUG