diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index 3a5bcfd5b..b623d6cc5 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -423,7 +423,7 @@ void LayerRegion::prepare_fill_surfaces() if (! spiral_vase && this->region()->config().top_solid_layers == 0) { for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) if (surface->has_pos_top()) - surface->surface_type = (this->layer()->object()->config().infill_only_where_needed) ? + surface->surface_type = (this->layer()->object()->config().infill_only_where_needed && !this->region()->config().infill_dense.value) ? stPosInternal | stDensVoid : stPosInternal | stDensSparse; } if (this->region()->config().bottom_solid_layers == 0) { diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 25c33cd84..7d9c2dc09 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1041,6 +1041,7 @@ namespace Slic3r { if ((best_point - polygon_reduced.contour.points[pos_check]).norm() < scale_(0.01)) ++pos_check; else polygon_reduced.contour.points.erase(polygon_reduced.contour.points.begin() + pos_check); } + polygon_reduced.holes.clear(); return polygon_reduced; } @@ -1051,7 +1052,7 @@ namespace Slic3r { //fix uncoverable area ExPolygons polygons_to_cover = intersection_ex(bad_polygon_to_cover, growing_area); if (polygons_to_cover.size() != 1) - return { bad_polygon_to_cover }; + return { growing_area }; const ExPolygon polygon_to_cover = polygons_to_cover.front(); //grow the polygon_to_check enough to cover polygon_to_cover @@ -1178,7 +1179,7 @@ namespace Slic3r { Surfaces surf_to_add; ExPolygons dense_polys; std::vector dense_priority; - ExPolygons surfs_with_overlap = { surface.expolygon }; + const ExPolygons surfs_with_overlap = { surface.expolygon }; ////create a surface with overlap to allow the dense thing to bond to the infill coord_t scaled_width = layerm->flow(frInfill, true).scaled_width(); coord_t overlap = scaled_width / 4; @@ -3424,7 +3425,7 @@ static void fix_mesh_connectivity(TriangleMesh &mesh) upper_internal = intersection(overhangs, lower_layer_internal_surfaces); // Apply new internal infill to regions. for (LayerRegion* layerm : lower_layer->m_regions) { - if (layerm->region()->config().fill_density.value == 0) + if (layerm->region()->config().fill_density.value == 0 || layerm->region()->config().infill_dense.value) continue; SurfaceType internal_surface_types[] = { stPosInternal | stDensSparse, stPosInternal | stDensVoid }; Polygons internal; @@ -3665,7 +3666,8 @@ static void fix_mesh_connectivity(TriangleMesh &mesh) // Work on each region separately. for (size_t region_id = 0; region_id < this->region_volumes.size(); ++region_id) { const PrintRegion* region = this->print()->regions()[region_id]; - const size_t every = region->config().infill_every_layers.value; + // can't have void if using infill_dense + const size_t every = region->config().infill_dense.value ? 1 : region->config().infill_every_layers.value; if (every < 2 || region->config().fill_density == 0.) continue; // Limit the number of combined layers to the maximum height allowed by this regions' nozzle. diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index e862a385d..84f048b0c 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -400,6 +400,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) bool have_infill_dense = config->opt_bool("infill_dense") && can_have_infill_dense; for (auto el : { "infill_dense_algo" }) toggle_field(el, have_infill_dense); + if(have_infill) + for (auto el : { "infill_every_layers", "infill_only_where_needed" }) + toggle_field(el, !have_infill_dense); bool has_spiral_vase = have_perimeters && config->opt_bool("spiral_vase"); bool has_top_solid_infill = config->opt_int("top_solid_layers") > 0 || has_spiral_vase;