Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Trouble with mesh simplification

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Trouble with mesh simplification


Chronological Thread 
  • From: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] Trouble with mesh simplification
  • Date: Tue, 26 May 2009 09:31:10 +0200

Dear Laurent R.,

From time to time, the Surface Mesher prompts the same error when contouring the APSS implicit surface, e.g.:
https://cgal.geometryfactory.com/CGAL/Members/testsuite/CGAL-3.5-I-99/Surface_reconstruction_points_3/TestReport_lrineau_i686_Linux-2.6_g++-4.1.2_CentOS-5.1-O2.gz

Does this ring any bell?

Best regards,
Laurent S.


Andreas Fabri a écrit :
Hi Shamyl,

as you write the problem is not so much related to mesh simplification
but to the incremental builder for polyhedral surfaces, so the subject
line is rather misleading.

No idea how your input looks like, but you get these kind of exceptions
if your surface is non-manifold, that is there are more than two faces
sharing an edge. You get this for example when you have two tetrahedra
which share just one edge. So things look ok, but they are not, that's
why OpenGL just works.

Besides, instead of marching cubes + mesh simplification you might
give the Surface Mesher a try. It generates quality triangles for
iso-levels in grey level images: http://www.cgal.org/Pkg/SurfaceMesher3
In the polyhedron demo it is also used as a remesher for an input
surface.

best regards,

andreas



Shamyl Zakariya wrote:
Hello!

I've been using CGAL to simplify meshes created with the Marching
Cubes algorithm. Specifically, I'm using the algorithms described
here:

http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Surface_mesh_simplification/Chapter_main.html

So far, it works wonderfully, 90% of the time. The other 10% of the
time, CGAL throws an during the construction of the surface from my
geometry:

--------

CGAL::Polyhedron_incremental_builder_3<HDS>::
lookup_halfedge(): input error: facet 851 has a self intersection at vertex 473.
CGAL error: assertion violation!
Expr: check_protocoll == 0
File: /usr/local/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
Explanation:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/local/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198

-------

Note, this is happening while *creating* the surface, not during
simplification. I assume what's happening is that my mesh data created
by marching cubes has some kind of "problem" with it. But
superficially Im fairly confident of my mesh data. Marching Cubes is
an established algorithm, and my mesh data works fine for collision
detection and rendering via OpenGL without any obvious weirdnesses.

Here's the code I'm using -- most of it is boilerplate converting from
my geometry storage to CGAL's, and visa versa.

http://pastie.org/489281

Specifically, CGAL dies on line 94

For what it's worth, I'm using CGAL 3.3.1 ( I didn't realize there
was a new release until I went to cgal.org to sign up for the mailing
list )

Any suggestions would be greatly appreciated. I've evaluated several
mesh simplification algorithms, and CGAL's consistently produces the
best output ( when my data isn't problematic! )

Thanks,


--
Laurent Saboret
INRIA Sophia-Antipolis
Project GEOMETRICA
(33) 4 97 15 53 09




Archive powered by MHonArc 2.6.16.

Top of Page