mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-03 04:35:13 +08:00
Fix wipe tower initial movement when switching extruder offsets (#9222)
Fix wipe tower initial movement when switching extruder offsets (SoftFever/OrcaSlicer#9214)
This commit is contained in:
parent
443034553b
commit
97ec03692c
@ -835,7 +835,8 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||||||
std::string gcode_out;
|
std::string gcode_out;
|
||||||
std::string line;
|
std::string line;
|
||||||
Vec2f pos = tcr.start_pos;
|
Vec2f pos = tcr.start_pos;
|
||||||
Vec2f transformed_pos = pos;
|
auto trans_pos = [wt_rot = Eigen::Rotation2Df(angle), &translation](const Vec2f& p) -> Vec2f { return wt_rot * p + translation; };
|
||||||
|
Vec2f transformed_pos = trans_pos(pos);
|
||||||
Vec2f old_pos(-1000.1f, -1000.1f);
|
Vec2f old_pos(-1000.1f, -1000.1f);
|
||||||
|
|
||||||
while (gcode_str) {
|
while (gcode_str) {
|
||||||
@ -863,7 +864,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||||||
line_out << ch;
|
line_out << ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
transformed_pos = Eigen::Rotation2Df(angle) * pos + translation;
|
transformed_pos = trans_pos(pos);
|
||||||
|
|
||||||
if (transformed_pos != old_pos || never_skip) {
|
if (transformed_pos != old_pos || never_skip) {
|
||||||
line = line_out.str();
|
line = line_out.str();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user