Subject: CGAL users discussion list
List archive
- From: Ronan Torrecillos <>
- To:
- Subject: Re: [cgal-discuss] Is CGAL/polyhedron_cut_plane_3.h zero bug ?
- Date: Thu, 12 Mar 2015 01:52:06 -0700 (PDT)
Hi,
I made a few mistakes as I must actually use an halfedge that is passing
through the plane in the right direction. Perhaps it will be useful :
cout << "Plan : " << p << endl;
Polyhedron::Halfedge_iterator hi;
bool has_halfedge_through_plane = false;
for (hi = Pbox.halfedges_begin(); hi != Pbox.halfedges_end(); hi++)
{
cout << hi->vertex()->point() << " -> " <<
hi->opposite()->vertex()->point() << endl;
if (p.has_on_negative_side(hi->vertex()->point()) &&
p.has_on_positive_side(hi->opposite()->vertex()->point()))
{
cout << "end" << endl;
has_halfedge_through_plane = true;
break;
}
}
if (has_halfedge_through_plane)
{
CGAL::polyhedron_cut_plane_3(Pbox, hi, p);
}
Please note that this code need to be rewritten to handle cases where
vertices are on the plane we use to cut the polyhedron.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Is-CGAL-polyhedron-cut-plane-3-h-zero-bug-tp4660570p4660572.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Is CGAL/polyhedron_cut_plane_3.h zero bug ?, Ronan Torrecillos, 03/11/2015
- Re: [cgal-discuss] Is CGAL/polyhedron_cut_plane_3.h zero bug ?, Ronan Torrecillos, 03/12/2015
Archive powered by MHonArc 2.6.18.