summaryrefslogtreecommitdiff
path: root/src/export.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-12-01 16:36:50 (GMT)
committerMarius Kintel <marius@kintel.net>2013-12-01 16:36:50 (GMT)
commit89c21d07c46294e7c28f8852a89550b17d7a4402 (patch)
treee63eef1efa8ab7cbb19fc7b5a33c1e33af1c1931 /src/export.cc
parentf175bae46a8f15823780c5a9c89b11476acb3107 (diff)
parent791a49b9e8489818e41deae2b1d4ba2b6ff50e5f (diff)
Merge pull request #554 from openscad/issue410x
Issue410x
Diffstat (limited to 'src/export.cc')
-rw-r--r--src/export.cc10
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);
}
contact: Jan Huwald // Impressum