summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CGAL_Nef_polyhedron.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc
index 975c9a4..ccfde24 100644
--- a/src/CGAL_Nef_polyhedron.cc
+++ b/src/CGAL_Nef_polyhedron.cc
@@ -25,8 +25,16 @@ CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator*=(const CGAL_Nef_polyhedron &
CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator-=(const CGAL_Nef_polyhedron &other)
{
- if (this->dim == 2) (*this->p2) -= (*other.p2);
- else if (this->dim == 3) (*this->p3) -= (*other.p3);
+ // Triggered by testdata/scad/bugs/rotate-diff-nonmanifold-crash.scad
+ CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
+ try {
+ if (this->dim == 2) (*this->p2) -= (*other.p2);
+ else if (this->dim == 3) (*this->p3) -= (*other.p3);
+ }
+ catch (CGAL::Assertion_exception e) {
+ PRINTF("CGAL error in CGAL_Nef_polyhedron::operator-=(): %s", e.what());
+ }
+ CGAL::set_error_behaviour(old_behaviour);
return *this;
}
contact: Jan Huwald // Impressum