Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?
Chronological Thread
- From: Shrabani Ghosh <>
- To:
- Subject: Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?
- Date: Wed, 16 Oct 2019 22:18:24 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:i4QHxRBzj+TMAESxTGKpUyQJP3N1i/DPJgcQr6AfoPdwSPT+oMbcNUDSrc9gkEXOFd2Cra4d0KyJ7eu9AiQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagb75+Nhe7oATeusQWj4ZpN7o8xAbOrnZUYepd2HlmJUiUnxby58ew+IBs/iFNsP8/9MBOTLv3cb0gQbNXEDopPWY15Nb2tRbYVguA+mEcUmQNnRVWBQXO8Qz3UY3wsiv+sep9xTWaMMjrRr06RTiu86FmQwLuhSwaNTA27XvXh9R/g6JVoh2vpxJxzY3Jbo+LKPVzZbnScc8ASGdbQspdSy5MD4WhZIUPFeoBOuNYopHgqVsOtxuxHxKjC/npyj9Jm3T43K060+M6EQHGwQctGMkOsG7Po9XzLqsSXuC1zK7TzTXDa/5b3Szw6IfNch87oPGMWah8ftbWyUkqDg7IiEibp4LiPzOQzOsNsm6b4vJmVe21kGEosAVxrSa1ysgwjYnJg5oZylHC9SVjwYY6P8e0SEBhYdK8DJRQuDuVN49sTsMlWWFotyA3waAFt56jZCUG1ogryhrFZ/GEc4WE+AzvWPqSLDtihH9pZLSyjAuo/0e60O3zTMy03U5KriVbltnMsWgA1xnJ5ciGTvtx51mu1iuS2wzK5OFJIVw4mbDUK54mxb4wmZ4TvlrZEiDqn0X2ibeadkQi+ue29+TqeqvqqoOYOoNuiQzzMr4iltKjDek7KAQDX3SX9fy51LL5/E35RLtKjucxkqncqJ3aPt4bqbW/AwNP3YYj6xG/Dyym0NkcmXQKN11FeBedgIjoP1HCOuz3DfC6g1i0ijdk2+jGPqH9ApXKNnXMjLjhcqx560JF1QUzzMtf6I5JCrEaO/L+QVTxtdzdDh8hKQO42efnCNNn1oMfQ22DGKGZMLmB+WKO/f8ldumQeJcO6nG6MOkg//eojHkjmFZbc7PuxooScHn/H/JoJAKSbnPox9sACmwXpRFtcOu/g1KLVXtfZm25QrknzjA9EoOvS4nZFa63h7nU5yehF5dfYGEOJVCLCnegI56eUfFKZyKVOc8wwxQLULGgT8kq0hT451yy8KZuMueBon5QjpnkztUgv7SPxyF3ziR9CoGm60/IV3t9xzpaSDo/3aQ5qkt4mA/ajPpIxsdAHNkW3MtnFwc3MZmGkr5/AtH2Hw/NJ5KHFQ7gTdKhDjU8CNk2xo1WOhcvK5CZlhnGmhGSLfoQnr2PCoYz9/uFjXf0Lsd5jX3B0ft4gg==
Hi,
I assigned id to the halfedges. Like this :
for( Surface_mesh::Halfedge_iterator eb = surface_mesh.halfedges_begin()
, ee = surface_mesh.halfedges_end()
; eb != ee
; ++ eb
)
eb->id() = index++;
, ee = surface_mesh.halfedges_end()
; eb != ee
; ++ eb
)
eb->id() = index++;
But in the visitor, it does not print the original edges ids but just prints the increment numbers. How can I print in the visitor so that it shows the edge->id and I want to see the sequence of edge collapse?
Edges collected: 23
Edges collapsed: 1
Edges collapsed: 2
Edges collapsed: 3
Edges collapsed: 4
Edges collapsed: 5
Edges collapsed: 6
Edges collapsed: 7
Edges collapsed: 8
Edges collapsed: 9
Edges non_collapsable: 1
Edges non_collapsable: 2
Edges non_collapsable: 3
Edges collected: 23
Edges processed: 12
Edges collapsed: 9
Edges not collapsed due to topological constraints: 3
Edge not collapsed due to cost computation constraints: 0
Edge not collapsed due to placement computation constraints: 0
Finished...
20 edges removed.
6 final half edges.
Edges collapsed: 1
Edges collapsed: 2
Edges collapsed: 3
Edges collapsed: 4
Edges collapsed: 5
Edges collapsed: 6
Edges collapsed: 7
Edges collapsed: 8
Edges collapsed: 9
Edges non_collapsable: 1
Edges non_collapsable: 2
Edges non_collapsable: 3
Edges collected: 23
Edges processed: 12
Edges collapsed: 9
Edges not collapsed due to topological constraints: 3
Edge not collapsed due to cost computation constraints: 0
Edge not collapsed due to placement computation constraints: 0
Finished...
20 edges removed.
6 final half edges.
These are the final halfedges ids.
28
29
32
33
36
37
28
29
32
33
36
37
Thank You
Shrabani Ghosh
You have the information about what will be collapsed in the visitor.
You are free to assign an id to the edge if needed using a hash map
if needed.
Sebastien.
On 10/11/19 5:57 AM, Shrabani Ghosh wrote:
> Hi,
> I am working on surface_mesh_simplification.
> I am referencing here this example.
>
> https://doc.cgal.org/latest/Surface_mesh_simplification/Surface_mesh_simplification_2edge_collapse_visitor_surface_mesh_8cpp-example.html
>
> I want to keep track of the edges are collapsing for further use.
> Let's say, in my mesh, there are 10 edges.
>
> I want to use keep trace if edges 5,6,7,8 are collapsing.
> if 6 and 7 number edges are collapsed, I want to save the edge numbers.
>
> And after collapsing edges on the first iteration, the ids of the edges
> changes from the original mesh?
>
> Thank you.
> Shrabani Ghosh
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/11/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/16/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/16/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/21/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Shrabani Ghosh, 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/17/2019
- Re: [cgal-discuss] Is it possible to keep track of edges are collapsing in surface mesh?, Sebastien Loriot (GeometryFactory), 10/16/2019
Archive powered by MHonArc 2.6.18.