Subject: CGAL users discussion list
List archive
- From: Mateus Bellomo <>
- To:
- Subject: Re: [cgal-discuss] Change in internal structure Arrangement_2
- Date: Sun, 14 Feb 2016 07:14:15 -0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:2spPmhzXhHn+f7XXCy+O+j09IxM/srCxBDY+r6Qd0e4RIJqq85mqBkHD//Il1AaPBtWErakUwLCJ4ujJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6NyZ/nnLrtqtX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqrze+E0TKdTES89G2Ez/szi8xfZHiWV4X5Jd2wKnwdTSyLI6BX9W5C55i7zqudgwyOXOcnxSLccVjGr7qMtQxjt3nRUfwUl+X3a35QjxJlQpwis8kRy
I'm using the Arr_extend_dcel so my vertices (and faces) have two more fields. I was wondering if there is a way to define this extra fields at the same time that the vertex is created. If this is possible, I would have sure that the vertex passed as parameter in observer function after_create_vertex() has the updated information attached to it and I could use it to update my vector accordingly (that is supposing that my vertices are being deallocated and allocated in somewhere else at the runtime).
2016-02-14 5:36 GMT-02:00 Efi Fogel <>:
Formally, a handle is not a pointer, but In many ways a handle can be thought as a pointer.When a cell (e.g., vertex, halfedge, and face) are no longer needed, they are deallocated, and the space it occupies is free for grabs. Later on, when a new cell is allocated it may use the space of an old deallocated cell; this might be the reason for the phenomena you describe where a vertex seemingly changes without an apparent cause.____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/On Sun, Feb 14, 2016 at 3:25 AM, Mateus Bellomo <> wrote: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?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?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:So I was wondering if CGAL deallocate this vertices created in the beginning and allocate it in somewhere else.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).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.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)).
- [cgal-discuss] Change in internal structure Arrangement_2, Mateus Bellomo, 02/11/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Efi Fogel, 02/11/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Mateus Bellomo, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Efi Fogel, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Mateus Bellomo, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Efi Fogel, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Mateus Bellomo, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Efi Fogel, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Mateus Bellomo, 02/14/2016
- Re: [cgal-discuss] Change in internal structure Arrangement_2, Efi Fogel, 02/11/2016
Archive powered by MHonArc 2.6.18.