n.m
n.m

Reputation: 485

how to remove vertex , edge or face from CGAL::Linear_cell_complex_for_combinatorial_map

I'm creating an application using qt creator which read .off files as CGAL::Linear_cell_complex_for_combinatorial_map and preview it I want to make operations on the read mesh such as removing vertix,edge or face and restore it .

I created a loop to access darts : Dart_handle dh;

for (LCC_3::Dart_range::iterator it=lcc.darts().begin(),
           itend=lcc.darts().end(); it!=itend; )
    {
      dh=it++;
      if ( it!=itend && it==lcc.beta<2>(dh) ) ++it;

}

any help or usefull links to simplify mesh or removing vertices , edges or faces ? I appreciate any help

Upvotes: 0

Views: 662

Answers (1)

gdamiand
gdamiand

Reputation: 681

You can use the remove_cell operation. The method is templated by the dimension of the cell to remove: 0 for vertices, 1 for edges, 2 for faces...

See the doc here and the example there.

Upvotes: 1

Related Questions