ENH: wipe_distance should not to be 0 or negative value
As title, fix github issue #220 Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: If63c839da1341ac2e16bbfa287c4e32564284d59
This commit is contained in:
parent
e6f0c5abec
commit
4e1caa428d
|
@ -3836,8 +3836,8 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction)
|
||||||
if (m_writer.extruder() == nullptr)
|
if (m_writer.extruder() == nullptr)
|
||||||
return gcode;
|
return gcode;
|
||||||
|
|
||||||
// wipe (if it's enabled for this extruder and we have a stored wipe path)
|
// wipe (if it's enabled for this extruder and we have a stored wipe path and no-zero wipe distance)
|
||||||
if (EXTRUDER_CONFIG(wipe) && m_wipe.has_path()) {
|
if (EXTRUDER_CONFIG(wipe) && m_wipe.has_path() && scale_(EXTRUDER_CONFIG(wipe_distance)) > SCALED_EPSILON) {
|
||||||
gcode += toolchange ? m_writer.retract_for_toolchange(true) : m_writer.retract(true);
|
gcode += toolchange ? m_writer.retract_for_toolchange(true) : m_writer.retract(true);
|
||||||
gcode += m_wipe.wipe(*this, toolchange, is_last_retraction);
|
gcode += m_wipe.wipe(*this, toolchange, is_last_retraction);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2497,6 +2497,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->label = L("Wipe Distance");
|
def->label = L("Wipe Distance");
|
||||||
def->tooltip = L("Discribe how long the nozzle will move along the last path when retracting");
|
def->tooltip = L("Discribe how long the nozzle will move along the last path when retracting");
|
||||||
def->sidetext = L("mm");
|
def->sidetext = L("mm");
|
||||||
|
def->min = 0;
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionFloats { 2. });
|
def->set_default_value(new ConfigOptionFloats { 2. });
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,6 @@ static constexpr bool RELATIVE_E_AXIS = 1;
|
||||||
static constexpr bool g_config_support_sharp_tails = true;
|
static constexpr bool g_config_support_sharp_tails = true;
|
||||||
static constexpr bool g_config_remove_small_overhangs = true;
|
static constexpr bool g_config_remove_small_overhangs = true;
|
||||||
static constexpr float g_config_tree_support_collision_resolution = 0.2;
|
static constexpr float g_config_tree_support_collision_resolution = 0.2;
|
||||||
static constexpr float g_config_slice_closing_radius = 0.049;
|
|
||||||
|
|
||||||
// Write slices as SVG images into out directory during the 2D processing of the slices.
|
// Write slices as SVG images into out directory during the 2D processing of the slices.
|
||||||
// #define SLIC3R_DEBUG_SLICE_PROCESSING
|
// #define SLIC3R_DEBUG_SLICE_PROCESSING
|
||||||
|
|
|
@ -3395,9 +3395,10 @@ void TabPrinter::toggle_options()
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString extruder_number;
|
wxString extruder_number;
|
||||||
long val;
|
long val = 1;
|
||||||
if (m_active_page->title().StartsWith("Extruder ", &extruder_number) && extruder_number.ToLong(&val) &&
|
if ( m_active_page->title().IsSameAs("Extruder") ||
|
||||||
val > 0 && (size_t)val <= m_extruders_count)
|
(m_active_page->title().StartsWith("Extruder ", &extruder_number) && extruder_number.ToLong(&val) &&
|
||||||
|
val > 0 && (size_t)val <= m_extruders_count))
|
||||||
{
|
{
|
||||||
size_t i = size_t(val - 1);
|
size_t i = size_t(val - 1);
|
||||||
bool have_retract_length = m_config->opt_float("retraction_length", i) > 0;
|
bool have_retract_length = m_config->opt_float("retraction_length", i) > 0;
|
||||||
|
@ -3423,10 +3424,10 @@ void TabPrinter::toggle_options()
|
||||||
//BBS
|
//BBS
|
||||||
toggle_option(el, retraction, i);
|
toggle_option(el, retraction, i);
|
||||||
|
|
||||||
bool wipe = m_config->opt_bool("wipe", i);
|
bool wipe = retraction && m_config->opt_bool("wipe", i);
|
||||||
toggle_option("retract_before_wipe", wipe, i);
|
toggle_option("retract_before_wipe", wipe, i);
|
||||||
// BBS
|
// BBS
|
||||||
toggle_option("wipe_distance", i);
|
toggle_option("wipe_distance", wipe, i);
|
||||||
|
|
||||||
toggle_option("retract_length_toolchange", have_multiple_extruders, i);
|
toggle_option("retract_length_toolchange", have_multiple_extruders, i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue