diff --git a/Constrained_triangulation_3/doc/Constrained_triangulation_3/Constrained_triangulation_3.txt b/Constrained_triangulation_3/doc/Constrained_triangulation_3/Constrained_triangulation_3.txt
index 28785b77db7..268cc1d3fbc 100644
--- a/Constrained_triangulation_3/doc/Constrained_triangulation_3/Constrained_triangulation_3.txt
+++ b/Constrained_triangulation_3/doc/Constrained_triangulation_3/Constrained_triangulation_3.txt
@@ -103,12 +103,11 @@ Delaunay triangulation constructed from a PLC.
\cgalFigureAnchor{CT_3_plc2cdt_fig}
-
+
\cgalFigureCaptionBegin{CT_3_plc2cdt_fig}
Left: PLC (360 vertices);
-Middle: CCDT (2452 vertices);
-Right: the same CCDT seen with cutplane.
+Right: CCDT (2452 vertices).
\cgalFigureCaptionEnd
diff --git a/Lab/demo/Lab/Scene_c3t3_item.cpp b/Lab/demo/Lab/Scene_c3t3_item.cpp
index fddd169491d..7e1999643ea 100644
--- a/Lab/demo/Lab/Scene_c3t3_item.cpp
+++ b/Lab/demo/Lab/Scene_c3t3_item.cpp
@@ -252,6 +252,13 @@ QMenu* Scene_c3t3_item::contextMenu()
SIGNAL(triggered()), this,
SLOT(export_facets_in_complex()));
+ QAction* actionResetSurfacePatches = menu->addAction(tr("Reset surface patches"));
+ actionResetSurfacePatches->setObjectName("actionResetSurfacePatches");
+ connect(actionResetSurfacePatches,
+ SIGNAL(triggered()),
+ this,
+ SLOT(reset_surface_patches()));
+
menu->setProperty(prop_name, true);
}
return menu;
@@ -331,6 +338,27 @@ void Scene_c3t3_item::export_facets_in_complex()
this->setVisible(false);
}
+void Scene_c3t3_item::reset_surface_patches()
+{
+ if(c3t3().number_of_facets() == 0)
+ {
+ CGAL::Three::Three::warning(tr("There are no facets in the complex."));
+ return;
+ }
+
+ const C3t3::Facet first_facet = *c3t3().facets_in_complex_begin();
+ const C3t3::Surface_patch_index first_index = c3t3().surface_patch_index(first_facet);
+
+ for(auto f : c3t3().facets_in_complex())
+ {
+ const auto mf = c3t3().triangulation().mirror_facet(f);
+ f.first->set_surface_patch_index(f.second, first_index);
+ mf.first->set_surface_patch_index(mf.second, first_index);
+ }
+ this->invalidateOpenGLBuffers();
+ Q_EMIT itemChanged();
+}
+
void Scene_c3t3_item::drawEdges(Viewer_interface *viewer) const
{
Scene_triangulation_3_item::drawEdges(viewer);
diff --git a/Lab/demo/Lab/Scene_c3t3_item.h b/Lab/demo/Lab/Scene_c3t3_item.h
index d7277681a3d..4eb9f44e850 100644
--- a/Lab/demo/Lab/Scene_c3t3_item.h
+++ b/Lab/demo/Lab/Scene_c3t3_item.h
@@ -77,6 +77,7 @@ using namespace CGAL::Three;
public Q_SLOTS:
void show_cnc(bool);
void export_facets_in_complex();
+ void reset_surface_patches();
void initializeBuffers(Viewer_interface *) const override;
void computeElements() const override;
void set_sharp_edges_angle(double d);