Subject: CGAL users discussion list
List archive
- From: Jane Tournois <>
- To:
- Subject: Re: [cgal-discuss] Iterate over faces after delaunay triangulation
- Date: Thu, 8 Sep 2016 10:16:25 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:UXyvOxUArpxynzttTjN0Scr5oErV8LGtZVwlr6E/grcLSJyIuqrYZR2Ht8tkgFKBZ4jH8fUM07OQ6PG5HzJZqszQ6jhCKMUKDEBVz51O3kQJO42sNw7SFLbSdSs0HcBPBhdO3kqQFgxrIvv4fEDYuXao7DQfSV3VPAtxIfnpSMaJ15zkn7P6x5qGaApBgH+xYKh5MQ6thQTXrMgfx4V4eYgrzR6cgHJOdqxqwn5yI1WShF6o5M628dh/9DlKvfUg7OZPXKL/crgiXLJRByghKXFz78ru40qQBTCT72cRBz1F2iFDBBLIuUn3
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/ |
- [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.