summaryrefslogtreecommitdiff
path: root/src/CGAL_Nef_polyhedron.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CGAL_Nef_polyhedron.cc')
-rw-r--r--src/CGAL_Nef_polyhedron.cc17
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);
}
contact: Jan Huwald // Impressum