From 218760d2f50aa0ee2770b9db75ccf86dc6e361b2 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 15 Dec 2013 08:02:42 -0600 Subject: restore error checking when creating polyhedron from polyset diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 854e9cd..3a05b2b 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -672,8 +672,8 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const PolySet &ps) CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); try { CGAL_Polyhedron P; - createPolyhedronFromPolySet(ps,P); - N = new CGAL_Nef_polyhedron3(P); + bool err = createPolyhedronFromPolySet(ps,P); + if (!err) N = new CGAL_Nef_polyhedron3(P); } catch (const CGAL::Assertion_exception &e) { if (std::string(e.what()).find("Plane_constructor")!=std::string::npos) { @@ -689,8 +689,8 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const PolySet &ps) PolySet ps2; CGAL_Polyhedron P; tessellate_3d_faces( ps, ps2 ); - createPolyhedronFromPolySet(ps2,P); - N = new CGAL_Nef_polyhedron3(P); + bool err = createPolyhedronFromPolySet(ps2,P); + if (!err) N = new CGAL_Nef_polyhedron3(P); } catch (const CGAL::Assertion_exception &e) { PRINTB("Alternate construction failed. CGAL error in CGAL_Nef_polyhedron3(): %s", e.what()); -- cgit v0.10.1