mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Added parameter extra_loading_move, prevented high feedrate moves during loading
This commit is contained in:
parent
2726267748
commit
a154fd34ee
7 changed files with 34 additions and 9 deletions
|
@ -792,9 +792,17 @@ void WipeTowerPrusaMM::toolchange_Unload(
|
|||
float xdist = std::abs(oldx-turning_point);
|
||||
float edist = -(m_cooling_tube_retraction+m_cooling_tube_length/2.f-42);
|
||||
writer.suppress_preview()
|
||||
.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * 83 ) // fixed speed after ramming
|
||||
.load_move_x(oldx ,edist , 60.f * std::hypot(xdist,edist)/std::abs(edist) * m_filpar[m_current_tool].unloading_speed )
|
||||
.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * m_filpar[m_current_tool].unloading_speed*0.55f )
|
||||
.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * 83 ); // fixed speed after ramming
|
||||
|
||||
// now an ugly hack: unload the filament with a check that the x speed is 50 mm/s
|
||||
const float speed = m_filpar[m_current_tool].unloading_speed;
|
||||
xdist = std::min(xdist, std::abs( 50 * edist / speed ));
|
||||
const float feedrate = std::abs( std::hypot(edist, xdist) / ((edist / speed) / 60.f));
|
||||
writer.load_move_x(writer.x() + (m_left_to_right ? -1.f : 1.f) * xdist ,edist, feedrate );
|
||||
xdist = std::abs(oldx-turning_point); // recover old value of xdist
|
||||
|
||||
|
||||
writer.load_move_x(turning_point,-15 , 60.f * std::hypot(xdist,15)/15 * m_filpar[m_current_tool].unloading_speed*0.55f )
|
||||
.load_move_x(oldx ,-12 , 60.f * std::hypot(xdist,12)/12 * m_filpar[m_current_tool].unloading_speed*0.35f )
|
||||
.resume_preview();
|
||||
|
||||
|
@ -876,11 +884,12 @@ void WipeTowerPrusaMM::toolchange_Load(
|
|||
float loading_speed = m_filpar[m_current_tool].loading_speed; // mm/s in e axis
|
||||
float turning_point = ( oldx-xl < xr-oldx ? xr : xl );
|
||||
float dist = std::abs(oldx-turning_point);
|
||||
float edist = m_parking_pos_retraction-50-2; // loading is 2mm shorter that previous retraction, 50mm reserved for acceleration/deceleration
|
||||
//float edist = m_parking_pos_retraction-50-2; // loading is 2mm shorter that previous retraction, 50mm reserved for acceleration/deceleration
|
||||
float edist = m_parking_pos_retraction-50+m_extra_loading_move; // 50mm reserved for acceleration/deceleration
|
||||
writer.append("; CP TOOLCHANGE LOAD\n")
|
||||
.suppress_preview()
|
||||
.load_move_x(turning_point, 20, 60*std::hypot(dist,20.f)/20.f * loading_speed*0.3f) // Acceleration
|
||||
.load_move_x(oldx,edist,60*std::hypot(dist,edist)/edist * loading_speed) // Fast phase
|
||||
.load_move_x(oldx,edist,std::abs( 60*std::hypot(dist,edist)/edist * loading_speed) ) // Fast phase
|
||||
.load_move_x(turning_point, 20, 60*std::hypot(dist,20.f)/20.f * loading_speed*0.3f) // Slowing down
|
||||
.load_move_x(oldx, 10, 60*std::hypot(dist,10.f)/10.f * loading_speed*0.1f) // Super slow
|
||||
.resume_preview();
|
||||
|
|
|
@ -43,8 +43,8 @@ public:
|
|||
// width -- width of wipe tower in mm ( default 60 mm - leave as it is )
|
||||
// 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<float>& wiping_matrix,
|
||||
unsigned int initial_tool) :
|
||||
float cooling_tube_length, float parking_pos_retraction, float extra_loading_move, float bridging,
|
||||
const std::vector<float>& wiping_matrix, unsigned int initial_tool) :
|
||||
m_wipe_tower_pos(x, y),
|
||||
m_wipe_tower_width(width),
|
||||
m_wipe_tower_rotation_angle(rotation_angle),
|
||||
|
@ -54,6 +54,7 @@ public:
|
|||
m_cooling_tube_retraction(cooling_tube_retraction),
|
||||
m_cooling_tube_length(cooling_tube_length),
|
||||
m_parking_pos_retraction(parking_pos_retraction),
|
||||
m_extra_loading_move(extra_loading_move),
|
||||
m_bridging(bridging),
|
||||
m_current_tool(initial_tool)
|
||||
{
|
||||
|
@ -197,6 +198,7 @@ private:
|
|||
float m_cooling_tube_retraction = 0.f;
|
||||
float m_cooling_tube_length = 0.f;
|
||||
float m_parking_pos_retraction = 0.f;
|
||||
float m_extra_loading_move = 0.f;
|
||||
float m_bridging = 0.f;
|
||||
bool m_adhesion = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue