Fix using invalid facerange ('remove_degen_faces(fr)' and then using 'fr')

Actually, just get rid of the whole remove_degen_faces(). That's the user's
responsability to use a proper, clean input mesh.
This commit is contained in:
Mael Rouxel-Labbé 2019-05-20 15:37:10 +02:00
parent af8e6813ae
commit 2d88e227c9
2 changed files with 2 additions and 27 deletions

View File

@ -94,13 +94,6 @@ public:
tree_ptr_->accelerate_distance_queries();
}
std::size_t remove_degenerate_faces()
{
std::size_t nb_removed_faces = 0;
nb_removed_faces = CGAL::Polygon_mesh_processing::remove_degenerate_faces(mesh_);
return nb_removed_faces;
}
void angle_relaxation()
{
std::map<vertex_descriptor, Point_3> barycenters;

View File

@ -114,16 +114,7 @@ void smooth_angles(const FaceRange& faces,
std::size_t nb_iterations = choose_param(get_param(np, internal_np::number_of_iterations), 1);
bool do_project = choose_param(get_param(np, internal_np::do_project), true);
internal::Compatible_smoother<PolygonMesh, VertexPointMap, VCMap, GeomTraits>smoother(pmesh, vpmap, vcmap, gt);
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
t.stop();
std::cout << " done ("<< t.time() <<" sec)." << std::endl;
std::cout << "Removing degenerate faces..." << std::endl;
t.reset(); t.start();
#endif
smoother.remove_degenerate_faces();
internal::Compatible_smoother<TriangleMesh, VertexPointMap, VCMap, GeomTraits> smoother(tmesh, vpmap, vcmap, gt);
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
t.stop();
@ -253,16 +244,7 @@ void smooth_areas(const FaceRange& faces, PolygonMesh& pmesh, const NamedParamet
const double gd_precision = choose_param(get_param(np, internal_np::gradient_descent_precision), 1e-5);
bool do_project = choose_param(get_param(np, internal_np::do_project), true);
internal::Compatible_smoother<PolygonMesh, VertexPointMap, VCMap, GeomTraits> smoother(pmesh, vpmap, vcmap, gt);
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
t.stop();
std::cout << " done ("<< t.time() <<" sec)." << std::endl;
std::cout << "Removing degenerate faces..." << std::endl;
t.reset(); t.start();
#endif
smoother.remove_degenerate_faces();
internal::Compatible_smoother<TriangleMesh, VertexPointMap, VCMap, GeomTraits> smoother(tmesh, vpmap, vcmap, gt);
#ifdef CGAL_PMP_SMOOTHING_VERBOSE
t.stop();