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: Shamyl Zakariya <>
  • To:
  • Subject: Re: [cgal-discuss] Trouble with mesh simplification
  • Date: Mon, 25 May 2009 19:42:04 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=IGHBnKa80N+jLFbz8UIl2E8XvQIatMbrog7yiwk9BNTZGtRIWkOnAKrX72lKMaDZ4u st3zeGOiXlS8hwDyTLNJ3DY07F3wN7CC79K61nFcvmtwmMcl7UDLyJZULgWECPw035I/ vxMya8t4AZS243HFsvw+RZO4mX8XQmxzZ6XAI=

> 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.

You are absolutely correct, sorry.

> 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.

I will look into this, thank you! My implementation works, but
apparently not terribly well... it does appear that it does the job --
again, thanks.


On Mon, May 25, 2009 at 3:58 PM, Andreas Fabri
<>
wrote:
> 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,
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page