Skip to content

How can I get the index of cell #8701

Closed Answered by MaelRL
BBBBBbruce asked this question in Q&A
Discussion options

You must be logged in to vote

You could use https://doc.cgal.org/latest/Triangulation_3/classCGAL_1_1Triangulation__cell__base__with__info__3.html as cell base and store a unique IDs

typedef Triangulation_data_structure_3<
                         Triangulation_vertex_base_3<K>,
                         Delaunay_triangulation_cell_base_3<
                           K, Triangulation_cell_base_with_info_3<unsigned int, K> >
typedef CGAL::Delaunay_triangulation_3<K, TDS> Delaunay;

[...]
Delaunay T(points.begin(), points.end());
for (Delaunay::Finite_cells_iterator it = Tet.finite_cells_begin(); it != Tet.finite_cells_end(); ++it) {
  Cell_handle c = it;
  c->info() = ...;   // set up unique ID
}

[...]

Cell_handle quer…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BBBBBbruce
Comment options

Answer selected by BBBBBbruce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants