From 5dd709bf1efeeff3f5d865b29a35258dec25f027 Mon Sep 17 00:00:00 2001 From: supermerill Date: Fri, 3 Aug 2018 19:54:19 +0200 Subject: [PATCH] Modify dense_infill to an automatic parameter --- xs/src/libslic3r/Fill/Fill.cpp | 15 +- xs/src/libslic3r/Fill/FillBase.cpp | 1 + xs/src/libslic3r/Fill/FillRectilinear2.cpp | 26 +++ xs/src/libslic3r/Fill/FillRectilinear2.hpp | 10 ++ xs/src/libslic3r/PrintConfig.cpp | 102 +---------- xs/src/libslic3r/PrintConfig.hpp | 12 +- xs/src/libslic3r/PrintObject.cpp | 194 ++++++++++++++++----- xs/src/slic3r/GUI/GUI.cpp | 2 +- xs/src/slic3r/GUI/OptionsGroup.cpp | 2 +- xs/src/slic3r/GUI/Preset.cpp | 2 +- xs/src/slic3r/GUI/Tab.cpp | 11 +- 11 files changed, 210 insertions(+), 167 deletions(-) diff --git a/xs/src/libslic3r/Fill/Fill.cpp b/xs/src/libslic3r/Fill/Fill.cpp index b0b806fd1..40e87cbe4 100644 --- a/xs/src/libslic3r/Fill/Fill.cpp +++ b/xs/src/libslic3r/Fill/Fill.cpp @@ -59,7 +59,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) layerm.fill_surfaces.group(&groups); //if internal infill can be dense, place it on his own group - if (layerm.region()->config.infill_dense_layers.getInt() > 0) { + if (layerm.region()->config.infill_dense.getBool() && layerm.region()->config.fill_density<40) { SurfacesPtr *denseGroup = NULL; const uint32_t nbGroups = groups.size(); for (uint32_t num_group = 0; num_group < nbGroups; ++num_group) { @@ -68,7 +68,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) //if solid, wrong group if (srf->is_solid()) break; //find surface that can be used as dense infill - if (srf->maxNbSolidLayersOnTop <= layerm.region()->config.infill_dense_layers.getInt() + if (srf->maxNbSolidLayersOnTop <= 1 && srf->maxNbSolidLayersOnTop > 0) { //remove from the group groups[num_group].erase(groups[num_group].begin() + num_srf); @@ -193,12 +193,13 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) (surface.is_top() ? layerm.region()->config.top_fill_pattern.value : layerm.region()->config.bottom_fill_pattern.value) : ipRectilinear; } else { - if (layerm.region()->config.infill_dense_layers.getInt() > 0 - && surface.maxNbSolidLayersOnTop <= layerm.region()->config.infill_dense_layers.getInt() + if (layerm.region()->config.infill_dense.getBool() + && layerm.region()->config.fill_density<40 + && surface.maxNbSolidLayersOnTop <= 1 && surface.maxNbSolidLayersOnTop > 0) { - density = layerm.region()->config.infill_dense_density.getFloat(); + density = 42; is_denser = true; - fill_pattern = layerm.region()->config.infill_dense_pattern.value; + fill_pattern = ipRectiWithPerimeter; } if (density <= 0) continue; @@ -253,7 +254,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) f->layer_id = layerm.layer()->id(); f->z = layerm.layer()->print_z; - if (is_denser)f->angle = float(Geometry::deg2rad(layerm.region()->config.infill_dense_angle.value)); + if (is_denser)f->angle = 0; else f->angle = float(Geometry::deg2rad(layerm.region()->config.fill_angle.value)); // Maximum length of the perimeter segment linking two infill lines. f->link_max_length = scale_(link_max_length); diff --git a/xs/src/libslic3r/Fill/FillBase.cpp b/xs/src/libslic3r/Fill/FillBase.cpp index fe7591494..4e850c34f 100644 --- a/xs/src/libslic3r/Fill/FillBase.cpp +++ b/xs/src/libslic3r/Fill/FillBase.cpp @@ -39,6 +39,7 @@ Fill* Fill::new_from_type(const InfillPattern type) case ipSmooth: return new FillSmooth(); case ipSmoothTriple: return new FillSmoothTriple(); case ipSmoothHilbert: return new FillSmoothHilbert(); + case ipRectiWithPerimeter: return new FillRectilinear2Peri(); default: CONFESS("unknown type"); return nullptr; } } diff --git a/xs/src/libslic3r/Fill/FillRectilinear2.cpp b/xs/src/libslic3r/Fill/FillRectilinear2.cpp index 382f8d83f..d8b0f0fbf 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear2.cpp +++ b/xs/src/libslic3r/Fill/FillRectilinear2.cpp @@ -1472,4 +1472,30 @@ Polylines FillCubic::fill_surface(const Surface *surface, const FillParams ¶ return polylines_out; } + +Polylines FillRectilinear2Peri::fill_surface(const Surface *surface, const FillParams ¶ms) { + Polylines polylines_out; + //generate perimeter: + //TODO: better optimize start/end point? + ExPolygons path_perimeter = offset_ex(surface->expolygon, scale_(-this->spacing/2)); + for (ExPolygon &expolygon : path_perimeter) { + expolygon.contour.make_counter_clockwise(); + polylines_out.push_back(expolygon.contour.split_at_index(0)); + for (Polygon hole : expolygon.holes) { + hole.make_clockwise(); + polylines_out.push_back(hole.split_at_index(0)); + } + } + + //50% overlap with the new perimeter + ExPolygons path_inner = offset2_ex(surface->expolygon, scale_(-this->spacing * 1.5), scale_(this->spacing)); + for (ExPolygon &expolygon : path_inner) { + Surface surfInner(*surface, expolygon); + if (!fill_surface_by_lines(&surfInner, params, 0.f, 0.f, polylines_out)) { + printf("FillRectilinear2::fill_surface() failed to fill a region.\n"); + } + } + return polylines_out; +} + } // namespace Slic3r diff --git a/xs/src/libslic3r/Fill/FillRectilinear2.hpp b/xs/src/libslic3r/Fill/FillRectilinear2.hpp index 4459919b0..d3621914f 100644 --- a/xs/src/libslic3r/Fill/FillRectilinear2.hpp +++ b/xs/src/libslic3r/Fill/FillRectilinear2.hpp @@ -68,6 +68,16 @@ protected: virtual float _layer_angle(size_t idx) const { return 0.f; } }; +class FillRectilinear2Peri : public FillRectilinear2 { +public: + // require bridge flow since it's a pre-bridge over very sparse infill + virtual bool use_bridge_flow() const { return true; } + + virtual Fill* clone() const { return new FillRectilinear2Peri(*this); }; + virtual ~FillRectilinear2Peri() {} + virtual Polylines fill_surface(const Surface *surface, const FillParams ¶ms); + +}; }; // namespace Slic3r diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 605b24371..a2c25f2cc 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -357,7 +357,7 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm"); def->cli = "top-layer-anchor=f"; def->min = 0; - def->default_value = new ConfigOptionFloat(3); + def->default_value = new ConfigOptionFloat(1.5); def = this->add("bridged_infill_margin", coFloat); def->label = L("Bridged"); @@ -366,7 +366,7 @@ PrintConfigDef::PrintConfigDef() def->sidetext = L("mm"); def->cli = "top-layer-anchor=f"; def->min = 0; - def->default_value = new ConfigOptionFloat(3); + def->default_value = new ConfigOptionFloat(2); def = this->add("external_perimeter_extrusion_width", coFloatOrPercent); def->label = L("External perimeters"); @@ -870,96 +870,13 @@ PrintConfigDef::PrintConfigDef() def->min = 1; def->default_value = new ConfigOptionInt(1); - def = this->add("infill_dense_layers", coInt); - def->label = L("Number of dense layers"); + def = this->add("infill_dense", coBool); + def->label = L("Suporting dense layer"); def->category = L("Infill"); - def->tooltip = L("Set the number of denser infill layer you want between the normal sparse infill and the top layers. 0 to disable"); - def->sidetext = L("layers"); - def->cli = "infill-dense-layers=i"; - def->min = 0; - def->default_value = new ConfigOptionInt(0); - - def = this->add("infill_dense_angle", coFloat); - def->label = L("angle"); - def->category = L("Infill"); - def->tooltip = L("Set the Angle of dense infill."); - def->sidetext = L("layers"); - def->cli = "infill-dense-angle=i"; - def->min = 0; - def->default_value = new ConfigOptionFloat(0); - - def = this->add("infill_dense_density", coPercent); - def->gui_type = "f_enum_open"; - def->gui_flags = "show_value"; - def->label = L("Dense fill density"); - def->category = L("Infill"); - def->tooltip = L("Density of the dense internal infill, expressed in the range 0% - 100%."); - def->sidetext = L("%"); - def->cli = "infill-dense-density=s"; - def->min = 0; - def->max = 100; - def->enum_values.push_back("0"); - def->enum_values.push_back("4"); - def->enum_values.push_back("5.5"); - def->enum_values.push_back("7.5"); - def->enum_values.push_back("10"); - def->enum_values.push_back("13"); - def->enum_values.push_back("18"); - def->enum_values.push_back("23"); - def->enum_values.push_back("31"); - def->enum_values.push_back("42"); - def->enum_values.push_back("55"); - def->enum_values.push_back("75"); - def->enum_values.push_back("100"); - def->enum_labels.push_back("0"); - def->enum_labels.push_back("4"); - def->enum_labels.push_back("5.5"); - def->enum_labels.push_back("7.5"); - def->enum_labels.push_back("10"); - def->enum_labels.push_back("13"); - def->enum_labels.push_back("18"); - def->enum_labels.push_back("23"); - def->enum_labels.push_back("31"); - def->enum_labels.push_back("42"); - def->enum_labels.push_back("55"); - def->enum_labels.push_back("75"); - def->enum_labels.push_back("100"); - def->default_value = new ConfigOptionPercent(42); + def->tooltip = L("Enable the creation of a support layer under the first solid layer. Allow to use lower infill ratio without compromizing the top quality"); + def->cli = "infill-dense!"; + def->default_value = new ConfigOptionBool(1); - def = this->add("infill_dense_pattern", coEnum); - def->label = L("pattern"); - def->category = L("Sparse fill pattern"); - def->tooltip = L("Fill pattern for denser-density sparse infill."); - def->cli = "dense-fill-pattern=s"; - def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); - def->enum_values.push_back("rectilinear"); - def->enum_values.push_back("grid"); - def->enum_values.push_back("triangles"); - def->enum_values.push_back("stars"); - def->enum_values.push_back("cubic"); - def->enum_values.push_back("line"); - def->enum_values.push_back("concentric"); - def->enum_values.push_back("honeycomb"); - def->enum_values.push_back("3dhoneycomb"); - def->enum_values.push_back("gyroid"); - def->enum_values.push_back("hilbertcurve"); - def->enum_values.push_back("archimedeanchords"); - def->enum_values.push_back("octagramspiral"); - def->enum_labels.push_back("Rectilinear"); - def->enum_labels.push_back("Grid"); - def->enum_labels.push_back("Triangles"); - def->enum_labels.push_back("Stars"); - def->enum_labels.push_back("Cubic"); - def->enum_labels.push_back("Line"); - def->enum_labels.push_back("Concentric"); - def->enum_labels.push_back("Honeycomb"); - def->enum_labels.push_back("3D Honeycomb"); - def->enum_labels.push_back("Gyroid"); - def->enum_labels.push_back("Hilbert Curve"); - def->enum_labels.push_back("Archimedean Chords"); - def->enum_labels.push_back("Octagram Spiral"); - def->default_value = new ConfigOptionEnum(ipRectilinear); - def = this->add("infill_extruder", coInt); def->label = L("Infill extruder"); def->category = L("Extruders"); @@ -2445,11 +2362,6 @@ std::string FullPrintConfig::validate() // --bottom-fill-pattern if (! print_config_def.get("bottom_fill_pattern")->has_enum_value(this->bottom_fill_pattern.serialize())) return "Invalid value for --bottom-fill-pattern"; - - // --infill-dense-pattern - if (! print_config_def.get("infill_dense_pattern")->has_enum_value(this->infill_dense_pattern.serialize())) - return "Invalid value for --infill-dense-pattern"; - // --fill-density if (fabs(this->fill_density.value - 100.) < EPSILON && diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 315753048..9949e61d5 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -30,6 +30,7 @@ enum GCodeFlavor { enum InfillPattern { ipRectilinear, ipGrid, ipTriangles, ipStars, ipCubic, ipLine, ipConcentric, ipHoneycomb, ip3DHoneycomb, ipGyroid, ipHilbertCurve, ipArchimedeanChords, ipOctagramSpiral, ipSmooth, ipSmoothHilbert, ipSmoothTriple, + ipRectiWithPerimeter, }; enum SupportMaterialPattern { @@ -80,6 +81,7 @@ template<> inline t_config_enum_values& ConfigOptionEnum::get_enu keys_map["smooth"] = ipSmooth; keys_map["smoothtriple"] = ipSmoothTriple; keys_map["smoothhilbert"] = ipSmoothHilbert; + keys_map["rectiwithperimeter"] = ipRectiWithPerimeter; } return keys_map; } @@ -412,10 +414,7 @@ public: ConfigOptionInt infill_every_layers; ConfigOptionFloatOrPercent infill_overlap; ConfigOptionFloat infill_speed; - ConfigOptionInt infill_dense_layers; - ConfigOptionFloat infill_dense_angle; - ConfigOptionPercent infill_dense_density; - ConfigOptionEnum infill_dense_pattern; + ConfigOptionBool infill_dense; ConfigOptionBool infill_first; ConfigOptionBool overhangs; ConfigOptionBool no_perimeter_unsupported; @@ -465,10 +464,7 @@ protected: OPT_PTR(infill_every_layers); OPT_PTR(infill_overlap); OPT_PTR(infill_speed); - OPT_PTR(infill_dense_layers); - OPT_PTR(infill_dense_angle); - OPT_PTR(infill_dense_density); - OPT_PTR(infill_dense_pattern); + OPT_PTR(infill_dense); OPT_PTR(infill_first); OPT_PTR(overhangs); OPT_PTR(no_perimeter_unsupported); diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index a32c74f28..42a17a996 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -170,7 +170,9 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector fallback to full coverage + return ExPolygons({ growing_area }); + } + bigger_polygon = intersection_ex(bigger_polygon[0], growing_area); + if (bigger_polygon.size() != 1 || bigger_polygon[0].area() > growing_area.area()) { + // Growing too much => we can as well use the full coverage, in this case + return ExPolygons() = { growing_area }; + } + polygon_reduced = try_fit_to_size(polygon_to_cover, bigger_polygon[0], allowedPoints); + } + //ok, we have a good one, now try to optimise (unless there are almost no growth) + if (current_offset > offset * 3){ + //try to shrink + uint32_t nb_opti_max = 6; + for (uint32_t i = 0; i < nb_opti_max; ++i){ + coord_t new_offset = (previous_offset + current_offset) / 2; + ExPolygons bigger_polygon = offset_ex(polygon_to_check, new_offset); + if (bigger_polygon.size() != 1) { + //Warn, growing a single polygon result in many/no other, use previous good result + break; + } + bigger_polygon = intersection_ex(bigger_polygon[0], growing_area); + if (bigger_polygon.size() != 1 || bigger_polygon[0].area() > growing_area.area()) { + //growing too much, use previous good result (imo, should not be possible to enter this branch) + break; + } + ExPolygon polygon_test = try_fit_to_size(polygon_to_cover, bigger_polygon[0], allowedPoints); + if (!diff_ex(polygon_to_cover, polygon_test).empty()){ + //bad, not enough, use a bigger offset + previous_offset = new_offset; + } + else { + //good, we may now try a smaller offset + current_offset = new_offset; + polygon_reduced = polygon_test; + } + } + } + + //return the area which cover the growing_area. Intersect it to retreive the holes. + return intersection_ex(polygon_reduced, growing_area); +} + +void PrintObject::count_distance_solid() { + //if dense area * COEFF_SPLIT > sparse area then fill all with dense + // sparse area = layer's fill area - dense area + const float COEFF_SPLIT = .1; + const int NB_DENSE_LAYERS = 1; for (int idx_region = 0; idx_region < this->_print->regions.size(); ++idx_region) { //count how many surface there are on each one LayerRegion *previousOne = NULL; if (this->layers.size() > 1) previousOne = this->layers[this->layers.size() - 1]->get_region(idx_region); - if (previousOne != NULL && previousOne->region()->config.infill_dense_layers.getInt() > 0) { + if (previousOne != NULL && previousOne->region()->config.infill_dense.getBool() && previousOne->region()->config.fill_density<40) { for (Surface &surf : previousOne->fill_surfaces.surfaces) { if (surf.is_solid()) { surf.maxNbSolidLayersOnTop = 0; @@ -442,54 +527,70 @@ void PrintObject::count_distance_solid() { // upp.expolygon.overlaps(surf.expolygon) or surf.expolygon.overlaps(upp.expolygon) ExPolygons intersect = intersection_ex(sparse_polys, ExPolygons() = { upp.expolygon }, true); if (!intersect.empty()) { - uint16_t dist = (uint16_t)(upp.maxNbSolidLayersOnTop + 1); - if (dist <= layerm->region()->config.infill_dense_layers.getInt()) { - // it will be a dense infill, split the surface if needed - uint64_t area_intersect = 0; - for (ExPolygon poly_inter : intersect) area_intersect += poly_inter.area(); - //if it's in a dense area and the current surface isn't a dense one yet and the not-dense is too small. - if (surf.area() > area_intersect * 3 && - surf.maxNbSolidLayersOnTop > layerm->region()->config.infill_dense_layers.getInt()) { - //split in two - if (dist == 1) { - //if just under the solid area, we can expand a bit - //remove too small sections and grew a bit to anchor it into the part - intersect = offset2_ex(intersect, - -layerm->flow(frInfill).scaled_width(), - layerm->flow(frInfill).scaled_width() + scale_(layerm->region()->config.external_infill_margin)); - } else { - //just remove too small sections - intersect = offset2_ex(intersect, - -layerm->flow(frInfill).scaled_width(), - layerm->flow(frInfill).scaled_width()); + double area_intersect = 0; + for (ExPolygon poly_inter : intersect) area_intersect += poly_inter.area(); + //like intersect.empty() but more resilient + if (area_intersect > layerm->flow(frInfill).scaled_width() * layerm->flow(frInfill).scaled_width() * 2){ + uint16_t dist = (uint16_t)(upp.maxNbSolidLayersOnTop + 1); + if (dist <= NB_DENSE_LAYERS) { + // it will be a dense infill, split the surface if needed + //if the not-dense is too big to do a full dense and the current surface isn't a dense one yet. + if (surf.area() > area_intersect * COEFF_SPLIT && + surf.maxNbSolidLayersOnTop > NB_DENSE_LAYERS) { + //split in two + if (dist == 1) { + //if just under the solid area, we can expand a bit + ExPolygons cover_intersect; + for (ExPolygon &expoly_tocover : intersect) { + ExPolygons temp = (fit_to_size(expoly_tocover, expoly_tocover, + diff_ex(offset_ex(layerm->fill_no_overlap_expolygons, layerm->flow(frInfill).scaled_width()), + offset_ex(layerm->fill_no_overlap_expolygons, -layerm->flow(frInfill).scaled_width())), + surf.expolygon, + 4 * layerm->flow(frInfill).scaled_width(), 0.01)); + cover_intersect.insert(cover_intersect.end(), temp.begin(), temp.end()); + } + intersect = offset2_ex(cover_intersect, + -layerm->flow(frInfill).scaled_width(), + layerm->flow(frInfill).scaled_width());// +scale_(expandby)); + //layerm->region()->config.external_infill_margin)); + } + else { + //just remove too small sections + intersect = offset2_ex(intersect, + -layerm->flow(frInfill).scaled_width(), + layerm->flow(frInfill).scaled_width()); + } + if (!intersect.empty()) { + ExPolygons sparse_surfaces = offset2_ex( + diff_ex(sparse_polys, intersect, true), + -layerm->flow(frInfill).scaled_width(), + layerm->flow(frInfill).scaled_width()); + ExPolygons dense_surfaces = diff_ex(sparse_polys, sparse_surfaces, true); + //assign (copy) + sparse_polys.clear(); + sparse_polys.insert(sparse_polys.begin(), sparse_surfaces.begin(), sparse_surfaces.end()); + dense_polys.insert(dense_polys.end(), dense_surfaces.begin(), dense_surfaces.end()); + dense_dist = std::min(dense_dist, dist); + } } - if (!intersect.empty()) { - ExPolygons sparse_surfaces = offset2_ex( - diff_ex(sparse_polys, intersect, true), - -layerm->flow(frInfill).scaled_width(), - layerm->flow(frInfill).scaled_width()); - ExPolygons dense_surfaces = diff_ex(sparse_polys, sparse_surfaces, true); - //assign (copy) - sparse_polys.clear(); - sparse_polys.insert(sparse_polys.begin(), sparse_surfaces.begin(), sparse_surfaces.end()); - dense_polys.insert(dense_polys.end(), dense_surfaces.begin(), dense_surfaces.end()); - dense_dist = std::min(dense_dist, dist); + else { + if (area_intersect < layerm->flow(frInfill).scaled_width() * layerm->flow(frInfill).scaled_width() * 2) + surf.maxNbSolidLayersOnTop = std::min(surf.maxNbSolidLayersOnTop, dist); } - } else { + } + else { surf.maxNbSolidLayersOnTop = std::min(surf.maxNbSolidLayersOnTop, dist); } - } else { - surf.maxNbSolidLayersOnTop = std::min(surf.maxNbSolidLayersOnTop, dist); } } } //check if we need to split the surface if (dense_dist != 30000) { - uint64_t area_dense = 0; + double area_dense = 0; for (ExPolygon poly_inter : dense_polys) area_dense += poly_inter.area(); - uint64_t area_sparse = 0; + double area_sparse = 0; for (ExPolygon poly_inter : sparse_polys) area_sparse += poly_inter.area(); - if (area_sparse > area_dense * 3) { + if (area_sparse > area_dense * COEFF_SPLIT) { //split dense_polys = union_ex(dense_polys); for (ExPolygon dense_poly : dense_polys) { @@ -526,6 +627,7 @@ void PrintObject::count_distance_solid() { } } + // This function analyzes slices of a region (SurfaceCollection slices). // Each region slice (instance of Surface) is analyzed, whether it is supported or whether it is the top surface. // Initially all slices are of type stInternal. diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index d17994c53..923fe5024 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -596,7 +596,7 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt break; case coEnum:{ if (opt_key.compare("top_fill_pattern") == 0 || opt_key.compare("bottom_fill_pattern") == 0 || - opt_key.compare("fill_pattern") == 0 || opt_key.compare("infill_dense_pattern") == 0) + opt_key.compare("fill_pattern") == 0) config.set_key_value(opt_key, new ConfigOptionEnum(boost::any_cast(value))); else if (opt_key.compare("gcode_flavor") == 0) config.set_key_value(opt_key, new ConfigOptionEnum(boost::any_cast(value))); diff --git a/xs/src/slic3r/GUI/OptionsGroup.cpp b/xs/src/slic3r/GUI/OptionsGroup.cpp index d65017ca7..709cfaf6c 100644 --- a/xs/src/slic3r/GUI/OptionsGroup.cpp +++ b/xs/src/slic3r/GUI/OptionsGroup.cpp @@ -450,7 +450,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config break; case coEnum:{ if (opt_key.compare("top_fill_pattern") == 0 || opt_key.compare("bottom_fill_pattern") == 0 || - opt_key.compare("fill_pattern") == 0 || opt_key.compare("infill_dense_pattern") == 0 ){ + opt_key.compare("fill_pattern") == 0 ){ ret = static_cast(config.option>(opt_key)->value); } else if (opt_key.compare("gcode_flavor") == 0 ){ diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp index d8dff533b..5e8d26331 100644 --- a/xs/src/slic3r/GUI/Preset.cpp +++ b/xs/src/slic3r/GUI/Preset.cpp @@ -306,7 +306,7 @@ const std::vector& Preset::print_options() "elefant_foot_compensation", "xy_size_compensation", "hole_size_compensation", "threads", "resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "only_one_perimeter_top", "compatible_printers", "compatible_printers_condition", "inherits", - "infill_dense_layers", "infill_dense_density", "infill_dense_pattern", "infill_dense_angle", + "infill_dense", "no_perimeter_unsupported", "min_perimeter_unsupported", "noperi_bridge_only" }; return s_opts; diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 54451ccfa..aabfaac9f 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -831,14 +831,9 @@ void TabPrint::build() optgroup->append_single_option_line("enforce_full_fill_volume"); optgroup = page->new_optgroup(_(L("Reducing printing time"))); - optgroup->append_single_option_line("infill_every_layers"); - optgroup->append_single_option_line("infill_only_where_needed"); - line = { _(L("Use denser infill below solid layers")), "" }; - line.append_option(optgroup->get_option("infill_dense_layers")); - line.append_option(optgroup->get_option("infill_dense_density")); - line.append_option(optgroup->get_option("infill_dense_pattern")); - line.append_option(optgroup->get_option("infill_dense_angle")); - optgroup->append_line(line); + optgroup->append_single_option_line("infill_every_layers"); + optgroup->append_single_option_line("infill_only_where_needed"); + optgroup->append_single_option_line("infill_dense"); optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("solid_infill_every_layers");