mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-14 06:11:46 +08:00
Remove tabs and clean up code from 4c622c504f8f7c479a8368f7672ec96426391554
This commit is contained in:
parent
96bf7b9d27
commit
3daf64ae56
@ -632,16 +632,11 @@ 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)
|
// use G1 because we rely on paths being straight (G0 may make round paths)
|
||||||
Lines lines = travel.lines();
|
Lines lines = travel.lines();
|
||||||
double path_length = 0;
|
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line)
|
||||||
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
|
gcode += this->writer.travel_to_xy(this->point_to_gcode(line->b), comment);
|
||||||
const double line_length = line->length() * SCALING_FACTOR;
|
|
||||||
path_length += line_length;
|
|
||||||
|
|
||||||
gcode += this->writer.travel_to_xy(this->point_to_gcode(line->b), comment);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->config.cooling)
|
if (this->config.cooling)
|
||||||
this->elapsed_time += path_length / this->config.get_abs_value("travel_speed");
|
this->elapsed_time += travel.length() / this->config.get_abs_value("travel_speed");
|
||||||
|
|
||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user