Subject: CGAL users discussion list
List archive
- From: Dimitris Tzionas <>
- To:
- Subject: Re: [cgal-discuss] Convex decomposition of concave mesh
- Date: Thu, 11 Sep 2014 20:56:23 +0200
POL.is_pure_triangle = 1 -> that means that luckily I don't have degenerate triangles.
Also, step 3 (CGAL::convex_decomposition_3( NEF )) finished after much time (~1 hour?) and returned 25642 convex parts,
while the original OFF file (attached) has 20000 triangles (problem correlated with what I reported about 2x the number of vertices).
OFF
10002 20000 0
59.297 -0.455242 -70.6708
66.3921 -1.96008 -58.9775
Some additional info, sorry for the 2nd email:POL.is_pure_triangle = 1 -> that means that luckily I don't have degenerate triangles.
Also, step 3 (CGAL::convex_decomposition_3( NEF )) finished after much time (~1 hour?) and returned 25642 convex parts,
while the original OFF file (attached) has 20000 triangles (problem correlated with what I reported about 2x the number of vertices).
OFF
10002 20000 0
59.297 -0.455242 -70.6708
66.3921 -1.96008 -58.9775
...
On Thu, Sep 11, 2014 at 8:09 PM, Dimitris Tzionas <> wrote: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 getPOL.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
Attachment:
Model_Hand_R.off.zip
Description: Zip archive
- [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.