diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt
index b2a020333ec..9b9b2add68f 100644
--- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt
+++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt
@@ -27,7 +27,7 @@ polyhedron_demo_plugin(mesh_segmentation_plugin Mesh_segmentation_plugin ${segme
target_link_libraries(mesh_segmentation_plugin scene_polyhedron_item scene_surface_mesh_item)
qt5_wrap_ui( mesh_plane_detectionUI_FILES Mesh_plane_detection_dialog.ui)
-polyhedron_demo_plugin(mesh_plane_detection_plugin Mesh_plane_detection_plugin Mesh_plane_detection_impl ${mesh_plane_detectionUI_FILES})
+polyhedron_demo_plugin(mesh_plane_detection_plugin Mesh_plane_detection_plugin ${mesh_plane_detectionUI_FILES})
target_link_libraries(mesh_plane_detection_plugin scene_polyhedron_item)
qt5_wrap_ui( mesh_simplificationUI_FILES Mesh_simplification_dialog.ui)
diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_dialog.ui
new file mode 100644
index 00000000000..9e7625e4af3
--- /dev/null
+++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_dialog.ui
@@ -0,0 +1,130 @@
+
+
+ Mesh_plane_detection_dialog
+
+
+
+ 0
+ 0
+ 349
+ 117
+
+
+
+ Mesh Plane Detection
+
+
+ -
+
+
-
+
+
+ Minimum area
+
+
+
+ -
+
+
+ 5
+
+
+ 0.000010000000000
+
+
+ 1000000.000000000000000
+
+
+ 0.010000000000000
+
+
+ 0.010000000000000
+
+
+
+ -
+
+
+ Maximum deviation from normal
+
+
+
+ -
+
+
+ °
+
+
+ 1
+
+
+ 90
+
+
+ 30
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 13
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ Mesh_plane_detection_dialog
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ Mesh_plane_detection_dialog
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_plugin.cpp
new file mode 100644
index 00000000000..3ab81b0ad04
--- /dev/null
+++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_plane_detection_plugin.cpp
@@ -0,0 +1,260 @@
+#include
+#include
+
+#include "Scene_polyhedron_item.h"
+#include "Polyhedron_type.h"
+#include "Scene.h"
+#include "Color_map.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+//#include
+#include