Added a new switch: ensure_vertical_shell_thickness

This enables a zig-zag infill similar to Cura or Simplify3D
on overhangs.
This commit is contained in:
bubnikv 2016-10-16 22:11:19 +02:00
parent 7d7f093120
commit 47cc9687a0
8 changed files with 30 additions and 6 deletions

View File

@ -240,6 +240,7 @@ The author of the Silk icon set is Mark James.
Quality options (slower slicing):
--extra-perimeters Add more perimeters when needed (default: yes)
--ensure_vertical_shell_thickness Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top+bottom solid layers). (default: no)
--avoid-crossing-perimeters Optimize travel moves so that no perimeters are crossed (default: no)
--thin-walls Detect single-width walls (default: yes)
--overhangs Experimental option to use bridge flow, speed and fan for overhangs

View File

@ -229,9 +229,9 @@ sub make_fill {
);
$f->spacing($internal_flow->spacing);
$using_internal_flow = 1;
} elsif ($surface->surface_type == S_TYPE_INTERNALBRIDGE) {
# The internal bridging layer will be sparse.
$f->spacing($flow->spacing * 2.);
# } elsif ($surface->surface_type == S_TYPE_INTERNALBRIDGE) {
# # The internal bridging layer will be sparse.
# $f->spacing($flow->spacing * 2.);
} else {
$f->spacing($flow->spacing);
}
@ -248,6 +248,11 @@ sub make_fill {
$_,
density => $density/100,
layer_height => $h,
#FIXME Vojtech disabled the automatic extrusion width adjustment as this feature quite often
# generated extrusions with excessive widths.
# The goal of the automatic line width adjustment was to fill in a region without a gap, but because
# the filled regions are mostly not aligned with the fill direction, very likely
# the extrusion width adjustment causes more harm than good.
dont_adjust => 1,
), @{ $surface->offset(-scale($f->spacing)/2) };

View File

@ -461,7 +461,7 @@ sub build {
layer_height first_layer_height
perimeters spiral_vase
top_solid_layers bottom_solid_layers
extra_perimeters avoid_crossing_perimeters thin_walls overhangs
extra_perimeters ensure_vertical_shell_thickness avoid_crossing_perimeters thin_walls overhangs
seam_position external_perimeters_first
fill_density fill_pattern external_fill_pattern
infill_every_layers infill_only_where_needed
@ -523,6 +523,7 @@ sub build {
{
my $optgroup = $page->new_optgroup('Quality (slower slicing)');
$optgroup->append_single_option_line('extra_perimeters');
$optgroup->append_single_option_line('ensure_vertical_shell_thickness');
$optgroup->append_single_option_line('avoid_crossing_perimeters');
$optgroup->append_single_option_line('thin_walls');
$optgroup->append_single_option_line('overhangs');
@ -787,7 +788,7 @@ sub _update {
my $have_perimeters = $config->perimeters > 0;
$self->get_field($_)->toggle($have_perimeters)
for qw(extra_perimeters thin_walls overhangs seam_position external_perimeters_first
for qw(extra_perimeters ensure_vertical_shell_thickness thin_walls overhangs seam_position external_perimeters_first
external_perimeter_extrusion_width
perimeter_speed small_perimeter_speed external_perimeter_speed);

View File

@ -406,6 +406,7 @@ $j
Quality options (slower slicing):
--extra-perimeters Add more perimeters when needed (default: yes)
--ensure-vertical-shell-thickness Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top+bottom solid layers). (default: no)
--avoid-crossing-perimeters Optimize travel moves so that no perimeters are crossed (default: no)
--thin-walls Detect single-width walls (default: yes)
--overhangs Experimental option to use bridge flow, speed and fan for overhangs

View File

@ -149,6 +149,13 @@ PrintConfigDef::PrintConfigDef()
def->height = 120;
def->default_value = new ConfigOptionString("M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors\n");
def = this->add("ensure_vertical_shell_thickness", coBool);
def->label = "Ensure vertical shell thickness";
def->category = "Layers and Perimeters";
def->tooltip = "Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top+bottom solid layers).";
def->cli = "ensure-vertical-shell-thickness!";
def->default_value = new ConfigOptionBool(false);
def = this->add("external_fill_pattern", coEnum);
def->label = "Top/bottom fill pattern";
def->category = "Infill";

View File

@ -206,6 +206,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
ConfigOptionInt bottom_solid_layers;
ConfigOptionFloat bridge_flow_ratio;
ConfigOptionFloat bridge_speed;
ConfigOptionBool ensure_vertical_shell_thickness;
ConfigOptionEnum<InfillPattern> external_fill_pattern;
ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
ConfigOptionFloatOrPercent external_perimeter_speed;
@ -245,6 +246,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
OPT_PTR(bottom_solid_layers);
OPT_PTR(bridge_flow_ratio);
OPT_PTR(bridge_speed);
OPT_PTR(ensure_vertical_shell_thickness);
OPT_PTR(external_fill_pattern);
OPT_PTR(external_perimeter_extrusion_width);
OPT_PTR(external_perimeter_speed);

View File

@ -247,7 +247,8 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|| *opt_key == "solid_infill_below_area"
|| *opt_key == "infill_extruder"
|| *opt_key == "solid_infill_extruder"
|| *opt_key == "infill_extrusion_width") {
|| *opt_key == "infill_extrusion_width"
|| *opt_key == "ensure_vertical_shell_thickness") {
steps.insert(posPrepareInfill);
} else if (*opt_key == "external_fill_pattern"
|| *opt_key == "fill_angle"
@ -359,6 +360,8 @@ void
PrintObject::discover_vertical_shells()
{
for (size_t idx_region = 0; idx_region < this->_print->regions.size(); ++ idx_region) {
if (! this->_print->regions[idx_region]->config.ensure_vertical_shell_thickness.value)
continue;
for (size_t idx_layer = 0; idx_layer < this->layers.size(); ++ idx_layer) {
Layer* layer = this->layers[idx_layer];
LayerRegion* layerm = layer->get_region(idx_region);

View File

@ -1,9 +1,13 @@
#ifndef slic3r_SupportMaterial_hpp_
#define slic3r_SupportMaterial_hpp_
#include "Flow.hpp"
namespace Slic3r {
class PrintObject;
class PrintConfig;
class PrintObjectConfig;
// how much we extend support around the actual contact area
#define SUPPORT_MATERIAL_MARGIN 1.5