Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Surface facet from Triangulation_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Surface facet from Triangulation_3


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Surface facet from Triangulation_3
  • Date: Mon, 06 Dec 2010 14:46:15 +0100

piroshiki wrote:

Thank you for your reply. I appreciate your help.

But I cannot write a code that works fine.

My code is like this :
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K> Triangulation;
typedef Triangulation::Cell_handle Cell_handle;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Locate_type Locate_type;
typedef Triangulation::Point Point;
typedef Triangulation::Facet Facet;

・・・

std::list< Cell_handle > cells;
T.incident_cells( T.infinite_vertex( ), std::back_inserter( cells ) );
std::list< Cell_handle >::iterator cit;
for( cit = cells.begin()( ); cit != cells.end( ); cit++ ){
Cell_handle tmp_cell = *cit;
std::make_pair( tmp_cell, tmp_cell.index( T.infinite_vertex( ) ) );

}


"tmp_cell" is Triangulation::Cell_handle, and it doesn't have "index"
a handle is a kind of pointer.
try tmp_cell->index( T.infinite_vertex( ) )

"c.index( Vertex_handle v)" is written here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3--Cell.html

So, I think I have to use TriangulationDataStructure_3::Cell, but I don't
know how I can do it.
And I don't know how to get facets(c, i) after execute std::make_pair,
either.
I don't know what you mean but a facet is a pair(c,i) so that
you can access the three vertices of the facet like this

c->vertex( (i+1) %4)
c->vertex( (i+2) %4)
c->vertex( (i+3) %4)


S.





Archive powered by MHonArc 2.6.16.

Top of Page