Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Mesh simplification with edges marked as non-removable
  • Date: Mon, 14 Oct 2013 16:46:30 +0200
  • Organization: GeometryFactory

Please provide a minimal example showing the problem. I tried it with CGAL-4.3-beta1 and CGAL-4.2 on the attached model (in.off). I also attach the output (out.off). I set the stop counter to 3000.

Sebastien.


On 10/11/2013 05:20 PM, costantinos wrote:
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.


Attachment: out.zip
Description: Zip archive




Archive powered by MHonArc 2.6.18.

Top of Page