Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Nef_polyhedron_3 : convert_inner_shell_to_polyhedron fails

Subject: CGAL users discussion list

List archive

[cgal-discuss] Nef_polyhedron_3 : convert_inner_shell_to_polyhedron fails


Chronological Thread 
  • From: Laure Guicherd <>
  • To:
  • Subject: [cgal-discuss] Nef_polyhedron_3 : convert_inner_shell_to_polyhedron fails
  • Date: Thu, 06 May 2010 15:25:25 +0200
  • Organization: Buf Compagnie

Hi all,
I'm having a problem with trying to convert each shell of a Nef_polyhedron_3 (result of a boolean operations) in a polyhedron.

Here is how I do it :

typedef typename CGAL::Simple_cartesian<CGAL::Gmpq> Kernel;
typedef typename CGAL::Nef_polyhedron_3<Kernel> Nef;
typedef typename Nef::Volume_const_iterator Volume_const_iterator;
typedef typename Nef::Shell_entry_const_iterator Shell_entry_const_iterator;
typedef typename Nef::SFace_const_handle SFace_const_handle;
typedef typename Nef::Point_3 Point_3;
CgalNef nef = this->regularization();
if ( nef.is_simple() )
{ Volume_const_iterator volumeIt;
CGAL_forall_volumes( volumeIt, nef )
{
// the first volume is the outer volume, which is ignored
if ( volumeIt != nef.volumes_begin() )
{
Shell_entry_const_iterator shellIt;
int n = 0;
CGAL_forall_shells_of( shellIt, volumeIt )
{
if ( n%2 == 0 )
{
CgalPolyhedron<K> thePol;
convert_inner_shell_to_polyhedron( SFace_const_handle(shellIt), thePol );
// it fails here
}
}
++n;
}
}
}


Most of the time it works really well, but in some (undetermined) cases i get this message at runtime :

CGAL::Polyhedron_incremental_builder_3<HDS>::add_vertex_to_facet(): vertex index 18446744073709551615 is out-of-range [0,15]


Is there something I missed or did wrong ? Any help will be appreciated :)
Thank you for your help, regards

Laure



  • [cgal-discuss] Nef_polyhedron_3 : convert_inner_shell_to_polyhedron fails, Laure Guicherd, 05/06/2010

Archive powered by MHonArc 2.6.16.

Top of Page