CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.87k stars 1.38k forks source link

Mesh simplification: does CGAL supports stop condition using number(or ratio) of vertices? #4087

Closed LYHTHU closed 5 years ago

LYHTHU commented 5 years ago

I can only find stop conditions using the number or ratio of the faces.

MaelRL commented 5 years ago

There is no such stop condition, but you can very easily write your own, based on Count_stop_predicate (or the stop ratio). You will need to match the signature (see the StopPredicate concept) for operator() and you can grab the number of vertices in your mesh from the edge profile class (https://doc.cgal.org/latest/Surface_mesh_simplification/classEdgeProfile.html#a34d6305eb4c4e7b32938980c8d718acb).