mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
This commit is contained in:
committed by
bubnikv
parent
9f660738b3
commit
4a84643894
@@ -986,16 +986,16 @@ GCode::travel_to(const Point &point, ExtrusionRole role, std::string comment)
|
||||
|
||||
// use G1 because we rely on paths being straight (G0 may make round paths)
|
||||
Lines lines = travel.lines();
|
||||
double path_length = 0;
|
||||
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
|
||||
const double line_length = line->length() * SCALING_FACTOR;
|
||||
path_length += line_length;
|
||||
|
||||
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line)
|
||||
gcode += this->writer.travel_to_xy(this->point_to_gcode(line->b), comment);
|
||||
}
|
||||
|
||||
|
||||
/* While this makes the estimate more accurate, CoolingBuffer calculates the slowdown
|
||||
factor on the whole elapsed time but only alters non-travel moves, thus the resulting
|
||||
time is still shorter than the configured threshold. We could create a new
|
||||
elapsed_travel_time but we would still need to account for bridges, retractions, wipe etc.
|
||||
if (this->config.cooling)
|
||||
this->elapsed_time += path_length / this->config.get_abs_value("travel_speed");
|
||||
this->elapsed_time += unscale(travel.length()) / this->config.get_abs_value("travel_speed");
|
||||
*/
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user