Skip to content

Delaunay triangulation 3D with CGAL #6140

Answered by sloriot
ReeNine asked this question in Q&A
Discussion options

You must be logged in to vote

As documented here a face is a pair containing a cell and the id in the cell of the vertex opposite to that face. So you can access vertices of the face using:

for (Delaunay::Finite_facets_iterator  fit=T.finite_facets_begin(), end=T.finite_facets_end(); fit!=end; ++fit)
{
  Delaunay::Facet f = *fit;
  Delaunay::Vertex_handle vh0 = f.first->vertex( T.vertex_triple_index(f.second, 0) );
  Delaunay::Vertex_handle vh1 = f.first->vertex( T.vertex_triple_index(f.second, 1) );
  Delaunay::Vertex_handle vh2 = f.first->vertex( T.vertex_triple_index(f.second, 2) );
}

This will give you handles to vertices of the facet.

If you need input ids, then you have to use something like in this example. To…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@afabri
Comment options

afabri Jun 19, 2023
Collaborator

@MagicalNamNam
Comment options

@sloriot
Comment options

@afabri
Comment options

afabri Jun 19, 2023
Collaborator

@MagicalNamNam
Comment options

Answer selected by lrineau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #6138 on November 19, 2021 13:50.