Skip to content

Commit

Permalink
Merge pull request #8548 from gdamiand/CMap_LCC_automatic_attribute_b…
Browse files Browse the repository at this point in the history
…ug-gdamiand

Bug fix in LCC method set_automatic_attributes_management
  • Loading branch information
sloriot committed Oct 18, 2024
2 parents 7d4fc58 + b3762ed commit 12fe9a1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Combinatorial_map/include/CGAL/Combinatorial_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -3707,6 +3707,9 @@ namespace CGAL {
this->automatic_attributes_management = newval;
}

void set_automatic_attributes_management_without_correction(bool newval)
{ this->automatic_attributes_management = newval; }

/** Create an half-edge.
* @return a dart of the new half-edge.
*/
Expand Down
3 changes: 3 additions & 0 deletions Generalized_map/include/CGAL/Generalized_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -2946,6 +2946,9 @@ namespace CGAL {
this->automatic_attributes_management = newval;
}

void set_automatic_attributes_management_without_correction(bool newval)
{ this->automatic_attributes_management = newval; }

/** Create an half-edge.
* @return a dart of the new half-edge.
*/
Expand Down
12 changes: 6 additions & 6 deletions Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ void MainWindow::on_actionMerge_coplanar_faces_triggered()
timer.start();
#endif

scene.lcc->set_update_attributes(false);
scene.lcc->set_automatic_attributes_management(false);

std::vector<Dart_descriptor> edges;
LCC::size_type treated = scene.lcc->get_new_mark();
Expand Down Expand Up @@ -1073,7 +1073,7 @@ void MainWindow::on_actionMerge_coplanar_faces_triggered()
scene.lcc->free_mark(treated);
scene.lcc->free_mark(treated2);

scene.lcc->set_update_attributes(true);
scene.lcc->set_automatic_attributes_management(true);

#ifdef CGAL_PROFILE_LCC_DEMO
timer.stop();
Expand All @@ -1100,7 +1100,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered()

LCC::Dart_range::iterator prev;
bool first = true;
scene.lcc->set_update_attributes(false);
scene.lcc->set_automatic_attributes_management(false);

for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()),
itend=scene.lcc->darts().end(); it!=itend; )
Expand All @@ -1127,7 +1127,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered()
}
}

scene.lcc->set_update_attributes(true);
scene.lcc->set_automatic_attributes_management(true);

#ifdef CGAL_PROFILE_LCC_DEMO
timer.stop();
Expand Down Expand Up @@ -1751,7 +1751,7 @@ void MainWindow::onMengerInc()

if (!mengerUpdateAttributes)
{
scene.lcc->set_update_attributes(false);
scene.lcc->set_automatic_attributes_management(false);
}

std::vector<Dart_descriptor> edges;
Expand Down Expand Up @@ -1838,7 +1838,7 @@ void MainWindow::onMengerInc()
update_volume_list_add(scene.lcc->attribute<3>(mengerVolumes[i]));
}

scene.lcc->set_update_attributes(true);
scene.lcc->set_automatic_attributes_management(true);
}

#ifdef CGAL_PROFILE_LCC_DEMO
Expand Down
6 changes: 5 additions & 1 deletion Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ namespace CGAL {

/** Set the status of the management of the attributes of the Map
*/
void set_update_attributes(bool newval)
void set_automatic_attributes_management(bool newval)
{
if (this->automatic_attributes_management == false && newval == true)
{
Expand All @@ -847,6 +847,10 @@ namespace CGAL {

this->automatic_attributes_management = newval;
}

void set_automatic_attributes_management_without_correction(bool newval)
{ this->automatic_attributes_management = newval; }

};

} // namespace CGAL
Expand Down

0 comments on commit 12fe9a1

Please sign in to comment.