diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 14:02:42 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 14:02:42 (GMT) |
commit | 218760d2f50aa0ee2770b9db75ccf86dc6e361b2 (patch) | |
tree | 90038c4c4afce57659668163e74280495003647c /src/CGALEvaluator.cc | |
parent | 3296ae4d37c532bec883c83f541da2300d911da2 (diff) |
restore error checking when creating polyhedron from polyset
Diffstat (limited to 'src/CGALEvaluator.cc')
-rw-r--r-- | src/CGALEvaluator.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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()); |