Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.
  • Date: Mon, 14 Jan 2008 13:36:55 +0100

Hi Stephen,

the problem with your file is that you have points defined
by double coordinates and facets that have more than three
vertices. Since we use exact arithmetic, it is necessary that
all points of a facet define the same plane. This is often not
the case when the points have floating-point coordinates. So,
you have two possibilities to solve the problem: either you
triangulate your facets by hand, or you use the construction
provided by the OFF_to_nef_3 function. I guess I will add the
triangulation to the constructor for the next release.

Peter

P.S. The model in your file is indeed two-manifold. So you don't have
that problem.


On Sat, 2008-01-12 at 17:47 -0800, Stephen Wong wrote:
> Hi there,
>
> On this seemingly innocent input solid in the form of a OFF file, CGAL's
> Nef_polyhedron_3 constructor using Polyhedron_3 crashes. I believe that
> the solid represented by the OFF file is valid based on the specification
> (you can see the model in geomview or any other OFF viewer). I caused this
> crash by modifying the Nef_3.sln's interface_polyhedron:
>
> Polyhedron P ;
> std::ifstream fin( "Triangle - Copy.off" ) ;
> fin >> P ;
> if ( P.is_closed() && P.is_valid() )
> {
> Nef_polyhedron_3 N1( poly ) ;
> }
>
> Thanks,
>
> Stephen



Archive powered by MHonArc 2.6.16.

Top of Page