diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 7ea9e73a8ad..4720d337470 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -270,6 +270,10 @@ namespace CGAL origin = boost::make_optional(interior.inside_point()); } + // make sure the origin is on the negative side of all the planes + CGAL_assertion_code(for(PlaneIterator pit=begin;pit!=end;++pit)) + CGAL_assertion(pit->has_on_negative_side(*origin)); + // compute the intersection of the half-space using the dual formulation Hull_traits_dual_3 dual_traits(*origin); Polyhedron_dual_3 dual_convex_hull; diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 8fbd6384f50..99b72c759a1 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -146,6 +146,9 @@ namespace CGAL // construct dual points to apply the convex hull std::vector dual_points; for (PlaneIterator p = pbegin; p != pend; ++p) { + // make sure the origin is on the negative side of all the planes + CGAL_assertion(p->has_on_negative_side(p_origin)); + // translate plane Plane translated_p(p->a(), p->b(),