diff options
-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()); |