mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 08:15:56 +08:00
parent
d8f5882872
commit
d0459d60ce
@ -29,7 +29,9 @@ group:Retraction
|
|||||||
setting:idx:retract_restart_extra
|
setting:idx:retract_restart_extra
|
||||||
setting:idx:retract_before_travel
|
setting:idx:retract_before_travel
|
||||||
setting:idx:retract_layer_change
|
setting:idx:retract_layer_change
|
||||||
|
group:Retraction wipe
|
||||||
setting:idx:wipe
|
setting:idx:wipe
|
||||||
|
setting:idx:wipe_speed
|
||||||
setting:idx:retract_before_wipe
|
setting:idx:retract_before_wipe
|
||||||
setting:idx:wipe_extra_perimeter
|
setting:idx:wipe_extra_perimeter
|
||||||
group:Retraction when tool is disabled (advanced settings for multi-extruder setups)
|
group:Retraction when tool is disabled (advanced settings for multi-extruder setups)
|
||||||
|
@ -158,6 +158,8 @@ std::string Wipe::wipe(GCode& gcodegen, bool toolchange)
|
|||||||
/* Reduce feedrate a bit; travel speed is often too high to move on existing material.
|
/* Reduce feedrate a bit; travel speed is often too high to move on existing material.
|
||||||
Too fast = ripping of existing material; too slow = short wipe path, thus more blob. */
|
Too fast = ripping of existing material; too slow = short wipe path, thus more blob. */
|
||||||
double wipe_speed = gcodegen.writer().config.travel_speed.value * 0.8;
|
double wipe_speed = gcodegen.writer().config.travel_speed.value * 0.8;
|
||||||
|
if(gcodegen.writer().tool_is_extruder() && gcodegen.writer().config.wipe_speed.get_at(gcodegen.writer().tool()->id()) > 0)
|
||||||
|
wipe_speed = gcodegen.writer().config.wipe_speed.get_at(gcodegen.writer().tool()->id());
|
||||||
|
|
||||||
// get the retraction length
|
// get the retraction length
|
||||||
double length = gcodegen.writer().tool()->retract_length();
|
double length = gcodegen.writer().tool()->retract_length();
|
||||||
@ -461,7 +463,6 @@ static inline void set_extra_lift(const Layer& layer, const Print& print, GCodeW
|
|||||||
if (!(size_t(m_tool_change_idx) < m_tool_changes[m_layer_idx].size()))
|
if (!(size_t(m_tool_change_idx) < m_tool_changes[m_layer_idx].size()))
|
||||||
throw Slic3r::RuntimeError("Wipe tower generation failed, possibly due to empty first layer.");
|
throw Slic3r::RuntimeError("Wipe tower generation failed, possibly due to empty first layer.");
|
||||||
|
|
||||||
|
|
||||||
// Calculate where the wipe tower layer will be printed. -1 means that print z will not change,
|
// Calculate where the wipe tower layer will be printed. -1 means that print z will not change,
|
||||||
// resulting in a wipe tower with sparse layers.
|
// resulting in a wipe tower with sparse layers.
|
||||||
double wipe_tower_z = -1;
|
double wipe_tower_z = -1;
|
||||||
|
@ -686,7 +686,7 @@ const std::vector<std::string>& Preset::filament_options()
|
|||||||
"external_perimeter_fan_speed",
|
"external_perimeter_fan_speed",
|
||||||
// Retract overrides
|
// Retract overrides
|
||||||
"filament_retract_length", "filament_retract_lift", "filament_retract_lift_above", "filament_retract_lift_below", "filament_retract_speed", "filament_deretract_speed", "filament_retract_restart_extra", "filament_retract_before_travel",
|
"filament_retract_length", "filament_retract_lift", "filament_retract_lift_above", "filament_retract_lift_below", "filament_retract_speed", "filament_deretract_speed", "filament_retract_restart_extra", "filament_retract_before_travel",
|
||||||
"filament_retract_layer_change", "filament_wipe", "filament_wipe_extra_perimeter", "filament_retract_before_wipe",
|
"filament_retract_layer_change", "filament_wipe", "filament_wipe_speed", "filament_wipe_extra_perimeter", "filament_retract_before_wipe",
|
||||||
// Profile compatibility
|
// Profile compatibility
|
||||||
"filament_vendor", "compatible_prints", "compatible_prints_condition", "compatible_printers", "compatible_printers_condition", "inherits"
|
"filament_vendor", "compatible_prints", "compatible_prints_condition", "compatible_printers", "compatible_printers_condition", "inherits"
|
||||||
//merill adds
|
//merill adds
|
||||||
|
@ -184,6 +184,7 @@ bool Print::invalidate_state_by_config_options(const std::vector<t_config_option
|
|||||||
"use_volumetric_e",
|
"use_volumetric_e",
|
||||||
"variable_layer_height",
|
"variable_layer_height",
|
||||||
"wipe",
|
"wipe",
|
||||||
|
"wipe_speed",
|
||||||
"wipe_extra_perimeter"
|
"wipe_extra_perimeter"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4272,12 +4272,20 @@ void PrintConfigDef::init_fff_params()
|
|||||||
|
|
||||||
def = this->add("wipe", coBools);
|
def = this->add("wipe", coBools);
|
||||||
def->label = L("Wipe while retracting");
|
def->label = L("Wipe while retracting");
|
||||||
def->category = OptionCategory::general;
|
def->category = OptionCategory::extruders;
|
||||||
def->tooltip = L("This flag will move the nozzle while retracting to minimize the possible blob "
|
def->tooltip = L("This flag will move the nozzle while retracting to minimize the possible blob "
|
||||||
"on leaky extruders.");
|
"on leaky extruders.");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionBools{ false });
|
def->set_default_value(new ConfigOptionBools{ false });
|
||||||
|
|
||||||
|
def = this->add("wipe_speed", coFloats);
|
||||||
|
def->label = L("Wipe speed");
|
||||||
|
def->category = OptionCategory::extruders;
|
||||||
|
def->tooltip = L("Speed in mm/s of the wipe. If it's faster, it will try to go further away, as the wipe time is set by ( 100% - 'retract before wipe') * 'retaction length' / 'retraction speed'."
|
||||||
|
"\nIf set to zero, the travel speed is used.");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionFloats{ 0 });
|
||||||
|
|
||||||
def = this->add("wipe_tower", coBool);
|
def = this->add("wipe_tower", coBool);
|
||||||
def->label = L("Enable");
|
def->label = L("Enable");
|
||||||
def->full_label = L("Enable wipe tower");
|
def->full_label = L("Enable wipe tower");
|
||||||
@ -4527,7 +4535,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
for (const char *opt_key : {
|
for (const char *opt_key : {
|
||||||
// floats
|
// floats
|
||||||
"retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed", "retract_restart_extra", "retract_before_travel",
|
"retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed", "retract_restart_extra", "retract_before_travel",
|
||||||
"wipe_extra_perimeter",
|
"wipe_extra_perimeter", "wipe_speed",
|
||||||
// bools
|
// bools
|
||||||
"retract_layer_change", "wipe",
|
"retract_layer_change", "wipe",
|
||||||
// percents
|
// percents
|
||||||
@ -4574,6 +4582,7 @@ void PrintConfigDef::init_extruder_option_keys()
|
|||||||
"retract_before_travel",
|
"retract_before_travel",
|
||||||
"wipe",
|
"wipe",
|
||||||
"wipe_extra_perimeter",
|
"wipe_extra_perimeter",
|
||||||
|
"wipe_speed",
|
||||||
"retract_layer_change",
|
"retract_layer_change",
|
||||||
"retract_length_toolchange",
|
"retract_length_toolchange",
|
||||||
"retract_restart_extra_toolchange",
|
"retract_restart_extra_toolchange",
|
||||||
@ -4593,6 +4602,7 @@ void PrintConfigDef::init_extruder_option_keys()
|
|||||||
"retract_restart_extra",
|
"retract_restart_extra",
|
||||||
"retract_speed",
|
"retract_speed",
|
||||||
"wipe",
|
"wipe",
|
||||||
|
"wipe_speed",
|
||||||
"wipe_extra_perimeter"
|
"wipe_extra_perimeter"
|
||||||
};
|
};
|
||||||
assert(std::is_sorted(m_extruder_retract_keys.begin(), m_extruder_retract_keys.end()));
|
assert(std::is_sorted(m_extruder_retract_keys.begin(), m_extruder_retract_keys.end()));
|
||||||
@ -5670,6 +5680,7 @@ std::unordered_set<std::string> prusa_export_to_remove_keys = {
|
|||||||
"wipe_advanced_nozzle_melted_volume",
|
"wipe_advanced_nozzle_melted_volume",
|
||||||
"wipe_advanced",
|
"wipe_advanced",
|
||||||
"wipe_extra_perimeter",
|
"wipe_extra_perimeter",
|
||||||
|
"wipe_speed",
|
||||||
"wipe_tower_brim",
|
"wipe_tower_brim",
|
||||||
"xy_inner_size_compensation",
|
"xy_inner_size_compensation",
|
||||||
"z_step",
|
"z_step",
|
||||||
|
@ -1143,6 +1143,7 @@ public:
|
|||||||
ConfigOptionFloat wipe_advanced_multiplier;
|
ConfigOptionFloat wipe_advanced_multiplier;
|
||||||
ConfigOptionFloats wipe_extra_perimeter;
|
ConfigOptionFloats wipe_extra_perimeter;
|
||||||
ConfigOptionEnum<WipeAlgo> wipe_advanced_algo;
|
ConfigOptionEnum<WipeAlgo> wipe_advanced_algo;
|
||||||
|
ConfigOptionFloats wipe_speed;
|
||||||
ConfigOptionFloat z_step;
|
ConfigOptionFloat z_step;
|
||||||
ConfigOptionString color_change_gcode;
|
ConfigOptionString color_change_gcode;
|
||||||
ConfigOptionString pause_print_gcode;
|
ConfigOptionString pause_print_gcode;
|
||||||
@ -1258,6 +1259,7 @@ protected:
|
|||||||
OPT_PTR(wipe_advanced_multiplier);
|
OPT_PTR(wipe_advanced_multiplier);
|
||||||
OPT_PTR(wipe_advanced_algo);
|
OPT_PTR(wipe_advanced_algo);
|
||||||
OPT_PTR(wipe_extra_perimeter);
|
OPT_PTR(wipe_extra_perimeter);
|
||||||
|
OPT_PTR(wipe_speed);
|
||||||
OPT_PTR(z_step);
|
OPT_PTR(z_step);
|
||||||
OPT_PTR(color_change_gcode);
|
OPT_PTR(color_change_gcode);
|
||||||
OPT_PTR(pause_print_gcode);
|
OPT_PTR(pause_print_gcode);
|
||||||
|
@ -2263,6 +2263,7 @@ void TabFilament::add_filament_overrides_page()
|
|||||||
"filament_retract_before_travel",
|
"filament_retract_before_travel",
|
||||||
"filament_retract_layer_change",
|
"filament_retract_layer_change",
|
||||||
"filament_wipe",
|
"filament_wipe",
|
||||||
|
"filament_wipe_speed",
|
||||||
"filament_wipe_extra_perimeter",
|
"filament_wipe_extra_perimeter",
|
||||||
"filament_retract_before_wipe"
|
"filament_retract_before_wipe"
|
||||||
})
|
})
|
||||||
@ -2290,6 +2291,7 @@ void TabFilament::update_filament_overrides_page()
|
|||||||
"filament_retract_before_travel",
|
"filament_retract_before_travel",
|
||||||
"filament_retract_layer_change",
|
"filament_retract_layer_change",
|
||||||
"filament_wipe",
|
"filament_wipe",
|
||||||
|
"filament_wipe_speed",
|
||||||
"filament_wipe_extra_perimeter",
|
"filament_wipe_extra_perimeter",
|
||||||
"filament_retract_before_wipe"
|
"filament_retract_before_wipe"
|
||||||
};
|
};
|
||||||
@ -2912,17 +2914,20 @@ void TabPrinter::toggle_options()
|
|||||||
|
|
||||||
// some options only apply when not using firmware retraction
|
// some options only apply when not using firmware retraction
|
||||||
vec.resize(0);
|
vec.resize(0);
|
||||||
vec = { "retract_speed", "deretract_speed", "retract_before_wipe", "retract_restart_extra", "wipe" };
|
vec = { "retract_speed", "deretract_speed", "retract_before_wipe", "retract_restart_extra", "wipe", "wipe_speed" };
|
||||||
for (auto el : vec) {
|
for (auto el : vec) {
|
||||||
field = get_field(el, i);
|
field = get_field(el, i);
|
||||||
if (field)
|
if (field)
|
||||||
field->toggle(retraction && !use_firmware_retraction);
|
field->toggle(retraction && !use_firmware_retraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wipe = m_config->opt_bool("wipe", i);
|
bool wipe = m_config->opt_bool("wipe", i) && have_retract_length;
|
||||||
field = get_field("retract_before_wipe", i);
|
vec = { "retract_before_wipe", "wipe_speed" };
|
||||||
|
for (auto el : vec) {
|
||||||
|
field = get_field(el, i);
|
||||||
if (field)
|
if (field)
|
||||||
field->toggle(wipe);
|
field->toggle(wipe);
|
||||||
|
}
|
||||||
|
|
||||||
if (use_firmware_retraction && wipe) {
|
if (use_firmware_retraction && wipe) {
|
||||||
wxMessageDialog dialog(parent(),
|
wxMessageDialog dialog(parent(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user