diff options
Diffstat (limited to 'src/libslic3r/GCode.hpp')
-rw-r--r-- | src/libslic3r/GCode.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index a5bfb881e..8c2bc4242 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -318,7 +318,8 @@ private: Polyline travel_to(std::string& gcode, const Point &point, ExtrusionRole role); void write_travel_to(std::string& gcode, const Polyline& travel, std::string comment); - bool needs_retraction(const Polyline &travel, ExtrusionRole role = erNone); + bool can_cross_perimeter(const Polyline& travel); + bool needs_retraction(const Polyline& travel, ExtrusionRole role = erNone, coordf_t max_min_dist = 0); std::string retract(bool toolchange = false); std::string unretract() { return m_writer.unlift() + m_writer.unretract(); } std::string set_extruder(uint16_t extruder_id, double print_z, bool no_toolchange = false); @@ -349,6 +350,8 @@ private: // Markers for the Pressure Equalizer to recognize the extrusion type. // The Pressure Equalizer removes the markers from the final G-code. bool m_enable_extrusion_role_markers; + // HACK to avoid multiple Z move. + std::string m_delayed_layer_change; // Keeps track of the last extrusion role passed to the processor ExtrusionRole m_last_processor_extrusion_role; // How many times will change_layer() be called? @@ -359,6 +362,11 @@ private: // Current layer processed. Insequential printing mode, only a single copy will be printed. // In non-sequential mode, all its copies will be printed. const Layer* m_layer; + // For crossing perimeter retraction detection (contain the layer & nozzle widdth used to construct it) + // !!!! not thread-safe !!!! if threaded per layer, please store it in the thread. + struct SliceOffsetted { + ExPolygons slices; const Layer* layer; coord_t diameter; + } m_layer_slices_offseted{ {},nullptr, 0}; double m_volumetric_speed; // Support for the extrusion role markers. Which marker is active? ExtrusionRole m_last_extrusion_role; |