diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 21:32:06 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 21:32:06 (GMT) |
commit | 3b3ef44f6636affef8138f4c8b7dec1333f50377 (patch) | |
tree | 977698cc6d2d56775f140967792ad637db03490f /src/export.cc | |
parent | 5271b345bc755f37e98d7f497f6686d34990fa5c (diff) | |
parent | c7cea0082e427f3c53985845f05e8737873c8a25 (diff) |
Merge branch 'master' of github.com:openscad/openscad into planar
Conflicts:
src/CGAL_Nef_polyhedron.cc
tests/CMakeLists.txt
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); } |