Subject: CGAL users discussion list
List archive
- From: Aurélien .... <>
- To:
- Subject: [cgal-discuss] Delaunay triangulation 2D
- Date: Mon, 26 Jul 2010 22:59:28 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hFi75xN+q9Vx7R2ziF/7X7CKaDLKf/0uMHpgZ1xUSSI8nK6tQ5hLs3Kyl6/S5UAM+3 FJdhYrm4CvA59StSMfn6dr+7mtcH3c/DKBskRBkiA+Kn6Omtgr6HQaphJs3RXjC155yn PU05/XnPYlSHblM/fkTsAbBJTgq1JfTe0RAq8=
Hello everyone,
I'm totally lost and I need some help.
I have outer points which define an outer polygon. Then, I have inner point which define holes.
I need to triangulation this 2D form.
I tried a delaunay triangulation like this :
#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_size_criteria_2.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 CDT::Vertex_handle Vertex_handle;
typedef CDT::Point Point;
typedef CDT::Face_iterator Face_iterator;
CDT cdt;
// Insert point by point with cdt.insert
Mesher mesher(cdt); mesher.refine_mesh();
for(Face_iterator oFaceIt = cdt.faces_begin(); oFaceIt != cdt.faces_end(); ++oFaceIt)
{
// Add vertex 0, 1, 2 to the vertex array
// Add 0, 1, 2 to the face indices array
}
The graphic result is not correct.
First of all, I have 212 faces for 145 vertices. Is there is a possibility to have the index of the vertices instead their coords ? In order to enter to the graphic engine 145 vertices and not 212 * 3 ?
After, what's the diferences between faces, finite_faces and all_faces ?
Is their an xample to show these problematics solved together ?
Thank you very much,
Aurélien
- [cgal-discuss] Delaunay triangulation 2D, Aurélien . . . ., 07/26/2010
- Re: [cgal-discuss] Delaunay triangulation 2D, Sebastien Loriot (GeometryFactory), 07/27/2010
- Re: [cgal-discuss] Delaunay triangulation 2D, Aurélien . . . ., 07/27/2010
- Re: [cgal-discuss] Delaunay triangulation 2D, Sebastien Loriot (GeometryFactory), 07/27/2010
- Re: [cgal-discuss] Delaunay triangulation 2D, Aurélien . . . ., 07/27/2010
- Re: [cgal-discuss] Delaunay triangulation 2D, Sebastien Loriot (GeometryFactory), 07/27/2010
Archive powered by MHonArc 2.6.16.