Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] polyhedron clipping using a plane

Subject: CGAL users discussion list

List archive

[cgal-discuss] polyhedron clipping using a plane


Chronological Thread 
  • From: gunshi gupta <>
  • To:
  • Subject: [cgal-discuss] polyhedron clipping using a plane
  • Date: Sat, 17 Oct 2015 21:28:38 +0530
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:b6Z1+RxJKWYYGwfXCy+O+j09IxM/srCxBDY+r6Qd0e4UIJqq85mqBkHD//Il1AaPBtWHraMfwLSH+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStKU3p/8ibH60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVPWKG/c6UjRqFDFxwnNXo07Yvlr0rtVwyKs3QBVH4Wk1JHHhDZ5VmuUYr3qSv7ufdlxCDLFcLzRLEwHz+l6vE4G1fTlC4bOmthoynsgctqgfcDrQ==

Hi,
I have a function written in MATLAB which is clipping a convex polyhedron, given an initial convex polyhedron and a plane, and it returns the new polyhedron that was formed as a result of the clipping (defined in terms of its faces and vertices).
 This function has been implemented by using the clipPolygon3D function that MATLAB provides, internally, by clipping each polygonal face of the polyhedron and then doing the necessary computation to combine the results.
link:
http://in.mathworks.com/matlabcentral/fileexchange/24484-geom3d/content/geom3d/geom3d/clipPolygon3dHP.m

Now i want to do the same in c++, and preferably using CGAL.
So 
1) i have searched and was not able to find a function for polygon clipping in CGAL, but i wanted to confirm if that is right since CGAL covers quite a wide range of algorithms.
2)i have also come across the function "void CGAL::halfspace_intersection_3" from section 3D convex hulls in CGAL which seems to compute the intersection of a plane and a convex hull.
link:
http://doc.cgal.org/latest/Convex_hull_3/group__PkgConvexHull3Functions.html#ga6118d2c46934c541669ab871f8e1fd24

It seems that if i am able to define a polyhedron as a convex hull, then from what i understand from the documentation (i understand very little), i should be able to do what i described above(polyhedron clipping) without having to implement polyhedron clipping through polygon clipping. Can someone help me with this/verify if this is possible?
Thanks a lot!



Archive powered by MHonArc 2.6.18.

Top of Page