Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2015-12-18 20:36:39 +0300
committerAlessandro Ranellucci <aar@cpan.org>2015-12-18 20:36:39 +0300
commit8138fbf349a33adf35a61eccd931908d15dbdbf6 (patch)
tree7c7a39c75fc902063c32fd8f7eb63d8e3a4ffe0c /xs/src/libslic3r/GCodeWriter.cpp
parent562efc16771c7870edcd5ceac51081598a14726a (diff)
New --retract-lift-above and --retract-lift-below options. #763 #3057
Diffstat (limited to 'xs/src/libslic3r/GCodeWriter.cpp')
-rw-r--r--xs/src/libslic3r/GCodeWriter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp
index e6bcb8df8..3ec301d70 100644
--- a/xs/src/libslic3r/GCodeWriter.cpp
+++ b/xs/src/libslic3r/GCodeWriter.cpp
@@ -495,7 +495,14 @@ GCodeWriter::unretract()
std::string
GCodeWriter::lift()
{
- double target_lift = this->config.retract_lift.get_at(0);
+ // check whether the above/below conditions are met
+ double target_lift = 0;
+ {
+ double above = this->config.retract_lift_above.get_at(0);
+ double below = this->config.retract_lift_below.get_at(0);
+ if (this->_pos.z >= above && this->_pos.z <= below && below > 0)
+ target_lift = this->config.retract_lift.get_at(0);
+ }
if (this->_lifted == 0 && target_lift > 0) {
this->_lifted = target_lift;
return this->_travel_to_z(this->_pos.z + target_lift, "lift Z");