Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Change in internal structure Arrangement_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Change in internal structure Arrangement_2


Chronological Thread 
  • From: Mateus Bellomo <>
  • To:
  • Subject: Re: [cgal-discuss] Change in internal structure Arrangement_2
  • Date: Sat, 13 Feb 2016 23:25:23 -0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:C0mM6Bb8uYKhqzGmpQSzJ8//LSx+4OfEezUN459isYplN5qZpci9bnLW6fgltlLVR4KTs6sC0LqJ9fuwEjVRuN6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDtvcaDKFwZ3XKUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGfayQ6NtRrNRCHEqMns++dbwnRjFVwqGoHUGAUsMlR8dJgHZ4QzhFr38ti/9s+01jCyTIcDrVro5XTCl6qBDRxrhiSNBPDk8pjKEwvdshb5W9Ury7yd0xJTZNdmY

Thanks Efi.

In fact I tried something else. Correct if I'm wrong but Vertex_handle is a pointer, right? Because I created a vector of Vertex_handle (instead of Vertex_handle pointer) and apparently it was working. But sometimes my program breaks and got a segmentation fault in some CGAL module. Do you think that it's because the Vertex_handle is being deallocated?

I tried same thing with faces (created a vector of Face_handle) and I was getting weird behavior (one vertex was changing it's coordinates without my program changing it). So I suspect it's something to do with this handles not being what I expect.  What do you think?

2016-02-11 5:13 GMT-02:00 Efi Fogel <>:
When you alter the arrangement, cells (i.e., vertices, halfedges, and faces) come and go and they get allocated and deallocated, respectively. You can use an observer to keep track of the changes.


   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/



On Thu, Feb 11, 2016 at 2:47 AM, Mateus Bellomo <> wrote:
Hello all,

I would like to know if CGAL deallocate and allocate the internal structures (as vertices for example) as we use some functions in Arrangement_2.

I'm asking this because I want to iterate over Arrangement_2 vertices in a specific order so I've created a vector of Vertex pointer and push back to it as I was creating the Arrangement vertices. After that I've tried to iterate over this vector and I'm getting wrong information (and sometimes segmentation fault).

So I was wondering if CGAL deallocate this vertices created in the beginning and allocate it in somewhere else.

Thanks for the help.

PS: I already know the possibility of extending the Vertex class and add an index to it but I need to iterate over this vertices in the most efficient way (O(n)).







Archive powered by MHonArc 2.6.18.

Top of Page