Subject: CGAL users discussion list
List archive
- From: Rob <>
- To:
- Subject: Re: [cgal-discuss] Error with new Surface_mesh_simplification package
- Date: Wed, 16 Sep 2009 00:40:09 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=v849I5XSi7aexSQFAa07VltnXGk7Xteul3EG5/kPNS9UqN+rPx6rs0Qd8uH3X7HOWO RRZT8vk/RC4iyCiSLUy/O9iOlBkTrL7jtTMElrVrUdxPGBMpjyGyrmp72TOgPreH5O6J +Qputdm8TBb3YPn6wKxIVyQ4OSMpe1zkkIQh4=
I've made some progress tracking down the cause of this bug. It's
related to the new manner in which
the visitor is passed (by const reference instead of as a pointer). In
the EdgeCollapse constructor, the visitor
passed in by the user is *copied*. This means that any variables
tracked and modified in the visitor which
is actually called by the surface mesh simplification algorithm will not
be visible once the algorithm
has finished. This is very different from the previous interface where
the visitor the user passed in
was actually used rather than copied by EdgeCollapse. Any suggestions
for the best fix for this issue, if
one needs to access data inside the visitor from outside of EdgeCollapse?
Thanks,
Rob
wrote:
> Hello,
>
> A number of changes have been made to the interface for the surface mesh
> simplification package; specifically in the way the visitor works. While
> the
> changes generally look good (I'm especially fond of the addition of the
> OnCollapsed call to the visitor), there seems to be an issue with the new
> interface (at least on my platform). I've compiled CGAL-3.5-beta1 on ubuntu
> 9.04 using g++ 4.3.3. The problem is apparent from the
> edge_collapse_enriched_polyhedron example. It seems as though the
> simplification is performed, but when the member variables of the
> user-defined
> visitor class are accessed, they all have a value of zero. When I run the
> example with the cube.off model in the example directory, I get the
> following
> output:
>
> "
> Edges collected: 18
> 62
> Edges collected: 0
> Edges proccessed: 0
> Edges collapsed: 0
>
> Edges not collapsed due to topological constrians: 0
> Edge not collapsed due to cost computation constrians: 0
> Edge not collapsed due to placement computation constrians: 0
>
> Finished...
> 12 edges removed.
> 6 final edges.
> "
>
> As you can see, all of the "Edges *:" lines have a value of 0, which is
> clearly
> incorrect. Any help getting to the bottom of this issue would be greatly
> appreciated.
>
> Thanks,
> Rob
>
- [cgal-discuss] Error with new Surface_mesh_simplification package, rob.patro, 09/16/2009
- Re: [cgal-discuss] Error with new Surface_mesh_simplification package, Rob, 09/16/2009
- Re: [cgal-discuss] Error with new Surface_mesh_simplification package, Fernando Cacciola, 09/16/2009
- Re: [cgal-discuss] Error with new Surface_mesh_simplification package, Rob, 09/16/2009
Archive powered by MHonArc 2.6.16.