Subject: CGAL users discussion list
List archive
- From: Vahid Azizi <>
- To:
- Subject: Re: [cgal-discuss] Iterate over faces after delaunay triangulation
- Date: Thu, 8 Sep 2016 15:15:23 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:Oo/5nRP5GEQ7BLq07Qol6mtUPXoX/o7sNwtQ0KIMzox0KPn8rarrMEGX3/hxlliBBdydsKMdzbSM+Pm7BSRAuc/H6yFaNsQUFlcssoY/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbtr8FoOatcmrzef6o8SVOFQRwmTnKuopcF329VyX7ZhOx9M6a+4Y8VjgmjNwYeNYxGdldxq4vi3XwYOOxqNl6DlaoPk79sRNAu3QdqU8SqFEXnx9azhmrJ6jiR6WRgSG4j4QU34djwFTKwnD9hDzGJnr4QXgse8o5iCaPMG+ZKI1SzXqu7liDhb6iTUGHzE8+WDTzMd3ifQI81qauxVjztuMM8muP/1kc/aFcA==
Thanks Jane. Yes, they are the functions i need. Finally i get it to work.
Best,
Vahid
On Thu, Sep 8, 2016 at 4:16 AM, Jane Tournois <> wrote:
Hi Vahid,
in 3D you have both a triangle() function
and a tetrahedron() fonction
Is this what you need?
Best,
Jane.
Le 07/09/2016 à 20:55, Vahid Azizi a écrit :
Hi all,
How could i iterate over faces and get their vertices after Delaunry triangulation? I searched the archives but didn't find something useful. Below is the sample which i work on it. In 2D delaunry triangulation there is triangle function for getting vertices of each face but it is not available for 3D delaunary triangulation. Thanks in advance.
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>#include <CGAL/Delaunay_triangulation_3.h>#include <CGAL/Triangulation_vertex_base_with_info_3.h>#include <CGAL/Triangulation_3.h>#include <CGAL/Triangulation_cell_base_3.h>#include <CGAL/Triangulation_cell_base_with_info_3.h>#include <CGAL/Triangulation_data_structure_3.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;typedef CGAL::Triangulation_vertex_base_with_info_3<unsigned, K> Vb;typedef CGAL::Triangulation_data_structure_3<Vb> Tds;typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;typedef Delaunay::Point Point;typedef Delaunay::Finite_facets_iterator Finite_face_iterator;
std::vector<Point> points;points.push_back(Point(0,0,0));points.push_back(Point(1,0,0));points.push_back(Point(0,1,0));points.push_back(Point(0,0,1));points.push_back(Point(1,1,0));points.push_back(Point(1,1,1));
Delaunay T(points.begin(), points.end());
std::cerr << T.number_of_vertices() << std::endl;std::cerr << T.number_of_facets() << std::endl;
Finite_face_iterator itc;
for ( itc = T.finite_facets_begin(); itc != T.finite_facets_end(); ++itc ){//std::cerr << T.triangle(itc) << std::endl;}
Best,--
Vahid
-- Jane Tournois, PhD R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Vahid
- [cgal-discuss] Iterate over faces after delaunay triangulation, Vahid Azizi, 09/07/2016
- Re: [cgal-discuss] Iterate over faces after delaunay triangulation, Jane Tournois, 09/08/2016
- Re: [cgal-discuss] Iterate over faces after delaunay triangulation, Vahid Azizi, 09/08/2016
- Re: [cgal-discuss] Iterate over faces after delaunay triangulation, Jane Tournois, 09/08/2016
Archive powered by MHonArc 2.6.18.