Subject: CGAL users discussion list
List archive
- From: Dimitris Tzionas <>
- To:
- Subject: [cgal-discuss] Convex decomposition of concave mesh
- Date: Thu, 11 Sep 2014 20:09:22 +0200
Hi all,
In a physics simulation I have a problem with concave meshes, so it seems that I really have to do decomposition in convex mesh-parts.
Since CGAL covered successfully past needs, I was hoping to use this again.
It seems that it is doable only by using Nef_polyhedron_3.
In order to have this representation:
- I first read a .off file (ideally this should happen from memory, but my code is slower than CGAL's built-in reader from file) in a Polyhedron_3. My mesh is closed and depicted fine with the Polyhedron viewer demo.
- then I convert to a Nef_polyhedron_3.
- Finally I try to use CGAL::convex_decomposition_3
- The first part is very fast.
std::ifstream file("/home/dimitris/Model_Hand_R.off");
file >> POL;
However instead of 10002 vertices I noticed that I get
POL.size_of_vertices = 20004
POL.is_closed = 1
- The second part takes ~15sec for 20k vertices.
Nef_polyhedron_3 NEF( POL );
NEF.is_empty: 0
Nef vertices: 20004
Nef edges: 60000
Nef facets: 40000
Nef volumes: 3
- The third part takes forever and never returns anything.
CGAL::convex_decomposition_3( NEF );
Could it be that I'm doing something very obviously wrong?
Could I get best practices hints for this problem?
What is a sensible run-time for CGAL's approach?
Some extra info on the current setup:
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3;
Thank you in advance for potential hints,
Dimitris
- [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/11/2014
- Message not available
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/11/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Sebastien Loriot (GeometryFactory), 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Andreas Fabri, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Andreas Fabri, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Andreas Fabri, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Sebastien Loriot (GeometryFactory), 09/12/2014
- Re: [cgal-discuss] Convex decomposition of concave mesh, Dimitris Tzionas, 09/11/2014
- Message not available
Archive powered by MHonArc 2.6.18.