Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@fr.fr>2020-04-21 16:10:04 +0300
committersupermerill <merill@fr.fr>2020-04-21 16:10:04 +0300
commit91a74c5d9409b633c39ecd6a100c9a3d6bdf8df5 (patch)
treeb34837e575a58d35aec11f3a647da94e86aeae5c
parentb9ab7641c50dab07e89bf7bfe9abff169b59d7c5 (diff)
#201 fix for modifiers: now exclude empty region for make_perimeter.1.39.0
-rw-r--r--src/libslic3r/Layer.cpp15
-rw-r--r--src/libslic3r/Layer.hpp2
2 files changed, 12 insertions, 5 deletions
diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp
index bd8b7e1bd..0528fdc85 100644
--- a/src/libslic3r/Layer.cpp
+++ b/src/libslic3r/Layer.cpp
@@ -131,6 +131,7 @@ void Layer::make_perimeters()
for (LayerRegionPtrs::const_iterator it = layerm + 1; it != m_regions.end(); ++it) {
LayerRegion* other_layerm = *it;
const PrintRegionConfig &other_config = other_layerm->region()->config();
+ if (other_layerm->slices().empty()) continue;
/// !!! add here the settings you want to be added in the per-object menu.
/// if you don't do that, objects will share the same region, and the same settings.
if (config.perimeter_extruder == other_config.perimeter_extruder
@@ -138,8 +139,8 @@ void Layer::make_perimeters()
&& config.perimeter_speed == other_config.perimeter_speed // it os mandatory? can't this be set at gcode.cpp?
&& config.external_perimeter_extrusion_width == other_config.external_perimeter_extrusion_width
&& config.external_perimeters_first == other_config.external_perimeters_first
- && config.external_perimeters_vase == other_config.external_perimeters_vase
- && config.external_perimeters_hole == other_config.external_perimeters_hole
+ && config.external_perimeters_vase == other_config.external_perimeters_vase
+ && config.external_perimeters_hole == other_config.external_perimeters_hole
&& config.external_perimeters_nothole == other_config.external_perimeters_nothole
&& config.external_perimeter_speed == other_config.external_perimeter_speed
&& config.extra_perimeters_odd_layers == other_config.extra_perimeters_odd_layers
@@ -200,8 +201,14 @@ void Layer::make_perimeters()
// Separate the fill surfaces.
ExPolygons expp = intersection_ex(to_polygons(fill_surfaces), (*l)->slices());
(*l)->fill_expolygons = expp;
- (*l)->fill_no_overlap_expolygons = (*layerm)->fill_no_overlap_expolygons;
- (*l)->fill_surfaces.set(std::move(expp), fill_surfaces.surfaces.front());
+ (*l)->fill_no_overlap_expolygons = (layerm_config)->fill_no_overlap_expolygons;
+ //(*l)->perimeters = (layerm_config)->perimeters;
+ //(*l)->thin_fills = (layerm_config)->thin_fills;
+ (*l)->fill_surfaces.clear();
+ for (Surface &surf: fill_surfaces.surfaces) {
+ ExPolygons exp = intersection_ex(to_polygons(surf.expolygon), (*l)->slices());
+ (*l)->fill_surfaces.append(std::move(exp), surf);
+ }
}
}
}
diff --git a/src/libslic3r/Layer.hpp b/src/libslic3r/Layer.hpp
index 09e5fec5a..15ae44d7b 100644
--- a/src/libslic3r/Layer.hpp
+++ b/src/libslic3r/Layer.hpp
@@ -42,7 +42,7 @@ public:
// Collection of perimeter surfaces. This is a cached result of diff(slices, fill_surfaces).
// While not necessary, the memory consumption is meager and it speeds up calculation.
// The perimeter_surfaces keep the IDs of the slices (top/bottom/)
- SurfaceCollection perimeter_surfaces;
+ //SurfaceCollection perimeter_surfaces;
// collection of expolygons representing the bridged areas (thus not
// needing support material)