CGAL - Insert edge in a face
- 
0
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 edge and restore it .
I tried the following code but it doesn't do any action (insert/remove)void MainWindow ::insertCell() { dh1= lcc.darts().begin() ; dh2=lcc.darts().end(); if (lcc.is_insertable_cell_1_in_cell_2( dh1, dh2) ){ lcc.insert_cell_1_in_cell_2( dh1,dh2); } lcc.display_characteristics(std::cout) << ", valid=" << lcc.is_valid() << std::endl; } void MainWindow ::removeCell() { dh1= lcc.darts().begin() ; if( (lcc.is_removable<1>(dh1)) ){ lcc.remove_cell<1>(dh1); } lcc.display_characteristics(std::cout) << ", valid=" << lcc.is_valid() << std::endl; }any help please?
 - 
Hi and welcome to devnet,
Might be a silly question but did you ensure that these two methods are being called ?
 - 
Hi and welcome to devnet,
Might be a silly question but did you ensure that these two methods are being called ?
 - 
Ok, then the other thing that you don't take into account is that you don't print anything in the case the
lcc.is_insertable_cell_1_in_cell_2and thelcc.is_removable<1>(dh1)methods return false.So the
lcc.insert_cell_1_in_cell_2and andlcc.remove_cell<1>(dh1);might just not be called at all. - 
@SGaist said in CGAL - Insert edge in a face:
hing that you don't take into account is that you don't print anything in the ca
right
I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable
but the remove method , it enter if statement scope and execute lcc.remove_cell<1>(dh1); whithout any removing action - 
@nmya said in CGAL - Insert edge in a face:
I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable
I don't know either. I never used that framework. It's up to you to find out why. Maybe your
lccobject doesn't contain what is needed to allow insertion. - 
@nmya said in CGAL - Insert edge in a face:
I traced the program , it's skipped lcc.insert_cell_1_in_cell_2 and print the last line - I don't know why it isn't insertable
I don't know either. I never used that framework. It's up to you to find out why. Maybe your
lccobject doesn't contain what is needed to allow insertion.