Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Mesh simplification with edges marked as non-removable

Subject: CGAL users discussion list

List archive

[cgal-discuss] Mesh simplification with edges marked as non-removable


Chronological Thread 
  • From: costantinos <>
  • To:
  • Subject: [cgal-discuss] Mesh simplification with edges marked as non-removable
  • Date: Fri, 11 Oct 2013 08:20:04 -0700 (PDT)

Hi,

I am endeavouring to constrain the border edges of a 3D surface when I am
simplifying the mesh. However, the edges are not maintained in their
position. Please find an extract from the code below, I have used the
example provided in the manual and added a little to it. Is it the case that
below a stopping count threshold the constraint no longer works? I compared
the results of edges constrained and non-constrained and found that the
non-constrained was more faithful to the original mesh geometry for the same
stopping criterion! Any help or advice would be appreciated.

Thank you.


SMS::Count_stop_predicate<Surface> stop(80);

Constrains_map constrains_map ;

surface.normalize_border();
if ( surface.size_of_border_edges() != 0) {
std::cerr << "The input object has the following no of border edges:
" << surface.size_of_border_edges() << "\n";
}


for( Surface::Halfedge_iterator eb = surface.border_halfedges_begin(),
ee = surface.halfedges_end() ; eb != ee ; ++ eb )
{
constrains_map.set_is_constrained(eb,true);
}


int r = SMS::edge_collapse
(surface
,stop

,CGAL::vertex_index_map(boost::get(CGAL::vertex_external_index,surface))
.edge_index_map (boost::get(CGAL::edge_external_index ,surface))
.edge_is_border_map(constrains_map)
);

std::cout << "\nFinished...\n" << r << " edges removed.\n"
<< (surface.size_of_halfedges()/2) << " final edges.\n" ;



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Mesh-simplification-with-edges-marked-as-non-removable-tp4658180.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page