Subject: CGAL users discussion list
List archive
- From: Vahid Azizi <>
- To:
- Subject: [cgal-discuss] Iterate over faces after delaunay triangulation
- Date: Wed, 7 Sep 2016 14:55:24 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:HbR37BFJgK69FF5pmZnySZ1GYnF86YWxBRYc798ds5kLTJ76oM+wAkXT6L1XgUPTWs2DsrQf2rOQ7fmrADZRqdbZ6TZZL8wKD0dEwewt3CUeQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYnbr+tQt2a3IyL0LW59JTXJglJnzGgeqhaLROsrAyXuNNFr5FlL/MPwxvIrjNhaeVExCs8O1vVlgT99MaY85tq8iAWsPUkoZ0TGZ7mdrg1GOQLRA8tNHo4sZXm
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
- [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.