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: Sat, 12 Jan 2008 20:46:37 -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=QC5vQ6GEBlvgw3P7VyHLS7afOEiOUphzHY99woaVD3bUDd0S7RWbc JxlQv4lepppj65vLe9iiG8Tozbt5H+P/0HZPBqWf80TUDsjfQ6xYi b5TTGUONdYZzZP5KTAPSpv9R6Qh0sgEBdSLTHD6UV1EZnQm4CQxQu 60fLRs7tZ3TM=;

Stephen,

The mesh you're trying to read in is non-manifold. This is probably why it is not working. Inside of the triangular prism is a second triangular prism sharing part of a face. The surface represented itself is non-manifold, and your data file contains T-Junctions, so the connectivity of the mesh isn't made explicit. One or both of these problems might be the cause of a bad conversion.

If you check the examples folder, there is a program called "complex_construction.cpp" It demonstrates the use of the following function:

#include<CGAL/OFF_to_nef_3.h>

Nef_3 N;
std::size_t discarded = CGAL::OFF_to_nef_3 (std::cin, N, true);

discarded contains the number of facets of the model which were discarded by the conversion process. You might want to try running the model through complex_construction and see what happens.

-- Gilbert


On Jan 12, 2008, at 7:47 PM, 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
<Triangle - Copy.off>



Archive powered by MHonArc 2.6.16.

Top of Page