Subject: CGAL users discussion list
List archive
- From: gunshi <>
- To:
- Subject: [cgal-discuss] halfspace_intersection_3 , unexpected result
- Date: Wed, 23 Mar 2016 11:25:12 -0700 (PDT)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:oMxD+BKpfa5P8MuzpdmcpTZWNBhigK39O0sv0rFitYgUL//xwZ3uMQTl6Ol3ixeRBMOAu6IC0rSd6vixEUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35Txjr75osWCKyxzxxODIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FpwfVYWKDbZ+x4FuQATWduD2dg78LisVzPTBCE+2AHemQQiBtBRQbfvz/gWZKkvTb8rep8kH2VIMvtTbE7RCy+5vZDRxrhiSNBPDk8pjKEwvdshb5W9Uvy7yd0xJTZNdrNbPc=
Hi, I have a polyhedron, (it is basically a bounding box of a 3d model with 6
faces, planes parallel to the x,y,z axes).
I want to cut it into two polyhedrons using a plane so i use
halfspace_intersection_3 to get the intersection of the appropriate half
spaces of the planes of the bounding box, and the plane i want to use as
cutter, taking both half spaces of this cutter plane one by one.
I however, get this error, and it doesn't seem right, since i've verified
that both of the intersections should give me a valid convex polyhedron
each.
CGAL error: assertion violation!
Expression : boost::is_floating_point<typename K::FT>::value ||
Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin)
File :
/usr/local/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
Line : 292
Explanation: halfspace_intersection_3: origin not in the polyhedron
Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html
libc++abi.dylib: terminating with uncaught exception of type
CGAL::Assertion_exception: CGAL ERROR: assertion violation!
Expr: boost::is_floating_point<typename K::FT>::value ||
Convex_hull_3::internal::point_inside_convex_polyhedron(P, *origin)
File: /usr/local/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
Line: 292
Explanation: halfspace_intersection_3: origin not in the polyhedron
I've created a small test program here:
https://gist.github.com/gunshi/46826ee9bdf1e2a2fa57
to show how i'm running it. Since i was importing some data from a .off
file, i've simply used the numerical values i would have got from those
files.
I also tweaked my halfspace_intersection_3.h file to print out this point
called "origin" so that i can see which internal point the algorithm has
found on its own, that it gives an error on.
The points are:
74.2757 -206.925 -200.324 (passes test)
-74.2731 158.476 201.049 (gives error)
and i've verified that these points should lie in their respective polyhedra
created as a result of the cut.
Could anyone guide me as to what is going wrong?
Thanks!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/halfspace-intersection-3-unexpected-result-tp4661721.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] halfspace_intersection_3 , unexpected result, gunshi, 03/23/2016
Archive powered by MHonArc 2.6.18.