Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?
- Date: Mon, 27 Jan 2014 07:50:14 +0100
- Organization: GeometryFactory
Add a break instruction after "if(found==0)found=1;" (you have no guarantee that obj->halfedges_begin() is still valid.
Sebastien.
On 01/26/2014 12:59 AM, tang wrote:
Hi Sebastien,
Thank you very much for your kindly remind, I got it.
However, I used the following code (by ), it still crashed. Is there any
problem in the code?
Thanks.
double minimum_edge_length = edgelengthmin*edgelengthmin; // squared
double len;
while(1)
{
int found=0;
Halfedge_iterator eb0=obj->halfedges_begin() ;
for( Polyhedron::Halfedge_iterator eb =
obj->halfedges_begin() ; eb !=
obj->halfedges_end() ; ++ eb )
{
len=get_edge_length<Polyhedron>(eb);
if(len<minimum_edge_length)
{
//remove_edge<Polyhedron>(*obj, eb);
SMS::halfedge_collapse(eb,*obj);
eb=eb0 ;
if(found==0)found=1;
}
else
eb0=eb;
}
if(found==0)break;
}
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Bug-of-join-vertex-in-CGAL-tp4658645p4658709.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Bug of 'join_vertex' in CGAL?, tang, 01/15/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, Sebastien Loriot (GeometryFactory), 01/15/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, tang, 01/16/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, Sebastien Loriot (GeometryFactory), 01/24/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, tang, 01/26/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, Sebastien Loriot (GeometryFactory), 01/27/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, tang, 01/26/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, Sebastien Loriot (GeometryFactory), 01/24/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, tang, 01/16/2014
- Re: [cgal-discuss] Bug of 'join_vertex' in CGAL?, Sebastien Loriot (GeometryFactory), 01/15/2014
Archive powered by MHonArc 2.6.18.