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: Gilbert Bernstein <>
  • To:
  • Subject: Re: [cgal-discuss] Crash on converting Polyhedron_3 to Nef_polyhedron_3 on an OFF input.
  • Date: Mon, 14 Jan 2008 10:37:40 -0600
  • Domainkey-signature: s=main; d=mail.utexas.edu; c=nofws; q=dns; h=Received:Received:Received:Mime-Version:In-Reply-To: References:Content-Type:Message-Id: Content-Transfer-Encoding:From:Subject:Date:To: X-Mailer; b=AFIAg369gLlRrQEhRl+ygWoxEX2jRjNFBR2P53t6+99fZvbz04rQv Epp4QbKgqA8eHbbCgJxYuf3x+dXrFNFGaqUcF4Csai32QqU2jIf0R uBWj+qynk2u9PULWWJciKHuOstC6KGDln1EbkehoGPf4ulQvsd17x iN4jlLABEiAk=;

Ahah, yes. My viewer was triangulating the polygon. Sorry about that Stephen. I didn't think of that problem.

-- Gilbert


On Jan 14, 2008, at 6:36 AM, Peter Hachenberger wrote:

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
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss



Archive powered by MHonArc 2.6.16.

Top of Page