ENH: modify the start pos of wall for wipe tower[affects BBL machines only] (#8439)
and modify the overlap of wall and infill for wipe tower jira:none cherry picked from commit bambulab/BambuStudio@4db196b11f Thanks BambuLab! - Optimize the starting position of the printing wiper tower after material change, the initial print on the wipe tower sometimes had under-extrusion issues, and all layers of wipe tower have the same starting position, increasing the risk of collision. This optimization distributes the initial extrusion over four corners, reducing the accumulation of defects. - Reducing the rivet length between the wipe tower's outer wall and infill to 0mm minimizes the risk of collision when switching between printing infill and outer walls. 
This commit is contained in:
commit
41ff66297b
2 changed files with 44 additions and 24 deletions
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
namespace Slic3r
|
namespace Slic3r
|
||||||
{
|
{
|
||||||
|
static const double wipe_tower_wall_infill_overlap = 0.0;
|
||||||
|
|
||||||
inline float align_round(float value, float base)
|
inline float align_round(float value, float base)
|
||||||
{
|
{
|
||||||
|
@ -802,12 +803,30 @@ WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool extrude_per
|
||||||
box_coordinates wt_box(Vec2f(0.f, (m_current_shape == SHAPE_REVERSED) ? m_layer_info->toolchanges_depth() - m_layer_info->depth : 0.f),
|
box_coordinates wt_box(Vec2f(0.f, (m_current_shape == SHAPE_REVERSED) ? m_layer_info->toolchanges_depth() - m_layer_info->depth : 0.f),
|
||||||
m_wipe_tower_width, m_layer_info->depth + m_perimeter_width);
|
m_wipe_tower_width, m_layer_info->depth + m_perimeter_width);
|
||||||
// align the perimeter
|
// align the perimeter
|
||||||
|
|
||||||
|
Vec2f pos = initial_position;
|
||||||
|
switch (m_cur_layer_id % 4){
|
||||||
|
case 0:
|
||||||
|
pos = wt_box.ld;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
pos = wt_box.rd;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
pos = wt_box.ru;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
pos = wt_box.lu;
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
writer.set_initial_position(pos, m_wipe_tower_width, m_wipe_tower_depth, m_internal_rotation);
|
||||||
|
|
||||||
wt_box = align_perimeter(wt_box);
|
wt_box = align_perimeter(wt_box);
|
||||||
writer.rectangle(wt_box);
|
writer.rectangle(wt_box);
|
||||||
writer.travel(initial_position);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first_toolchange_to_nonsoluble) {
|
{
|
||||||
writer.travel(Vec2f(0, 0));
|
writer.travel(Vec2f(0, 0));
|
||||||
writer.travel(initial_position);
|
writer.travel(initial_position);
|
||||||
}
|
}
|
||||||
|
@ -1108,9 +1127,9 @@ void WipeTower::toolchange_Wipe(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_left_to_right)
|
if (m_left_to_right)
|
||||||
writer.extrude(xr + 0.25f * m_perimeter_width, writer.y(), wipe_speed);
|
writer.extrude(xr + wipe_tower_wall_infill_overlap * m_perimeter_width, writer.y(), wipe_speed);
|
||||||
else
|
else
|
||||||
writer.extrude(xl - 0.25f * m_perimeter_width, writer.y(), wipe_speed);
|
writer.extrude(xl - wipe_tower_wall_infill_overlap * m_perimeter_width, writer.y(), wipe_speed);
|
||||||
|
|
||||||
// BBS: recover the flow in non-bridging area
|
// BBS: recover the flow in non-bridging area
|
||||||
if (need_change_flow) {
|
if (need_change_flow) {
|
||||||
|
@ -1600,10 +1619,11 @@ void WipeTower::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &
|
||||||
used = 0.f;
|
used = 0.f;
|
||||||
|
|
||||||
m_old_temperature = -1; // reset last temperature written in the gcode
|
m_old_temperature = -1; // reset last temperature written in the gcode
|
||||||
|
int index = 0;
|
||||||
std::vector<WipeTower::ToolChangeResult> layer_result;
|
std::vector<WipeTower::ToolChangeResult> layer_result;
|
||||||
for (auto layer : m_plan)
|
for (auto layer : m_plan)
|
||||||
{
|
{
|
||||||
|
m_cur_layer_id = index++;
|
||||||
set_layer(layer.z, layer.height, 0, false/*layer.z == m_plan.front().z*/, layer.z == m_plan.back().z);
|
set_layer(layer.z, layer.height, 0, false/*layer.z == m_plan.front().z*/, layer.z == m_plan.back().z);
|
||||||
// BBS
|
// BBS
|
||||||
//m_internal_rotation += 180.f;
|
//m_internal_rotation += 180.f;
|
||||||
|
|
|
@ -304,7 +304,7 @@ private:
|
||||||
float m_travel_speed = 0.f;
|
float m_travel_speed = 0.f;
|
||||||
float m_first_layer_speed = 0.f;
|
float m_first_layer_speed = 0.f;
|
||||||
size_t m_first_layer_idx = size_t(-1);
|
size_t m_first_layer_idx = size_t(-1);
|
||||||
|
size_t m_cur_layer_id;
|
||||||
// G-code generator parameters.
|
// G-code generator parameters.
|
||||||
float m_cooling_tube_retraction = 0.f;
|
float m_cooling_tube_retraction = 0.f;
|
||||||
float m_cooling_tube_length = 0.f;
|
float m_cooling_tube_length = 0.f;
|
||||||
|
|
Loading…
Reference in a new issue