Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Problem working on very large union_of_balls mesh
- Date: Wed, 2 Apr 2008 17:54:38 +0200
I am having a problem operating on a union of balls mesh. Code compiles and
runs without errors, but it seems when the number of vertices goes over about
2 million, I get a run-time error if I either a)try to output the mesh to an
OFF or b) try to simplify the mesh using the mesh simplification routine.
Code works fine when there is under 2 million vertices. Here are my
constructors:
///////////////////////
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Skin_surface_traits_3<K> Traits;
typedef CGAL::Union_of_balls_3<Traits> Union_of_balls_3;
typedef Union_of_balls_3::Weighted_point Weighted_point;
typedef Weighted_point::Point Bare_point;
typedef CGAL::Polyhedron_3<K,
CGAL::Skin_surface_polyhedral_items_3<Union_of_balls_3> > Polyhedron;
namespace SMS = CGAL::Surface_mesh_simplification ;
Polyhedron p;
//////////////////////
after adding the balls, here is my code to create the mesh and simplify, just
as with the related example from the manual:
///////////////////////
Union_of_balls_3 union_of_balls(ball_set.begin(), ball_set.end(), Traits(),
true);
CGAL::mesh_union_of_balls_3(union_of_balls, p);
SMS::Count_stop_predicate<Polyhedron> stop(ball_set.size());
// This the actual call to the simplification algorithm.
// The surface and stop conditions are mandatory arguments.
// The index maps are needed because the vertices and edges
// of this surface lack an "id()" field.
int r = SMS::edge_collapse
(p
,stop
,CGAL::vertex_index_map(boost::get(CGAL::vertex_external_index,
p))
.edge_index_map (boost::get(CGAL::edge_external_index ,
p))
);
std::ofstream out("output.off");
out << p;
/////////////////////////
Is there some hard limit to the number of vertices that can be processed? Am
I using the wrong kernel? Any help is appreciated.
BM
- Problem working on very large union_of_balls mesh, wamatt02, 04/02/2008
- Re: [cgal-discuss] Problem working on very large union_of_balls mesh, Nico Kruithof, 04/03/2008
Archive powered by MHonArc 2.6.16.