Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] make_surface_mesh produces degenerate triangles
- Date: Fri, 3 Dec 2010 17:02:01 +0100
- Organization: GeometryFactory
On Friday 03 December 2010 16:47:58 Hamid G wrote:
> Hello,
>
> I am running the example given at:
>
> http://www.cgal.org/Manual/latest/examples/Surface_mesher/mesh_a_3d_gray_im
> age.cpp
>
> on my gray scale dataset. It produces proper surface triangulation most
> of the time but once in a while it seems it is recursively refining a
> particular part of the mesh so much that the output triangles are
> degenerate.
> (I have attached a screen shot of the problem).
>
> So my questions are:
>
> - how do I avoid this ?
Your data set has a sharp edge. The Surface Mesh Generator of CGAL do not
handle sharp edges properly.
Losen the third parameter of your CGAL::Surface_mesh_default_criteria_3<Tr>
object, so that the sharp edge is approximated with bigger triangles.
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_mesher_ref/Class_Surface_mesh_default_criteria_3.html
> - is this related to type of kernel
> 'Surface_mesh_default_triangulation_3' is using ? (how can I change the
> kernel?)
It should not. The one of the example should be correct.
> - The example talks about 'relative precision' in these lines :
> // definition of the surface, with 10^-5 as relative precision
> Surface_3 surface(image, bounding_sphere, 1e-5);
>
> What is it relative to ?
The manual is there:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_mesher_ref/Class_Implicit_surface_3.html
About the third parameter:
« error_bound is a relative error bound used to compute intersection points
between the implicit surface and query segments. This bound is used in the
default generated traits class. In this traits class, the intersection points
between the surface and segments/rays/line are constructed by dichotomy. The
dichotomy is stopped when the size of the intersected segment is less than
the
product of error_bound by the radius of bounding_sphere. »
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] make_surface_mesh produces degenerate triangles, Hamid G, 12/03/2010
- Re: [cgal-discuss] make_surface_mesh produces degenerate triangles, Laurent Rineau (GeometryFactory), 12/03/2010
- Re: [cgal-discuss] make_surface_mesh produces degenerate triangles, Hamid G, 12/03/2010
- Re: [cgal-discuss] make_surface_mesh produces degenerate triangles, Laurent Rineau (GeometryFactory), 12/03/2010
Archive powered by MHonArc 2.6.16.