Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3
  • Date: Wed, 18 Feb 2015 08:34:43 +0100
  • Organization: GeometryFactory

On 02/17/2015 10:40 PM, kintel wrote:
Bump.

The issue is that CGAL throws exceptions from destructors. These exceptions
are not catchable and causes programs to terminate. Read e.g.
http://www.kolpackov.net/projects/c++/eh/dtor-1.xhtml

See e.g. ~Polyhedron_incremental_builder_3()

We work around this by forking parts of CGAL into our own sources and patch
it to submission, which is far from ideal.

-Marius


Your input is self-intersecting which is why you have this error.
If you import the model using OFF_to_nef_3 and then try to export
to polyhedron, you'll get the following assertion:

terminate called after throwing an instance of 'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: is_simple()
File: /home/sloriot/CGAL/git/cgal/Nef_3/include/CGAL/Nef_polyhedron_3.h
Line: 1041
Aborted

because of the self-intersection that was fixed during the import to Nef_3.

Is it an option to test for self-intersections before trying to do this?

(using CGAL::self_intersect(P) from include/CGAL/Self_intersection_polyhedron_3.h for example)

Sebastien.




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Uncatchable-exception-converting-from-Nef-polyhedron-to-Polyhedron-3-tp4658603p4660455.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page