FIX: scale problem in lift type decide

1. Scale the travel threshhold

jira:[NEW]

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Ib594d640fe63b0919bc9318af88577513f7dbf30
This commit is contained in:
xun.zhang 2023-11-15 16:10:14 +08:00 committed by Lane.Wei
parent 9747a1cfa7
commit 0ece8534db
1 changed files with 1 additions and 2 deletions

View File

@ -4697,8 +4697,7 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role, LiftTyp
float max_z_hop = 0.f;
for (int i = 0; i < m_config.z_hop.size(); i++)
max_z_hop = std::max(max_z_hop, (float)m_config.z_hop.get_at(i));
float travel_len_thresh = max_z_hop / tan(GCodeWriter::slope_threshold);
float travel_len_thresh = scale_(max_z_hop / tan(GCodeWriter::slope_threshold));
float accum_len = 0.f;
Polyline clipped_travel;