Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] How to get some info from a Delaunay Triangulation
- Date: Wed, 09 May 2012 08:28:44 +0200
On 05/08/2012 02:55 PM, horstmann wrote:
Hi everyone,t.number_of_finite_cells() [1]
I'm almost new to CGAL and I have a Dealunay 3 Triangulation as in the
example: "39.5.5 Fast Point Location for Delaunay Triangulations" in the
following link:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3/Chapter_main.html
CGAL Triangulation_3 Documentation .
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
typedef Delaunay::Point Point;
std::vector<Point> P;
// Insert some points.....
Delaunay dt(P.begin(), P.end());
Then, I perform its convex_hull:
// define polyhedron to hold convex hull
CGAL::Polyhedron_3<K> poly;
// Get only the surface
convex_hull_3_to_polyhedron_3(dt,poly);
Once I have the triangulation and its conex_hull performed in dt and poly, I
need to get the following info:
- number of tetrahedron in the triangulation. (Is that just the number of
cells?¿)
- for each tetrahedron, the position of its four vertices (in ascending
order).
Triangulation::Cell_handle cell=....
cell->vertex(i).point(); //for i=0; i<4
cf [2,3]
Iterate over infinite cells
- for each tetrahedron on the convex hull, the index (local index, i.e. in
1-4) of the vertex NOT on the convex hull
(use the range all_cells_begin(),all_cell_end() and the is_infinite(Cell_handle) function documented in [1])
For each such cell, get the index of the infinite vertex,
using int i=cell->index(t.infinite_vertex()). Then use
Facet f=t.mirror_facet( Facet_3(cell,i) );
where Facet is
"typedef std::pair<Cell_handle, int> Facet;
(c,i) is the facet of c opposite to the vertex of index i"
as documented in [2]
Sebastien.
[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html
[2] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3--Cell.html
[3] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3--Vertex.html
Could anyone lend me a hand with that?¿?
Thank you so much in advance!!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-to-get-some-info-from-a-Delaunay-Triangulation-tp4617393.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How to get some info from a Delaunay Triangulation, horstmann, 05/08/2012
- Re: [cgal-discuss] How to get some info from a Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 05/09/2012
- Re: [cgal-discuss] How to get some info from a Delaunay Triangulation, Olivier Devillers, 05/09/2012
- [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, horstmann, 05/09/2012
- Re: [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 05/09/2012
- Re: [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, Andreas Fabri, 05/09/2012
- [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, horstmann, 05/09/2012
- Re: [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, Philipp Moeller, 05/09/2012
- Re: [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, J.S. van Bethlehem, 05/09/2012
- [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, horstmann, 05/10/2012
- Re: [cgal-discuss] Re: How to get some info from a Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 05/09/2012
- Re: [cgal-discuss] How to get some info from a Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 05/09/2012
Archive powered by MHonArc 2.6.16.