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

@ -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