Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] A simple question

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] A simple question


Chronological Thread 
  • From: Daniel Duque Campayo <>
  • To:
  • Subject: Re: [cgal-discuss] A simple question
  • Date: Mon, 10 Dec 2007 14:22:34 +0100

Hello,

I've run a debugger on this program, and

> Halfedge_handle hh = fd->halfedge();
> std::cerr << "All is ok." << std::endl;

All is not quite OK: hh is pointed to 0! Hence the seg fault when trying
> Vertex_handle vh2 = fd->halfedge()->vertex(); //segmentation fault

This seems to fix the problem:

> Facet_handle app2( Polyhedron & P){
>         return P.facets_begin();}

I.e., just pass P by reference (const Polyhedron &P should be more elegant).

Why? I don't know. Passing by reference should be more efficient only...

Best,

Daniel


--
Daniel Duque
http://rincon.uam.es/dir?cw=950067138671875




Archive powered by MHonArc 2.6.16.

Top of Page