diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index fbde83754..c16aaae0c 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -646,7 +646,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::toolchange_Brim(bool sideOnly, flo m_wipe_tower_width, m_wipe_tower_depth); - PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); + //use first layer width parameter + + PrusaMultiMaterial::Writer writer(m_layer_height, m_brim_width); writer.set_extrusion_flow(m_extrusion_flow * 1.1f) .set_z(m_z_pos) // Let the writer know the current Z position as a base for Z-hop. .set_initial_tool(m_current_tool) @@ -654,21 +656,21 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::toolchange_Brim(bool sideOnly, flo .append(";-------------------------------------\n" "; CP WIPE TOWER FIRST LAYER BRIM START\n"); - xy initial_position = wipeTower_box.lu - xy(m_perimeter_width * 6.f, 0); + xy initial_position = wipeTower_box.lu - xy(m_brim_width * 6.f, 0); writer.set_initial_position(initial_position); - writer.extrude_explicit(wipeTower_box.ld - xy(m_perimeter_width * 6.f, 0), // Prime the extruder left of the wipe tower. + writer.extrude_explicit(wipeTower_box.ld - xy(m_brim_width * 6.f, 0), // Prime the extruder left of the wipe tower. 1.5f * m_extrusion_flow * (wipeTower_box.lu.y - wipeTower_box.ld.y), 2400); // The tool is supposed to be active and primed at the time when the wipe tower brim is extruded. // Extrude 4 rounds of a brim around the future wipe tower. box_coordinates box(wipeTower_box); - box.expand(m_perimeter_width); + box.expand(m_brim_width); for (size_t i = 0; i < 4; ++ i) { writer.travel (box.ld, 7000) .extrude(box.lu, 2100).extrude(box.ru) .extrude(box.rd ).extrude(box.ld); - box.expand(m_perimeter_width); + box.expand(m_brim_width); } writer.travel(wipeTower_box.ld, 7000); // Move to the front left corner. diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index b7c721128..39eb2c968 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -44,7 +44,7 @@ public: // wipe_area -- space available for one toolchange in mm WipeTowerPrusaMM(float x, float y, float width, float rotation_angle, float cooling_tube_retraction, float cooling_tube_length, float parking_pos_retraction, float bridging, const std::vector& wiping_matrix, - unsigned int initial_tool) : + unsigned int initial_tool, float first_layer_width) : m_wipe_tower_pos(x, y), m_wipe_tower_width(width), m_wipe_tower_rotation_angle(rotation_angle), @@ -55,7 +55,8 @@ public: m_cooling_tube_length(cooling_tube_length), m_parking_pos_retraction(parking_pos_retraction), m_bridging(bridging), - m_current_tool(initial_tool) + m_current_tool(initial_tool), + m_brim_width(first_layer_width) { unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+WT_EPSILON); for (unsigned int i = 0; iconfig.wipe_tower_width.value), float(this->config.wipe_tower_rotation_angle.value), float(this->config.cooling_tube_retraction.value), float(this->config.cooling_tube_length.value), float(this->config.parking_pos_retraction.value), - float(this->config.wipe_tower_bridging), wiping_volumes, m_tool_ordering.first_extruder()); + float(this->config.wipe_tower_bridging), wiping_volumes, m_tool_ordering.first_extruder(), + float(this->config.first_layer_extrusion_width)); //wipe_tower.set_retract(); //wipe_tower.set_zhop();