diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp index 9c65f18eb..4ad8136bb 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp @@ -141,6 +141,7 @@ void GLGizmoFlatten::update_planes() // Following constants are used for discarding too small polygons. const float minimal_area = 5.f; // in square mm (world coordinates) const float minimal_side = 1.f; // mm + const float minimal_angle = 1.f; // degree, initial value was 10, but cause bugs // Now we'll go through all the facets and append Points of facets sharing the same normal. // This part is still performed in mesh coordinate system. @@ -235,7 +236,7 @@ void GLGizmoFlatten::update_planes() discard = true; else { // We also check the inner angles and discard polygons with angles smaller than the following threshold - const double angle_threshold = ::cos(10.0 * (double)PI / 180.0); + const double angle_threshold = ::cos(minimal_angle * (double)PI / 180.0); for (unsigned int i = 0; i < polygon.size(); ++i) { const Vec3d& prec = polygon[(i == 0) ? polygon.size() - 1 : i - 1];