

Hi,
I'm coding mesh simplification using edge collapse method with two different cost functions
The GetCost function calculates the cost of collapsing an edge. I want to assign a userdefined cost value so that some edges will not collapse.
Or if there is any other way to keep some edges untouched during the simplification process.
Please advise on how to proceed with this.
Best Regards to CGALers Shrabani


You have to remember the strategy that we discussed. You need to figure things out for yourself, as your question is not very detailed. I makes it look like you want someone else to do your implementation. You need to think about your program and plan it accordingly.
No one on CGAL land is going to do your work.
 Input meshes from holes FHi,
EHj, VHk,and
bone
FBl, EBm, VBn,
each of which should also have a corresponding label.
 First, your program should enhance the CGAL vertex, edge and face data structure to add the label of the corresponding opposite vertex, edge or face. Call it matchlabel or something like that. The edge data structure is found here: https://doc.cgal.org/latest/Surface_mesh_simplification/classEdgeProfile.html .
 I.e.: if there is a double edge E_{H1} and E_{B2} then under E_{H1} >
match_label = E_{B2} ,
and E_{B2} >
match_label = E_{H1 } .
Do the same for faces. You may also want to do the same for vertices, maybe.
 Start with hole meshes. There will be no constraints for hole edges; we want to iterate a few times, and each time we delete an edge or a face of a
hole, also delete the edge or face of the corresponding match_label edge or face within the bone model, so that the shared mesh geometry is the same on both sides. Make sure to update the match_label for each newly configured edge or face or vertex.
 After simplifying hole meshes, and propagating the simplification to the bone mesh on the other side, we are still left with more simplification to
do in the rest of the bone mesh, where we want to maintain constant the shared bone edges, faces, and vertices that we obtained previously from step 2. For each of these, which we want to maintain the same, invoke the counterpart of GetCost(), which is SetCost(xxx)
(obvious, no?) for each edge, vertex and face. The value xxx should be a large value, according to CGAL. Something like
float mi = std::numeric_limits<float>::max();
If you SetCost(xxx) with a large value like that, this edge will not be collapsable, if I understand correctly.
I would like you to develop more willingness to think through the algorithm and roll up your sleeves. You have the ability, but you need to take an active role, rather than wait for Prince Charming to show up on his white horse.
Keep pinging me as you develop this.
Michel Audette, Ph.D.
Associate Professor,
Department of Computational Modeling and Simulation Engineering,
Old Dominion University,
Norfolk, VA.
Hi,
I'm coding mesh simplification using edge collapse method with two different cost functions
The GetCost function calculates the cost of collapsing an edge. I want to assign a userdefined cost value so that some edges will not collapse.
Or if there is any other way to keep some edges untouched during the simplification process.
Please advise on how to proceed with this.
Best Regards to CGALers
Shrabani


A lot of us would be more willing to contribute to mailing lists if power users / researchers / others read the documentation first. This email trail is getting 'Starred'. On Tue, Sep 3, 2019 at 2:40 PM Audette, Michel A. < [hidden email]> wrote:
You have to remember the strategy that we discussed. You need to figure things out for yourself, as your question is not very detailed. I makes it look like you want someone else to do your implementation. You need to think about your program and plan it accordingly.
No one on CGAL land is going to do your work.
 Input meshes from holes FHi,
EHj, VHk,and
bone
FBl, EBm, VBn,
each of which should also have a corresponding label.
 First, your program should enhance the CGAL vertex, edge and face data structure to add the label of the corresponding opposite vertex, edge or face. Call it matchlabel or something like that. The edge data structure is found here: https://doc.cgal.org/latest/Surface_mesh_simplification/classEdgeProfile.html .
 I.e.: if there is a double edge E_{H1} and E_{B2} then under E_{H1} >
match_label = E_{B2} ,
and E_{B2} >
match_label = E_{H1 } .
Do the same for faces. You may also want to do the same for vertices, maybe.
 Start with hole meshes. There will be no constraints for hole edges; we want to iterate a few times, and each time we delete an edge or a face of a
hole, also delete the edge or face of the corresponding match_label edge or face within the bone model, so that the shared mesh geometry is the same on both sides. Make sure to update the match_label for each newly configured edge or face or vertex.
 After simplifying hole meshes, and propagating the simplification to the bone mesh on the other side, we are still left with more simplification to
do in the rest of the bone mesh, where we want to maintain constant the shared bone edges, faces, and vertices that we obtained previously from step 2. For each of these, which we want to maintain the same, invoke the counterpart of GetCost(), which is SetCost(xxx)
(obvious, no?) for each edge, vertex and face. The value xxx should be a large value, according to CGAL. Something like
float mi = std::numeric_limits<float>::max();
If you SetCost(xxx) with a large value like that, this edge will not be collapsable, if I understand correctly.
I would like you to develop more willingness to think through the algorithm and roll up your sleeves. You have the ability, but you need to take an active role, rather than wait for Prince Charming to show up on his white horse.
Keep pinging me as you develop this.
Michel Audette, Ph.D.
Associate Professor,
Department of Computational Modeling and Simulation Engineering,
Old Dominion University,
Norfolk, VA.
Hi,
I'm coding mesh simplification using edge collapse method with two different cost functions
The GetCost function calculates the cost of collapsing an edge. I want to assign a userdefined cost value so that some edges will not collapse.
Or if there is any other way to keep some edges untouched during the simplification process.
Please advise on how to proceed with this.
Best Regards to CGALers
Shrabani

