mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-11 14:39:00 +08:00
Allow to skip the sparse infill "perimeters"
This commit is contained in:
parent
9b330f4631
commit
cb65da2b3a
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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."
|
||||
|
@ -461,6 +461,7 @@ public:
|
||||
ConfigOptionInt infill_every_layers;
|
||||
ConfigOptionFloatOrPercent infill_overlap;
|
||||
ConfigOptionFloat infill_speed;
|
||||
ConfigOptionBool infill_not_connected;
|
||||
ConfigOptionBool infill_dense;
|
||||
ConfigOptionEnum<DenseInfillAlgo> 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);
|
||||
|
@ -206,6 +206,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|
||||
|| opt_key == "infill_every_layers"
|
||||
|| opt_key == "solid_infill_every_layers"
|
||||
|| opt_key == "infill_dense"
|
||||
|| opt_key == "infill_not_connected"
|
||||
|| opt_key == "infill_dense_algo"
|
||||
|| opt_key == "bottom_solid_layers"
|
||||
|| opt_key == "top_solid_layers"
|
||||
|
@ -309,6 +309,7 @@ const std::vector<std::string>& 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;
|
||||
}
|
||||
|
@ -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")), "" };
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user