diff --git a/xs/src/libslic3r/Fill/Fill.cpp b/xs/src/libslic3r/Fill/Fill.cpp index 0158221af..4cec6169a 100644 --- a/xs/src/libslic3r/Fill/Fill.cpp +++ b/xs/src/libslic3r/Fill/Fill.cpp @@ -279,6 +279,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out) params.density = 0.01 * density; params.dont_adjust = false; params.fill_exactly = layerm.region()->config.enforce_full_fill_volume.getBool(); + params.dont_connect = layerm.region()->config.infill_not_connected.getBool(); // calculate actual flow from spacing (which might have been adjusted by the infill // pattern generator) diff --git a/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp b/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp index aa9774784..92b70fe56 100644 --- a/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp +++ b/xs/src/libslic3r/Fill/Fill3DHoneycomb.cpp @@ -165,7 +165,7 @@ void Fill3DHoneycomb::_fill_surface_single( polylines = intersection_pl(polylines, (Polygons)expolygon); // connect lines - if (! params.dont_connect && ! polylines.empty()) { // prevent calling leftmost_point() on empty collections + if (! polylines.empty()) { // prevent calling leftmost_point() on empty collections ExPolygon expolygon_off; { ExPolygons expolygons_off = offset_ex(expolygon, SCALED_EPSILON); @@ -180,7 +180,7 @@ void Fill3DHoneycomb::_fill_surface_single( PolylineCollection::leftmost_point(polylines), false); // reverse allowed bool first = true; for (Polylines::iterator it_polyline = chained.begin(); it_polyline != chained.end(); ++ it_polyline) { - if (! first) { + if (!params.dont_connect && !first) { // Try to connect the lines. Points &pts_end = polylines_out.back().points; const Point &first_point = it_polyline->points.front(); diff --git a/xs/src/libslic3r/Fill/FillGyroid.cpp b/xs/src/libslic3r/Fill/FillGyroid.cpp index 46d6382f7..31a169e52 100644 --- a/xs/src/libslic3r/Fill/FillGyroid.cpp +++ b/xs/src/libslic3r/Fill/FillGyroid.cpp @@ -154,7 +154,7 @@ void FillGyroid::_fill_surface_single( polylines = intersection_pl(polylines, (Polygons)expolygon); // connect lines - if (! params.dont_connect && ! polylines.empty()) { // prevent calling leftmost_point() on empty collections + if (! polylines.empty()) { // prevent calling leftmost_point() on empty collections ExPolygon expolygon_off; { ExPolygons expolygons_off = offset_ex(expolygon, (float)SCALED_EPSILON); @@ -169,7 +169,7 @@ void FillGyroid::_fill_surface_single( PolylineCollection::leftmost_point(polylines), false); // reverse allowed bool first = true; for (Polyline &polyline : chained) { - if (! first) { + if (!params.dont_connect && !first) { // Try to connect the lines. Points &pts_end = polylines_out.back().points; const Point &first_point = polyline.points.front(); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index dc44f4959..04156503e 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -778,7 +778,7 @@ PrintConfigDef::PrintConfigDef() def->default_value = new ConfigOptionPercent(20); def = this->add("fill_pattern", coEnum); - def->label = L("Fill pattern"); + def->label = L("Pattern"); def->category = L("Infill"); def->tooltip = L("Fill pattern for general low-density infill."); def->cli = "fill-pattern=s"; @@ -947,6 +947,13 @@ PrintConfigDef::PrintConfigDef() def->cli = "infill-dense!"; def->default_value = new ConfigOptionBool(false); + def = this->add("infill_not_connected", coBool); + def->label = ("Do not connect infill lines to each other."); + def->category = L("Infill"); + def->tooltip = L("If checked, the infill algorithm will try to not connect the lines near the infill. Can be useful for art or with high infill/perimeter overlap."); + def->cli = "infill-not-connected!"; + def->default_value = new ConfigOptionBool(false); + def = this->add("infill_dense_algo", coEnum); def->label = L("Algorithm"); def->tooltip = L("Choose the way the dense layer is lay out." diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 658d1b268..cf41e152e 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -461,6 +461,7 @@ public: ConfigOptionInt infill_every_layers; ConfigOptionFloatOrPercent infill_overlap; ConfigOptionFloat infill_speed; + ConfigOptionBool infill_not_connected; ConfigOptionBool infill_dense; ConfigOptionEnum infill_dense_algo; ConfigOptionBool infill_first; @@ -518,6 +519,7 @@ protected: OPT_PTR(infill_overlap); OPT_PTR(infill_speed); OPT_PTR(infill_dense); + OPT_PTR(infill_not_connected); OPT_PTR(infill_dense_algo); OPT_PTR(infill_first); OPT_PTR(overhangs); diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 0b17ffec9..96c57621c 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -206,6 +206,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector& Preset::print_options() "infill_dense", "infill_dense_algo", "no_perimeter_unsupported", "min_perimeter_unsupported", "noperi_bridge_only", "support_material_solid_first_layer", "perimeter_loop", "perimeter_loop_seam", "seam_travel" , "remove_small_gaps" + , "infill_not_connected" }; return s_opts; } diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 6f3cf0da3..7c760c8f6 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -830,15 +830,18 @@ void TabPrint::build() line.append_option(optgroup->get_option("perimeter_loop_seam")); optgroup->append_line(line); - page = add_options_page(_(L("Infill")), "infill.png"); - optgroup = page->new_optgroup(_(L("Infill"))); - optgroup->append_single_option_line("fill_density"); - optgroup->append_single_option_line("fill_pattern"); - optgroup->append_single_option_line("top_fill_pattern"); - optgroup->append_single_option_line("bottom_fill_pattern"); - optgroup->append_single_option_line("enforce_full_fill_volume"); + page = add_options_page(_(L("Infill")), "infill.png"); + optgroup = page->new_optgroup(_(L("Infill"))); + optgroup->append_single_option_line("fill_density"); + line = { _(L("Inside")), "" }; + line.append_option(optgroup->get_option("fill_pattern")); + line.append_option(optgroup->get_option("infill_not_connected")); + optgroup->append_line(line); + optgroup->append_single_option_line("top_fill_pattern"); + optgroup->append_single_option_line("bottom_fill_pattern"); + optgroup->append_single_option_line("enforce_full_fill_volume"); - optgroup = page->new_optgroup(_(L("Reducing printing time"))); + 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("Suporting dense layer")), "" }; diff --git a/xs/src/slic3r/GUI/Tab.hpp b/xs/src/slic3r/GUI/Tab.hpp index 230fe659e..2fa987f37 100644 --- a/xs/src/slic3r/GUI/Tab.hpp +++ b/xs/src/slic3r/GUI/Tab.hpp @@ -330,7 +330,7 @@ public: size_t m_sys_extruders_count; TabPrinter() {} - TabPrinter(wxNotebook* parent, bool no_controller) : Tab(parent, _(L("Printer Settings")), "printer", no_controller) {} + TabPrinter(wxNotebook* parent, bool no_controller) : Tab(parent, _(L("Hardware Settings")), "printer", no_controller) {} ~TabPrinter(){} void build() override;