diff options
author | Marius Kintel <marius@kintel.net> | 2013-12-09 04:12:13 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-12-09 04:12:13 (GMT) |
commit | 462d4d447885594629fefb8a658f9f1d079bcc44 (patch) | |
tree | 6690951e4f814b87a1a372a913b75ceda1f6cc1a /src/export.cc | |
parent | 435e0c021c5018ee5de69d3218c3e31c8ab75be5 (diff) | |
parent | 33c34b6f7c43d19bbfa3bf91e7b577bcc062e5bd (diff) |
Merge branch 'master' into travis
Diffstat (limited to 'src/export.cc')
-rw-r--r-- | src/export.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/export.cc b/src/export.cc index ec6e576..cef323e 100644 --- a/src/export.cc +++ b/src/export.cc @@ -42,7 +42,12 @@ void export_stl(CGAL_Nef_polyhedron *root_N, std::ostream &output) CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); try { CGAL_Polyhedron P; - root_N->p3->convert_to_Polyhedron(P); + //root_N->p3->convert_to_Polyhedron(P); + bool err = nefworkaround::convert_to_Polyhedron<CGAL_Kernel3>( *(root_N->p3), P ); + if (err) { + PRINT("ERROR: CGAL NefPolyhedron->Polyhedron conversion failed"); + return; + } typedef CGAL_Polyhedron::Vertex Vertex; typedef CGAL_Polyhedron::Vertex_const_iterator VCI; @@ -114,6 +119,9 @@ void export_stl(CGAL_Nef_polyhedron *root_N, std::ostream &output) catch (const CGAL::Assertion_exception &e) { PRINTB("CGAL error in CGAL_Nef_polyhedron3::convert_to_Polyhedron(): %s", e.what()); } + catch (...) { + PRINT("CGAL unknown error in CGAL_Nef_polyhedron3::convert_to_Polyhedron()"); + } CGAL::set_error_behaviour(old_behaviour); } |