FIX: change some set of scarf seam
only check slope overhang on conditional mode add not apply speed slow down for gloss of print result Jira: none Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I22f7ea7785aeed5833f28103d51f36be84fc7c56
This commit is contained in:
parent
3658c97a94
commit
3adc997193
|
@ -4056,6 +4056,7 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
const int slope_steps = m_config.seam_slope_steps;
|
const int slope_steps = m_config.seam_slope_steps;
|
||||||
const double slope_max_segment_length = scale_(slope_min_length / slope_steps);
|
const double slope_max_segment_length = scale_(slope_min_length / slope_steps);
|
||||||
// BBS: check if has overhang on slope path
|
// BBS: check if has overhang on slope path
|
||||||
|
if (m_config.seam_slope_conditional.value)
|
||||||
slope_has_overhang = has_overhang_path_on_slope(loop.paths, slope_min_length);
|
slope_has_overhang = has_overhang_path_on_slope(loop.paths, slope_min_length);
|
||||||
if (!slope_has_overhang) {
|
if (!slope_has_overhang) {
|
||||||
// Calculate the sloped loop
|
// Calculate the sloped loop
|
||||||
|
@ -4064,9 +4065,9 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
|
|
||||||
//BBS: clip end and start to get better seam
|
//BBS: clip end and start to get better seam
|
||||||
new_loop.clip_slope(seam_gap);
|
new_loop.clip_slope(seam_gap);
|
||||||
// BBS: slowdown speed to improve seam
|
// BBS: slowdown speed to improve seam, to be fix, cooling need to be apply correctly
|
||||||
new_loop.target_speed = get_path_speed(new_loop.starts.back());
|
//new_loop.target_speed = get_path_speed(new_loop.starts.back());
|
||||||
new_loop.slowdown_slope_speed();
|
//new_loop.slowdown_slope_speed();
|
||||||
// Then extrude it
|
// Then extrude it
|
||||||
for (const auto &p : new_loop.get_all_paths()) {
|
for (const auto &p : new_loop.get_all_paths()) {
|
||||||
gcode += this->_extrude(*p, description, speed_for_path(*p));
|
gcode += this->_extrude(*p, description, speed_for_path(*p));
|
||||||
|
@ -4637,7 +4638,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
}
|
}
|
||||||
|
|
||||||
// F is mm per minute.
|
// F is mm per minute.
|
||||||
if (sloped == nullptr)
|
//if (sloped == nullptr)
|
||||||
gcode += m_writer.set_speed(F, "", comment);
|
gcode += m_writer.set_speed(F, "", comment);
|
||||||
|
|
||||||
double path_length = 0.;
|
double path_length = 0.;
|
||||||
|
@ -4664,7 +4665,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
// Sloped extrusion
|
// Sloped extrusion
|
||||||
auto dE = e_per_mm * line_length;
|
auto dE = e_per_mm * line_length;
|
||||||
auto [z_ratio, e_ratio, slope_speed] = sloped->interpolate(path_length / total_length);
|
auto [z_ratio, e_ratio, slope_speed] = sloped->interpolate(path_length / total_length);
|
||||||
gcode += m_writer.set_speed(slope_speed * 60, "", comment);
|
//FIX: cooling need to apply correctly
|
||||||
|
//gcode += m_writer.set_speed(slope_speed * 60, "", comment);
|
||||||
Vec2d dest2d = this->point_to_gcode(line.b);
|
Vec2d dest2d = this->point_to_gcode(line.b);
|
||||||
Vec3d dest3d(dest2d(0), dest2d(1), get_sloped_z(z_ratio));
|
Vec3d dest3d(dest2d(0), dest2d(1), get_sloped_z(z_ratio));
|
||||||
//BBS: todo, should use small e at start to get good seam
|
//BBS: todo, should use small e at start to get good seam
|
||||||
|
|
|
@ -2823,7 +2823,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->enum_labels.push_back(L("Contour"));
|
def->enum_labels.push_back(L("Contour"));
|
||||||
def->enum_labels.push_back(L("Contour and hole"));
|
def->enum_labels.push_back(L("Contour and hole"));
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionEnum<SeamScarfType>(SeamScarfType::All));
|
def->set_default_value(new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
|
||||||
|
|
||||||
def = this->add("seam_slope_conditional", coBool);
|
def = this->add("seam_slope_conditional", coBool);
|
||||||
def->label = L("Conditional scarf joint");
|
def->label = L("Conditional scarf joint");
|
||||||
|
|
Loading…
Reference in New Issue