diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-11-27 02:04:57 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-11-27 02:04:57 (GMT) |
commit | cf9f19818ca5886275019f8e93c7fb8ec0e4bde6 (patch) | |
tree | 0c7da8f9138d12b6604981c5cfeb017389a8e7ff /src/CGAL_Nef_polyhedron.cc | |
parent | b204aba444bd838bd3fe27675323dce6d4123b19 (diff) |
prevent crash in CGAL nef3. fix #issue 410 . also deal w qmake bug re .h files
Diffstat (limited to 'src/CGAL_Nef_polyhedron.cc')
-rw-r--r-- | src/CGAL_Nef_polyhedron.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc index 440f4ed..4761d26 100644 --- a/src/CGAL_Nef_polyhedron.cc +++ b/src/CGAL_Nef_polyhedron.cc @@ -98,11 +98,22 @@ PolySet *CGAL_Nef_polyhedron::convertToPolyset() CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); try { CGAL_Polyhedron P; - this->p3->convert_to_Polyhedron(P); - ps = createPolySetFromPolyhedron(P); + bool err = nefworkaround::convert_to_Polyhedron<CGAL_Kernel3>( *(this->p3), P ); + //this->p3->convert_to_Polyhedron(P); + if (err) { + PRINT("ERROR: CGAL NefPolyhedron->Polyhedron conversion failed"); + } else { + ps = createPolySetFromPolyhedron(P); + } } catch (const CGAL::Precondition_exception &e) { - PRINTB("CGAL error in CGAL_Nef_polyhedron::convertToPolyset(): %s", e.what()); + PRINTB("CGAL Precondition error in CGAL_Nef_polyhedron::convertToPolyset(): %s", e.what()); + } + catch (const CGAL::Assertion_exception &e) { + PRINTB("CGAL Assertion error in CGAL_Nef_polyhedron::convertToPolyset(): %s", e.what()); + } + catch (...) { + PRINT("CGAL unknown error in CGAL_Nef_polyhedron::convertToPolyset()"); } CGAL::set_error_behaviour(old_behaviour); } |