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: Fri, 20 Feb 2015 20:55:46 +0100
  • Organization: GeometryFactory

On 02/20/2015 08:48 PM, Marius Kintel wrote:
Hi,

The rollback code is never reached in cases where scd.visit_shell_objects()
throws an exception.
e.g. violated intersection constraint in Constrained_triangulation_2.

We temporarily worked around this by explicitly catching those exceptions in
our forked version of the Build_polyhedron class.
I haven’t tested Giles’ variant, but that looks a lot cleaner that our
attempt.


I'll have deeper look.

In the meantime you can try:
#define CGAL_CT2_WANTS_TO_HAVE_EXTRA_ACTION_FOR_INTERSECTING_CONSTRAINTS
#define CGAL_CDT2_EXTRA_ACTION_FOR_INTERSECTING_CONSTRAINTS throw WhatEverException;

This will allow you to throw an exception if constraints intersect.

Sebastien.

-Marius

On Feb 19, 2015, at 05:35 AM, Sebastien Loriot (GeometryFactory)
<>
wrote:


Please check whether the following patch solves your problem:
--- a/Nef_3/include/CGAL/Nef_polyhedron_3.h
+++ b/Nef_3/include/CGAL/Nef_polyhedron_3.h
@@ -824,6 +824,7 @@ protected:
if(skip_volumes-- <= 0)
scd.visit_shell_objects(SFace_const_handle(c->shells_begin()),V);
B.end_surface();
+ if ( B.error() ) B.rollback();
}

};
@@ -977,6 +978,7 @@ protected:
Visitor V(B,omit_vertex, scd,VI);
scd.visit_shell_objects(sf, V);
B.end_surface();
+ if ( B.error() ) B.rollback();
}

};






Archive powered by MHonArc 2.6.18.

Top of Page