From e9875f57a9cdcd32d6244dd38200078f5c2a905c Mon Sep 17 00:00:00 2001
From: Vojtech Bubnik <bubnikv@gmail.com>
Date: Wed, 24 Feb 2021 18:08:32 +0100
Subject: [PATCH] Fix of Unnecessary raft on models with large perimeter but
 nothing inside. #430 Don't fill in the holes in 1st layer of the raft. The
 user may apply a higher raft_expansion if one wants a better 1st layer
 adhesion.

---
 src/libslic3r/SupportMaterial.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp
index b77d81219..cbe9ffb1b 100644
--- a/src/libslic3r/SupportMaterial.cpp
+++ b/src/libslic3r/SupportMaterial.cpp
@@ -1371,8 +1371,13 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::top_contact_
                 if (layer_id == 0) {
                     // This is the first object layer, so the object is being printed on a raft and
                     // we're here just to get the object footprint for the raft.
-                    // We only consider contours and discard holes to get a more continuous raft.
+#if 0
+                    // The following line was filling excessive holes in the raft, see GH #430
                     overhang_polygons = collect_slices_outer(layer);
+#else
+                    // Don't fill in the holes. The user may apply a higher raft_expansion if one wants a better 1st layer adhesion.
+                    overhang_polygons = to_polygons(layer.lslices);
+#endif
                     // Expand for better stability.
                     contact_polygons = offset(overhang_polygons, scaled<float>(m_object_config->raft_expansion.value));
                 } else {