Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Function for finding the index of a neighboring cell when adjacency relations haven't been set?
Chronological Thread
- From: Pranav Kant Gaur <>
- To:
- Subject: Re: [cgal-discuss] Function for finding the index of a neighboring cell when adjacency relations haven't been set?
- Date: Tue, 23 Jun 2015 11:34:38 +0530
Hi Adam,
AFAIK there is no such function in Triangulation class. But have you tried Combinatorial maps in CGAL...you can create d-cells and check if two d-cells are adjacent to each other using a predicate is_sewable<d>(c1, c2).http://doc.cgal.org/latest/Combinatorial_map/index.html
On Tue, Jun 23, 2015 at 5:22 AM, Adam Getchell <> wrote:
Hello all,I might have missed it, but I’m looking for a function that finds the index of a neighboring cell with respect to the first cell.The catch is I have just created these cells.I can use something like:int neighbor_index;first->has_neighbor(second, neighbor_index)But that only works when adjacency relationships are set. (When they are not set, these ints seem to point to memory addresses.)I’m working on the opposite problem, setting adjacencies by finding cells with overlapping sets of vertices.So far I’m using std::set_difference and set::union from <algorithm> to do this by brute force.That is, given a list of newly created 3D cells, pairwise find those that have exactly 3 vertices in common using set::union, and then use set_adjacency(first, neighbor_index, second, neighbor_mirror_index) to set adjacency relations.(In higher dimensions I would change the criteria accordingly.)BTW, it seems these want sorted ranges. Are Vertex_handles sortable (is operator< defined)?Thank you for any comments.Adam Getchell
about.me/adamgetchell
- [cgal-discuss] Function for finding the index of a neighboring cell when adjacency relations haven't been set?, Adam Getchell, 06/23/2015
- Re: [cgal-discuss] Function for finding the index of a neighboring cell when adjacency relations haven't been set?, Adam Getchell, 06/23/2015
- Re: [cgal-discuss] Function for finding the index of a neighboring cell when adjacency relations haven't been set?, Pranav Kant Gaur, 06/23/2015
Archive powered by MHonArc 2.6.18.