Subject: CGAL users discussion list
List archive
- From: Cheng Zhao <>
- To:
- Subject: Re: [cgal-discuss] construct polyhedron from tetrahedrons.
- Date: Mon, 31 Aug 2015 13:21:19 +0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:FiWNeRToRCZmtuwgiIByndiDKtpsv+yvbD5Q0YIujvd0So/mwa64bRaN2/xhgRfzUJnB7Loc0qyN4/umBjRLsM3JmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbvioNuMO04Z33KUWvBbElaflU3prM4YgI9veO4a6yDihT92QdlQ3n5iPlmJnhzxtY+a9Z9n9DlM6bp6r5YTGfayQqIjULYNDCg6K3tno4rwpBzbRE2O4GEdWyMYiF1TEg3d5Vb7WJn29SD1v+441CiBNtDtVuMIXmGp4K5vDRPpkywaLCUR8WfNi8U2grgIjgimoklUw4PSb8mnNPN5NvfWfd4cSnhBV8EJDAROB4q9a80ECO9XbrUQlJX0u1Zb9Uj2PgKrHu66kjI=
Thank you very much Sebastien.
I tried already constructing the net using boundary facets with Polyhedron_incremental_builder_3.lookup_halfedge(): input error: facet 39 shares a halfedge from vertex 6 to vertex 4 with facet 19.
2015-08-28 13:33 GMT+08:00 Sebastien Loriot (GeometryFactory) <>:
On 08/16/2015 12:16 PM, QYInst wrote:
I performed 3D Delaunay Triangulation on a point set.
Then I would like to select some of the joint cells (the overall shape is
not a convex hull) and then decompose this set of cells to convex hulls.
I successfully achieved it by constructing nef polyhedron from the cells
(tetrahedrons) and then applying convex decomposition of polyhedra.
The problem is that the procedure of constructing polyhedron from cells is
extremely slow given several hundred cells.
Basically below is my implementation:
1. For each of the cell in the joint cell set (vector<Cell_handle> cell),
get the 4 vertices (vector<Point> P) and create a nef polyhedron with them.
2. Get the union of the nef polyhedrons.
3. Decompose this nef polyhedron.
Below is the code for step 1 and 2.
for(size_t i = 0; i < cell.size(); ++i) {
for(int j = 0; j < 4; ++j)
P.push_back(cell[i]->vertex(j)->point();
Nef_polyhedron_3 NPtmp(P.begin(),P.end());
NP+=NPtmp;
P.clear();
}
This loop is very slow when cell.size() is about 200.
Is there any better way to achieve my goal, i.e. decompose a set of cells to
convex hulls?
Any comments or suggestions will be highly appreciated.
I can see some speed up to avoid the union of nef polyhedra, by directly constructing the final nef using the boundary facets of
selected cell.
Sebastien.
--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/construct-polyhedron-from-tetrahedrons-tp4661074.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
Attachment:
polyhedron.png
Description: PNG image
- [cgal-discuss] construct polyhedron from tetrahedrons., QYInst, 08/16/2015
- Re: [cgal-discuss] construct polyhedron from tetrahedrons., Sebastien Loriot (GeometryFactory), 08/28/2015
- Re: [cgal-discuss] construct polyhedron from tetrahedrons., Cheng Zhao, 08/31/2015
- Re: [cgal-discuss] construct polyhedron from tetrahedrons., Sebastien Loriot (GeometryFactory), 08/28/2015
Archive powered by MHonArc 2.6.18.