Subject: CGAL users discussion list
List archive
- From: Mael Rouxel-Labbé <>
- To:
- Subject: Re: [cgal-discuss] Constrained triangulation issue
- Date: Wed, 14 Mar 2018 10:29:41 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:H66KSBTKToP7fd1MvexJ6ZwgNtpsv+yvbD5Q0YIujvd0So/mwa6yYxGN2/xhgRfzUJnB7Loc0qyK6/umATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfb1/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6bO+Fzfr/ecN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAoof6vVQBsx++ChGwCuPo1z9JiWH53akj3+onCw7JxxcvGMgTu3nTqdX6LrkdUeSvwKnSyjXDcvxX1in56ITSdhAuu+qDUqlufsfKxkkgCQTFjlCOpoz5JTOU1uoNvHKH4Op8UuKvkW4mpxttrTiow8chk4/EjZ8bxFDD8CV22oc1JdugRU50YN6kDJtQtzyBOIdsXswiRGRotSAnwbMFoZ62ZCcHxZU9yxLCd/CKc5KE7x3hWeqLPDt1hXBodKqxihuw60Ss1+/xW8eu3FpXrCdIk8PAu3IQ2xHV98OJUOFy/l271jaKzw3T6v9LIUQzlafDNpIt36Q8lp8UsUnDBCP2nV/5jK6Sdkk9/eio9vjnbq/hpp+CN494kAf+PboymsCnAOQ4NBYBX3SD9Omz1bDv51D1TKlKg/EsnaTUsorWKdkaq6O7GwNV15ws6xe7DzeoytQYmnwHIUpAeB2dkYfpP0vCIOr/DfeijFWjjjNry+rCPrL7GZrCNWbMnazufblj7E5czRQ8zcxF55NUBLEOOu78WlP2tNzCDh41KRC7w+HiCNllzIMRRXqPArOFMKPVqVKH+u0vLPOIZIMMpTn9KuMl6OLzjX8igl8QZrKp3JsSaHCgBPtqOUSZYXz2gtcAC2gGpAQ+TPa5wGGFBDVcbnL3U6Mn7SwgE6qnC53CT8ajmu+vxiC+S7hfa2RxMFeRAXrsMqGNUf2NIHaXK8Jl1CYDSKisT8kl3BukuSf1xr1iI/bO6yMRvo7kzskz7OrWw0JhvQdoBtiQhjneB1p/mXkFEmdvjfJP5Hdlw1LG6pBWxvlRFNhd/fRMCF5oOpPbyuFmEcH8Uwndec2YDl2hR4f+WG1jfpcK29YLJn1FNZC6lBmZhnilDrgQmqCRFZI9+b7bxWm3LMF4mS6fifsRymI+S84KDlWIw65y8w+JWtyQygOckPvscK0d2GvK6XvFynSO+kdVTFwoXA==
For the record, this issue is discussed on the github of CGAL:
https://github.com/CGAL/cgal/issues/2924
On 13/03/2018 12:12, Arnold Song wrote:
> Has anyone else encountered an issue with degenerate faces in a
> Constrained Delaunay Triangulation?
>
> I'm trying to generate a Delaunay triangulation of a square domain
> that has non-axis aligned sides. When I run two refinement steps, the
> mesh contains 4 triangles, with 1 degenerate triangle with area 0. I
> expect to have 3 triangles. It appears that the degenerate triangle
> is generated with the star_hole when the new point in the refinement
> is inserted. I haven't seen a place where there is a check for area 0
> (or very small area) triangles and subsequent removal. Any
> suggestions would be wonderful.
>
> Best,
> Arnold
>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
> #include <CGAL/Constrained_Delaunay_triangulation_2.h>
>
> #include <CGAL/Delaunay_mesher_2.h>
> #include <CGAL/Delaunay_mesh_face_base_2.h>
> #include <CGAL/Delaunay_mesh_vertex_base_2.h>
> #include <CGAL/Delaunay_mesh_size_criteria_2.h>
>
> #include <CGAL/Voronoi_diagram_2.h>
> #include <CGAL/Delaunay_triangulation_adaptation_traits_2.h>
> #include <CGAL/Delaunay_triangulation_adaptation_policies_2.h>
>
> #include <CGAL/Boolean_set_operations_2.h>
>
> #include <CGAL/Cartesian_converter.h>
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef CGAL::Triangulation_vertex_base_2<K> Vb;
> typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
> typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
> typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
> typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
> typedef CGAL::Delaunay_mesher_2<CDT, Criteria> Mesher;
>
> typedef CGAL::Delaunay_triangulation_adaptation_traits_2<CDT>
> AT;
> typedef
> CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2<CDT> AP;
> typedef CGAL::Voronoi_diagram_2<CDT,AT,AP>
> VD;
>
> typedef CGAL::Exact_predicates_exact_constructions_kernel exactK;
> typedef K::Point_2 Point;
> typedef CGAL::Polygon_2<exactK> Polygon;
> typedef CGAL::Vector_2<K> Vector_2;
> typedef CGAL::Polygon_with_holes_2<exactK> Polygon_with_holes_2;
> typedef CGAL::Cartesian_converter<exactK,K> EK_to_IK;
>
>
> // The constrained Delaunay triangulation (dual of the Voronoi)
> CDT cdt;
>
> cdt.insert_constraint(boundaryPts.begin(), boundaryPts.end(), true);
>
> Mesher mesher(cdt);
> mesher.init(false);
> mesher.set_criteria(Criteria(0.25, 1.0));
> std::cout <<"\nNumber of faces: " << cdt.number_of_faces() << "\n"
> << std::endl;
>
> std::cout << "\nFirst refinement step:" << std::endl;
> mesher.try_one_step_refine_mesh();
> std::cout <<"\nNumber of faces: " << cdt.number_of_faces() << "\n"
> << std::endl;
>
> std::cout << "\nSecond refinement step:" << std::endl;
> std::cout << "Is refinement done: " << mesher.is_refinement_done()
> << std::endl;
> mesher.try_one_step_refine_mesh();
> std::cout <<"\nNumber of faces: " << cdt.number_of_faces() << "\n"
> << std::endl;
- [cgal-discuss] Constrained triangulation issue, Arnold Song, 03/13/2018
- Re: [cgal-discuss] Constrained triangulation issue, Florian Prud'homme, 03/13/2018
- Re: [cgal-discuss] Constrained triangulation issue, Mael Rouxel-Labbé, 03/14/2018
Archive powered by MHonArc 2.6.18.