Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Cc: Benjamin Kehlet <>
- Subject: Re: [cgal-discuss] Mesh generator crash on certain criterias
- Date: Mon, 31 Mar 2014 15:49:47 +0200
- Organization: GeometryFactory
Le Tuesday 25 March 2014 13:45:24 Benjamin Kehlet a écrit :
> Dear CGAL community
>
> When attempting to generate tetrahedral meshes from polyhedral
> domains, I sometimes experience program crashes. However, a very minor
> change in the meshing may change this. So I wonder if there are any
> preconditions related to the meshing criteria that I am violating? Or
> if I am doing something else wrong.
[...]
Hi Benjamin,
You did nothing wrong. There was a bug in the code of Mesh_3. That ruined by
whole Friday, and part of today, to find it. I have commited the attached
patch, in CGAL Git repository. I will try to integrate it in CGAL-4.4 before
it is released.
You can apply the patch on top of CGAL-4.4-beta1, with the following shell
command, run inside the source tree of CGAL.
patch -p2 < Mesh_3.patch
If you do not have the patch command, you can apply it manually. There is
only
two lines to change. I hope that will solve all you issues.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
commit 6649036c8071316735bab8ae5730ad6bcd2f3741 Author: Laurent Rineau <> Date: Mon Mar 31 15:41:51 2014 +0200 Fix a bug in Mesh_3 Benjamin Kehlet reported on CGAL-discuss (Tue, 25 Mar 2014 13:45:24 +0100) that Mesh_3 was not able to mesh the simple following OFF: OFF 4 4 0 0 0 0 0 0 1 0 1 0 1 0 0 3 3 1 2 3 0 1 3 3 0 3 2 3 0 2 1 The unit tetrahedron!! The bug was in the robust weighted circumcenter traits. The traits checks that the circumcenter of four points is at least in the circum sphere of the four points. But for weighted points, that is "power_test" that must be tested, instead of "side_of_oriented_sphere". diff --git a/Mesh_3/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h b/Mesh_3/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h index 8d8fdba..d5e7012 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h @@ -169,10 +169,9 @@ public: { CGAL_precondition(Rt().orientation_3_object()(p,q,r,s) == CGAL::POSITIVE); - // We use Side_of_oriented_sphere_3: it is static filtered and + // We use Power_test_3: it is static filtered and // we know that p,q,r,s are positive oriented - typename Rt::Side_of_oriented_sphere_3 side_of_oriented_sphere = - Rt().side_of_oriented_sphere_3_object(); + typename Rt::Power_test_3 power_test = Rt().power_test_3_object(); // Compute denominator to swith to exact if it is 0 FT num_x, num_y, num_z, den; @@ -188,7 +187,7 @@ public: Bare_point res(p.x() + num_x*inv, p.y() - num_y*inv, p.z() + num_z*inv); // Fast output - if ( side_of_oriented_sphere(p,q,r,s,res) == CGAL::ON_POSITIVE_SIDE ) + if ( power_test(p,q,r,s,res) == CGAL::ON_POSITIVE_SIDE ) return res; }
- [cgal-discuss] Mesh generator crash on certain criterias, Benjamin Kehlet, 03/25/2014
- Re: [cgal-discuss] Mesh generator crash on certain criterias, Laurent Rineau (CGAL/GeometryFactory), 03/31/2014
- Re: [cgal-discuss] Mesh generator crash on certain criterias, Benjamin Kehlet, 03/31/2014
- Re: [cgal-discuss] Mesh generator crash on certain criterias, Laurent Rineau (CGAL/GeometryFactory), 03/31/2014
Archive powered by MHonArc 2.6.18.