diff options
author | Marius Kintel <marius@kintel.net> | 2011-11-05 17:25:05 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-11-05 17:25:05 (GMT) |
commit | f4bd15912a7179ccd4e39adc310900d020f15d8a (patch) | |
tree | 7aa0c007b4321c87f9822028973df141df4207e5 /src/CGAL_Nef_polyhedron.cc | |
parent | 4120846d18c1a7ce5a51169feb1babb0603bddc0 (diff) |
Last CGAL assert fix wasn't enough; expanded the fix to all operators
Diffstat (limited to 'src/CGAL_Nef_polyhedron.cc')
-rw-r--r-- | src/CGAL_Nef_polyhedron.cc | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc index ccfde24..2538b64 100644 --- a/src/CGAL_Nef_polyhedron.cc +++ b/src/CGAL_Nef_polyhedron.cc @@ -6,8 +6,6 @@ #include "dxfdata.h" #include "dxftess.h" #include <CGAL/minkowski_sum_3.h> -#include <CGAL/assertions_behaviour.h> -#include <CGAL/exceptions.h> CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator+=(const CGAL_Nef_polyhedron &other) { @@ -25,16 +23,8 @@ CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator*=(const CGAL_Nef_polyhedron & CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator-=(const CGAL_Nef_polyhedron &other) { - // 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); + if (this->dim == 2) (*this->p2) -= (*other.p2); + else if (this->dim == 3) (*this->p3) -= (*other.p3); return *this; } @@ -42,15 +32,8 @@ extern CGAL_Nef_polyhedron2 minkowski2(const CGAL_Nef_polyhedron2 &a, const CGAL CGAL_Nef_polyhedron &CGAL_Nef_polyhedron::minkowski(const CGAL_Nef_polyhedron &other) { - CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); - try { - if (this->dim == 2) (*this->p2) = minkowski2(*this->p2, *other.p2); - else if (this->dim == 3) (*this->p3) = CGAL::minkowski_sum_3(*this->p3, *other.p3); - } - catch (CGAL::Assertion_exception e) { - PRINTF("CGAL error in minkowski %s", e.what()); - CGAL::set_error_behaviour(old_behaviour); - } + if (this->dim == 2) (*this->p2) = minkowski2(*this->p2, *other.p2); + else if (this->dim == 3) (*this->p3) = CGAL::minkowski_sum_3(*this->p3, *other.p3); return *this; } |