Subject: CGAL users discussion list
List archive
- From: Manuel Caroli <>
- To:
- Subject: Re: [cgal-discuss] Delaunay triangulation by contour
- Date: Thu, 29 Jul 2010 10:41:28 +0200
Dear Aurélien,
I don't know the 2D mesher very well but there seems to be a member function is_in_domain() for the faces:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Mesh_2_ref/Concept_DelaunayMeshFaceBase_2.html
If you use this function to filter your output you should get what you want.
Hope this helps
Manuel
On 28/07/10 21:59, Aurélien .... wrote:
Hello everyone,
I have a polygon defined by a contour which is define by its points.
I tried to make a thing like a L :
__
| |
| |
| |___
|______|
But after drawing the faces, I have something like that
__
| \
| \
| \
|_____|
My code (approximative) :
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_vertex_base_2<K> Vbase;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned int,
K,Vbase> 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 CDT::Vertex_handle Vertex_handle;
typedef CDT::Point Point;
typedef CDT::Face_iterator Face_iterator;
typedef CDT::Vertex_iterator Vertex_iterator;
CDT cdt;
cdt.insert_constraint(Point(100, 100), Point(100, 200));
cdt.insert_constraint(Point(100, 200), Point(150, 200));
cdt.insert_constraint(Point(150, 200), Point(150, 150));
cdt.insert_constraint(Point(150, 150), Point(200, 150));
cdt.insert_constraint(Point(200, 150), Point(200, 100));
cdt.insert_constraint(Point(200, 100), Point(100, 100));
In fact, it's drawing all faces I need but also the face which make the
geometry wrong. The only difference I saw is that the "wrong face" was
in clockwise and others in counter clockwise...
Is there is a way to archieve what I want to make ?
Thank you very much,
Aurélien
- [cgal-discuss] Delaunay triangulation by contour, Aurélien . . . ., 07/28/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Aurélien . . . ., 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Aurélien . . . ., 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Aurélien . . . ., 07/29/2010
- Re: [cgal-discuss] Delaunay triangulation by contour, Manuel Caroli, 07/29/2010
Archive powered by MHonArc 2.6.16.