mirror of https://github.com/CGAL/cgal
add assertions to ensure the origin is on the negative side of the input planes
This commit is contained in:
parent
50c8db347b
commit
46c2727ea9
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -146,6 +146,9 @@ namespace CGAL
|
|||
// construct dual points to apply the convex hull
|
||||
std::vector<Point> 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(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue