mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
parent
562efc1677
commit
8138fbf349
8 changed files with 86 additions and 4 deletions
|
@ -495,7 +495,14 @@ GCodeWriter::unretract()
|
|||
std::string
|
||||
GCodeWriter::lift()
|
||||
{
|
||||
double target_lift = this->config.retract_lift.get_at(0);
|
||||
// check whether the above/below conditions are met
|
||||
double target_lift = 0;
|
||||
{
|
||||
double above = this->config.retract_lift_above.get_at(0);
|
||||
double below = this->config.retract_lift_below.get_at(0);
|
||||
if (this->_pos.z >= above && this->_pos.z <= below && below > 0)
|
||||
target_lift = this->config.retract_lift.get_at(0);
|
||||
}
|
||||
if (this->_lifted == 0 && target_lift > 0) {
|
||||
this->_lifted = target_lift;
|
||||
return this->_travel_to_z(this->_pos.z + target_lift, "lift Z");
|
||||
|
|
|
@ -218,6 +218,8 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||
|| *opt_key == "retract_length"
|
||||
|| *opt_key == "retract_length_toolchange"
|
||||
|| *opt_key == "retract_lift"
|
||||
|| *opt_key == "retract_lift_above"
|
||||
|| *opt_key == "retract_lift_below"
|
||||
|| *opt_key == "retract_restart_extra"
|
||||
|| *opt_key == "retract_restart_extra_toolchange"
|
||||
|| *opt_key == "retract_speed"
|
||||
|
|
|
@ -818,6 +818,30 @@ PrintConfigDef::PrintConfigDef()
|
|||
def->default_value = opt;
|
||||
}
|
||||
|
||||
def = this->add("retract_lift_above", coFloats);
|
||||
def->label = "Above Z";
|
||||
def->full_label = "Only lift Z above";
|
||||
def->tooltip = "If you set this to a positive value, Z lift will only take place above the specified absolute Z. You can tune this setting for skipping lift on the first layers.";
|
||||
def->sidetext = "mm";
|
||||
def->cli = "retract-lift-above=f@";
|
||||
{
|
||||
ConfigOptionFloats* opt = new ConfigOptionFloats();
|
||||
opt->values.push_back(0);
|
||||
def->default_value = opt;
|
||||
}
|
||||
|
||||
def = this->add("retract_lift_below", coFloats);
|
||||
def->label = "Below Z";
|
||||
def->full_label = "Only lift Z below";
|
||||
def->tooltip = "If you set this to a positive value, Z lift will only take place below the specified absolute Z. You can tune this setting for limiting lift to the first layers.";
|
||||
def->sidetext = "mm";
|
||||
def->cli = "retract-lift-below=f@";
|
||||
{
|
||||
ConfigOptionFloats* opt = new ConfigOptionFloats();
|
||||
opt->values.push_back(0);
|
||||
def->default_value = opt;
|
||||
}
|
||||
|
||||
def = this->add("retract_restart_extra", coFloats);
|
||||
def->label = "Extra length on restart";
|
||||
def->tooltip = "When the retraction is compensated after the travel move, the extruder will push this additional amount of filament. This setting is rarely needed.";
|
||||
|
|
|
@ -254,6 +254,8 @@ class GCodeConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionFloats retract_length;
|
||||
ConfigOptionFloats retract_length_toolchange;
|
||||
ConfigOptionFloats retract_lift;
|
||||
ConfigOptionFloats retract_lift_above;
|
||||
ConfigOptionFloats retract_lift_below;
|
||||
ConfigOptionFloats retract_restart_extra;
|
||||
ConfigOptionFloats retract_restart_extra_toolchange;
|
||||
ConfigOptionFloats retract_speed;
|
||||
|
@ -283,6 +285,8 @@ class GCodeConfig : public virtual StaticPrintConfig
|
|||
OPT_PTR(retract_length);
|
||||
OPT_PTR(retract_length_toolchange);
|
||||
OPT_PTR(retract_lift);
|
||||
OPT_PTR(retract_lift_above);
|
||||
OPT_PTR(retract_lift_below);
|
||||
OPT_PTR(retract_restart_extra);
|
||||
OPT_PTR(retract_restart_extra_toolchange);
|
||||
OPT_PTR(retract_speed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue