Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: CGAL error in Skin_surface_base_3
- Date: Wed, 30 Nov 2011 08:16:50 +0100
This algorithm requires constructions so you need to use an Kernel with
exact constructions (http://www.cgal.org/FAQ.html#inexact_NT).
Replacing Exact_predicates_inexact_constructions_kernel by
Exact_predicates_exact_constructions_kernel makes your example
running fine on my machine.
Sebastien.
François-Xavier Coudert wrote:
Sorry for the first email, which was incomplete. I didn't even quote the
error message! The code described below compiles OK, but when run it gives:
CGAL error: assertion violation!
Expression : File : /opt/CGAL-3.9/include/CGAL/Skin_surface_base_3.h
Line : 483
Explanation: intersection: no intersection.
Can someone help me track down that issue?
Thanks in advance,
FX
Le 29 nov. 2011 à 13:05, FX a écrit :
Dear CGAL team and users,
I have encountered an assertion violation in CGAL's meshing the union of a
set of balls. I have reduced my much larger original code to a minimal
testcase that always fails on my system. The following testcase tries to mesh
the union of 4 balls:
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>I compile it against CGAL-3.9 on a x86_64 Mac OS 10.7 system, with Apple's
#include <CGAL/Skin_surface_3.h>
#include <CGAL/Union_of_balls_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/mesh_skin_surface_3.h>
#include <CGAL/subdivide_skin_surface_mesh_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
int main (void)
{
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Skin_surface_traits_3<K> Traits;
typedef CGAL::Union_of_balls_3<Traits> Skin_surface_3;
typedef Skin_surface_3::FT FT;
typedef Skin_surface_3::Weighted_point Weighted_point;
typedef Weighted_point::Point Bare_point;
typedef CGAL::Polyhedron_3<K,
CGAL::Skin_surface_polyhedral_items_3<Skin_surface_3> > Polyhedron;
std::list<Weighted_point> list;
list.push_front(Weighted_point(Bare_point(0.30700, 6.45800, 6.45800), 1)); list.push_front(Weighted_point(Bare_point(0.07400, 5.03900, 5.03900), 1)); list.push_front(Weighted_point(Bare_point(0.30700, 19.37400, 19.37400), 1)); list.push_front(Weighted_point(Bare_point(0.07400, 20.79300, 20.79300), 1));
Polyhedron p;
Skin_surface_3 skin_surface(list.begin(), list.end());
CGAL::mesh_skin_surface_3(skin_surface, p);
CGAL::subdivide_skin_surface_mesh_3(skin_surface, p, 1);
std::cout << "Mesh has " << p.size_of_facets() << " facets" << std::endl;
return 0;
}
default G++ 4.2.1 compiler. Boost is 1.46.1, GMP is 5.0.2, MPFR is 3.1.0 (+
available patches). The compilation command-line is:
g++ bug.cpp -I/opt/CGAL-3.9/include -I/opt/boost-1.46.1/include -L/opt/CGAL-3.9/lib
-lCGAL -L/opt/boost-1.46.1/lib -lboost_thread -lmpfr -lgmp -frounding-math &&
./a.out
I hope you can help me understand what's going wrong, and whether I used the
CGAL functions right (I tried to stick to the examples as much as possible).
Thanks in advance,
FX Coudert
PS: the CGAL doc says that GMP and MPFR are recommended, implying that
building without them is possible. However, when I tried to do so, the build
system complains that CGAL_Core depends on GMP, and compilation will not
succeed. Did I miss something?
- [cgal-discuss] CGAL error in Skin_surface_base_3, FX, 11/29/2011
- [cgal-discuss] Re: CGAL error in Skin_surface_base_3, François-Xavier Coudert, 11/30/2011
- Re: [cgal-discuss] Re: CGAL error in Skin_surface_base_3, Sebastien Loriot (GeometryFactory), 11/30/2011
- Re: [cgal-discuss] CGAL error in Skin_surface_base_3, FX, 11/30/2011
- Re: [cgal-discuss] CGAL error in Skin_surface_base_3, Sebastien Loriot (GeometryFactory), 11/30/2011
- Re: [cgal-discuss] CGAL error in Skin_surface_base_3, FX, 11/30/2011
- Re: [cgal-discuss] Re: CGAL error in Skin_surface_base_3, Sebastien Loriot (GeometryFactory), 11/30/2011
- [cgal-discuss] Re: CGAL error in Skin_surface_base_3, François-Xavier Coudert, 11/30/2011
Archive powered by MHonArc 2.6.16.