mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-25 05:44:25 +08:00
Don't allow holes in infill_dense
Ensure that infill_every_layers and infill_only_where_needed when infill_dense, because it can't tolerate voids yet (they create different regions) TODO: find a way to merge sparse & voids and "recover" from that merge. no sparse + dense infill >better_than> infill_only_where_needed + dense infill supermerill/SuperSlicer#1657
This commit is contained in:
parent
af5c3f13ba
commit
db8d15241b
@ -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) {
|
||||
|
@ -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<uint16_t> 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.
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user