Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Convex decomposition of concave mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Convex decomposition of concave mesh


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Convex decomposition of concave mesh
  • Date: Fri, 12 Sep 2014 10:05:25 +0200
  • Organization: GeometryFactory

I loaded the model in the polyhedron demo, converted it into nef and I got 10002 vertices.
Then I ran the convex decomposition which indeed took some time but
provided a convex decomposition that is valid but obviously not the
minimal one.

The kind of model the algorithm was written for is more for mechanical
parts rather than "noisy" or smooth surfaces.
IMO, it should not be used in such cases.

Sebastien.

On 09/11/2014 08:56 PM, Dimitris Tzionas wrote:
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:54 PM, Dimitris Tzionas
<
<mailto:>>
wrote:

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

<

<mailto:>>
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.
http://doc.cgal.org/latest/Convex_decomposition_3/index.html

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







Archive powered by MHonArc 2.6.18.

Top of Page