mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
force restore Z
This commit is contained in:
parent
447cc01405
commit
13ddb38119
2 changed files with 8 additions and 3 deletions
|
@ -762,8 +762,13 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
if (is_ramming)
|
if (is_ramming)
|
||||||
gcodegen.m_wipe.reset_path(); // We don't want wiping on the ramming lines.
|
gcodegen.m_wipe.reset_path(); // We don't want wiping on the ramming lines.
|
||||||
toolchange_gcode_str = gcodegen.set_extruder(new_extruder_id, tcr.print_z); // TODO: toolchange_z vs print_z
|
toolchange_gcode_str = gcodegen.set_extruder(new_extruder_id, tcr.print_z); // TODO: toolchange_z vs print_z
|
||||||
if (gcodegen.config().enable_prime_tower)
|
if (gcodegen.config().enable_prime_tower) {
|
||||||
deretraction_str = gcodegen.unretract();
|
deretraction_str += gcodegen.writer().travel_to_z(z, "restore layer Z");
|
||||||
|
Vec3d position{gcodegen.writer().get_position()};
|
||||||
|
position.z() = z;
|
||||||
|
gcodegen.writer().set_position(position);
|
||||||
|
deretraction_str += gcodegen.unretract();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert the toolchange and deretraction gcode into the generated gcode.
|
// Insert the toolchange and deretraction gcode into the generated gcode.
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
std::string lift(LiftType lift_type = LiftType::NormalLift, bool spiral_vase = false);
|
std::string lift(LiftType lift_type = LiftType::NormalLift, bool spiral_vase = false);
|
||||||
std::string unlift();
|
std::string unlift();
|
||||||
Vec3d get_position() const { return m_pos; }
|
Vec3d get_position() const { return m_pos; }
|
||||||
void set_position(const Vec3d& in) { m_pos = in; }
|
void set_position(const Vec3d& in) { m_pos = in; }
|
||||||
double get_zhop() const { return m_lifted; }
|
double get_zhop() const { return m_lifted; }
|
||||||
|
|
||||||
//BBS: set offset for gcode writer
|
//BBS: set offset for gcode writer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue