The function is_valid checks the validity of a given arrangement.
#include <CGAL/Arrangement_2.h>
template<typename Traits, typename Dcel> | ||
bool | is_valid ( Arrangement_2<Traits, Dcel> arr) |
Invokes the member function arr.is_valid() to verify the topological correctness of the arrangement. Then it performs additional validity tests. It checks that all x-monotone curves associated with arrangement edges are pairwise disjoint in their interior. Then it makes sure that all holes and all isolated vertices are located within the proper arrangement faces. Note that the test carried out by this function may take a considerable amount of time; it is recommended to be used only for debugging purposes.