(linear tapering of extrusion rate for the 1st spiral vase layer)
Linear tapering could only be implemented for relative extruder distances.
For absolute extruder distances, all the G1 Exxx in all spiral vase layers
would have to be adjusted, which is much more complex and risky to do now
before release.
This commit is contained in:
Vojtech Bubnik 2020-12-09 16:52:41 +01:00
parent 11b4b3f4f9
commit 06df87da35

View file

@ -25,11 +25,11 @@ std::string SpiralVase::process_layer(const std::string &gcode)
float total_layer_length = 0;
float layer_height = 0;
float z = 0.f;
bool set_z = false;
{
//FIXME Performance warning: This copies the GCodeConfig of the reader.
GCodeReader r = m_reader; // clone
bool set_z = false;
r.parse_buffer(gcode, [&total_layer_length, &layer_height, &z, &set_z]
(GCodeReader &reader, const GCodeReader::GCodeLine &line) {
if (line.cmd_is("G1")) {
@ -50,7 +50,11 @@ std::string SpiralVase::process_layer(const std::string &gcode)
z -= layer_height;
std::string new_gcode;
bool transition = m_transition_layer;
//FIXME Tapering of the transition layer only works reliably with relative extruder distances.
// For absolute extruder distances it will be switched off.
// Tapering the absolute extruder distances requires to process every extrusion value after the first transition
// layer.
bool transition = m_transition_layer && m_config->use_relative_e_distances.value;
float layer_height_factor = layer_height / total_layer_length;
float len = 0.f;
m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height_factor, transition, &len]