Skip to content

Commit

Permalink
Support width for draft shield
Browse files Browse the repository at this point in the history
  • Loading branch information
vovodroid committed Jun 7, 2024
1 parent e843a54 commit ca50af3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@ LayerResult GCodeGenerator::process_layer(
const std::pair<size_t, size_t> loops = loops_it->second;
this->set_origin(0., 0.);
m_avoid_crossing_perimeters.use_external_mp();
Flow layer_skirt_flow = print.skirt_flow().with_height(float(m_skirt_done.back() - (m_skirt_done.size() == 1 ? 0. : m_skirt_done[m_skirt_done.size() - 2])));
Flow layer_skirt_flow = print.skirt_flow(this->layer()->id() == 0).with_height(float(m_skirt_done.back() - (m_skirt_done.size() == 1 ? 0. : m_skirt_done[m_skirt_done.size() - 2])));
double mm3_per_mm = layer_skirt_flow.mm3_per_mm();

size_t i_start = loops.first;
Expand Down Expand Up @@ -3142,6 +3142,7 @@ std::string GCodeGenerator::extrude_skirt(
// Override extrusion parameters.
el.path_attributes.mm3_per_mm = extrusion_flow_override.mm3_per_mm;
el.path_attributes.height = extrusion_flow_override.height;
el.path_attributes.width = extrusion_flow_override.width;
gcode += this->_extrude(el.path_attributes, el.path, description, speed);
}

Expand Down
4 changes: 2 additions & 2 deletions src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,9 @@ Flow Print::brim_flow() const
(float)this->skirt_first_layer_height());
}

Flow Print::skirt_flow() const
Flow Print::skirt_flow(bool first_layer) const
{
ConfigOptionFloatOrPercent width = m_config.first_layer_extrusion_width;
ConfigOptionFloatOrPercent width = first_layer ? m_config.first_layer_extrusion_width : m_default_object_config.support_material_extrusion_width;
if (width.value == 0)
width = m_print_regions.front()->config().perimeter_extrusion_width;
if (width.value == 0)
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class Print : public PrintBaseWithState<PrintStep, psCount>
std::string validate(std::vector<std::string>* warnings = nullptr) const override;
double skirt_first_layer_height() const;
Flow brim_flow() const;
Flow skirt_flow() const;
Flow skirt_flow(bool first_layer = true) const;

std::vector<unsigned int> object_extruders() const;
std::vector<unsigned int> support_material_extruders() const;
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInt(1));

def = this->add("support_material_extrusion_width", coFloatOrPercent);
def->label = L("Support material");
def->label = L("Support material/Draft shield");
def->category = L("Extrusion Width");
def->tooltip = L("Set this to a non-zero value to set a manual extrusion width for support material. "
"If left zero, default extrusion width will be used if set, otherwise nozzle diameter will be used. "
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
for (auto el : { "support_material_style", "support_material_pattern", "support_material_with_sheath",
"support_material_spacing", "support_material_angle",
"support_material_interface_pattern", "support_material_interface_layers",
"dont_support_bridges", "support_material_extrusion_width", "support_material_contact_distance",
"dont_support_bridges", "support_material_contact_distance",
"support_material_xy_spacing" })
toggle_field(el, have_support_material);
toggle_field("support_material_threshold", have_support_material_auto);
Expand Down

0 comments on commit ca50af3

Please sign in to comment.