Skip to Content.
Sympa Menu

cgal-discuss - Polyhedron clipping and advices for a newbie

Subject: CGAL users discussion list

List archive

Polyhedron clipping and advices for a newbie


Chronological Thread 
  • From: David Coeurjolly <>
  • To:
  • Subject: Polyhedron clipping and advices for a newbie
  • Date: Wed, 23 May 2007 15:30:24 +0200
  • Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAYFBMVEUAAAALCws0NDQ8PDxA QEBFRUVJSUlOTk5TU1NYWFheXl5kZGRpaWlubm5zc3N4eHh9fX2BgYGFhYWKioqOjo6Xl5ednZ2i oqKlpaWtra2zs7PExMTR0dHm5ubu7u7///+28DApAAAB7ElEQVRIx+2U2Y7bMAxFlcWWtS8kraXT zv//ZalBgMJpMvJ7e4MECMLDzbwRn1/69XlW4t0PHYhqOw3sTi7KGOuwnwF6VHJZpNy01g7nQI9a bne53rdtU5uOUyAas3FydV83uW7a4gQozqnb/S61XOUoo90EAG04SEuptk2OrtzH90DUxkFthE4P KaX7DACqtbVWMcXkjJ4CBlspvTNRCQCCbrMKgTh/Y6QWKmBnFVDn2h9iBIyebIkMj0BYWm2dX+TM BAieIHufOXnkEWrwEyABQXAuFkp2NYliqJOhYS/EarwiJKCMZTI0jfYLjRWVwp802RInr6XsXIHJ Vvnr7PggEyFxX8goG6/Mzpt7N8H5FFyMlOFoupcGStGG6HhT3niAj7lFEwQbADFZl3I+4WnIgcD5 4CFiohPAjxCQkEcmwKeO3gDJ5T0l2jE9F3gHeJdZ7J9zACF7guWNy+0E0PlBBKOsND7OgZ8Qx7AQ U8wI/JyhfweQv13HdjiOMI94IvX2j6yDul6ECDuVUYNGON/UerX9FbCHVbAuYhkHyuanRylxuS7p L2C3t4t4yO583fuOfOKsUVRcFzwC8Cec5SqL7cO9oeSil/HWB+AqDlJ7bYMp4Taa/ELEARDPWmyM Th3yfA+80H/g3wJ+A9ltu6Gmo7iGAAAAAElFTkSuQmCC

Dear all,

I've to admit that I'm a brand new CGAL user for a couple of weeks and
my questions may be stupid. My problem is quite simple: cut a polyhedron
with an oriented plane.

It is quite easy to tag the vertices ('exterior/interior') and to
create the new halfedges/vertices for intersection points (edge/plane).
But I have troubles to "remove" the exterior vertices.

More precisely, I've pushed in a list<Halfedge_handle>, an halfedge
handle per exterior vertex (called list_exterior_handles) obtained
during the exterior vertex scan step. My idea was to use P.erase_facet()
as follows:

Halfedge_around_vertex_circulator circ;
for( list<Halfedge_handle>::iterator v = list_exterior_handles.begin();
v != list_exterior_handles.end() ; ++v){

circ = (*v)->vertex_begin();
unsigned int deg = (*v)->vertex()->degree();
for (unsigned int i=0; i< deg; i++)
if (not circ->is_border()) P.erase_facet(circ);
circ++;
}

But this does not work..... I obtain segfaults due to the dereferencing
of a NULL pointer in the (*v)->vertex()->degree() computation.

Do you have any idea of what's going on ? By the way, my choice of the
erase_facet operation may not be not good.. Any other suggestion ?

Thanks in advance, regards,
david


--
----------------
David Coeurjolly - Chargé de recherche CNRS
Laboratoire LIRIS-UMR 5205
Bâtiment Nautibus, Université Claude Bernard Lyon 1
43 boulevard du 11 novembre 1918, 69622 Villeurbanne cedex, France
Tel : (+33) [0]4.72.44.82.40 Fax : (+33) [0]4.72.43.15.36

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.16.

Top of Page