Le 07/11/11 17:35, Emmanuel Olivi a écrit :
Hi dear developers of CGAL,
I would like to use sharp features, in order to obtain a 3D mesh
that confirms exactly with a 2D input polyhedron.
The polyhedron here used is called sphere42.off and is joined to
this email.
In the example file:
/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
if one applies the patch given in the email which loads the input
polyhedron, and detect its sharps features which we want to be the
set of all edges, i.e.:
> domain.detect_features(0.); // below 0. degree angle, it is
considered as sharp
the problem is that, once compiled it crashes most of the time
depending the criterion.
For example:
this works fine for the criterion:
edge_size = 0.08, facet_angle = 25, facet_size = 0.15,
facet_distance = 0.005, cell_radius_edge_ratio = 3, cell_size =
0.8
but crashes for:
edge_size = 0.08, facet_angle = 25, facet_size = 0.08,
facet_distance = 0.005, cell_radius_edge_ratio = 3, cell_size =
0.08
>
./mesh_polyhedral_domain_with_features 0.08 0.08 0.08
terminate called after throwing an instance of
'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
File:
/user/eolivi/home/src/CGAL-3.9/include/CGAL/Mesh_3/Refine_facets_3.h
Line: 572
Explanation: Mesh_3 ERROR: A facet is not in conflict with its
refinement point!
Debugging informations:
Facet: (0x7faa9dbaf150, 0) = (0.25 0.904509 -0.154508
0.00419904, 0.214286 0.832808 -0.432854 0.00419904, 0.3125
0.880636 -0.193136 0.00419904)
Dual: (8.07837e+12 3.91402e+13 -1.11189e+13 0, 3.5135e+13
1.70231e+14 -4.83591e+13 0)
Refinement point: -0.302748 -0.867429 0.246709 0
My question: Why does it crashes ? Is it a bug ? Is it a bad
choice of parameters, and how to choose these parameters ?
thanks
Emmanuel
to modify your example file just write:
> patch mesh_polyhedral_domain_with_features.cpp patch
This might be due to numerical imprecision
when computing the mesh vertices:
these points are computed as intersections between
the axis of triangular mesh facets and the triangles of the input
polyhedral spheres. Therefore numerical errors
cumulate and might become too big when you require
a fine mesh.
A simple way to know if such an interpretation is the right one
is to turn the kernel into an exact one and rerun ...
I don't know if this is feasible in reasonable time.
Mariette
--
Mariette Yvinec
Geometrica project team
INRIA Sophia-Antipolis
|