diff options
author | Marius Kintel <marius@kintel.net> | 2013-12-01 16:36:50 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-12-01 16:36:50 (GMT) |
commit | 89c21d07c46294e7c28f8852a89550b17d7a4402 (patch) | |
tree | e63eef1efa8ab7cbb19fc7b5a33c1e33af1c1931 /src/export.cc | |
parent | f175bae46a8f15823780c5a9c89b11476acb3107 (diff) | |
parent | 791a49b9e8489818e41deae2b1d4ba2b6ff50e5f (diff) |
Merge pull request #554 from openscad/issue410x
Issue410x
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); } |