New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convex_hull_3: Make it minimal. #3226
Convex_hull_3: Make it minimal. #3226
Conversation
`bool operator()(Plane_3 h, Point_3 q)`, which determines if the point | ||
`q` is on the negative side of the halfspace `h`. | ||
*/ | ||
typedef unspecified_type Has_on_negative_side_3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the traits requires both Has_on_positive_side_3
and Has_on_negative_side_3
. I suggest that both are replaced by Oriented_side_3
that provides:
Oriented_side operator() (const Kernel::Plane_3 &h, const Kernel::Point_3 &p)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sloriot, do you agree ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm working on it
change plane's orientation instead
|
||
|
||
//take extreme points to begin with. | ||
internal::Convex_hull_::init_iterators(minx, maxx, miny, it, points); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compilation error in Travis:
https://travis-ci.org/CGAL/cgal/jobs/403155410#L1983
The minimal testing after such a change is running the test suite of Convex_hull_3!
9028a2c
to
0037edc
Compare
…d to change the traits
I think the patch is correct. I focus only on the case when the convex hull is 3D as otherwise the 2D algorithm is used. The algorithm works as follow: 4 points with a high chance to be on the convex hull are first selected and an initial convex hull is built using these 4 points (these points are not coplanar). Then, iterating over the 4 faces of the convex hull, we select points that are on the positive side of the supporting plane of each face and assign those points to the face. The set of faces with points assigned are collected in the set of so-called pending faces. Then the algorithm simply picks one pending face from the set while it is not empty. For each picked face, it looks for the point assigned to the face that is the furthest from the supporting plane of the face. Then this point is used in The reason why only |
By reworking the order of the points when creating the plane, I could get rid of the |
This PR conflicts with #3116. Which one should be tested and integrated first? |
They are independent, but this one being smaller it is easier to start by this one. |
Successfully tested in CGAL-4.13-Ic-66, and then merged. |
Summary of Changes
This PR adds some initialization steps to the convex_hull_3 function so it returns a minimal hull.
For this, it also adds a need for Has_on_negative_side_3 to the ConvexHullTraits_3 Concept.
Release Management