mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-30 01:54:40 +08:00
Fix of 298b730589371d39fe4a85851a9c72f87fc22d8e
(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:
parent
11b4b3f4f9
commit
06df87da35
@ -25,11 +25,11 @@ std::string SpiralVase::process_layer(const std::string &gcode)
|
|||||||
float total_layer_length = 0;
|
float total_layer_length = 0;
|
||||||
float layer_height = 0;
|
float layer_height = 0;
|
||||||
float z = 0.f;
|
float z = 0.f;
|
||||||
bool set_z = false;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
//FIXME Performance warning: This copies the GCodeConfig of the reader.
|
//FIXME Performance warning: This copies the GCodeConfig of the reader.
|
||||||
GCodeReader r = m_reader; // clone
|
GCodeReader r = m_reader; // clone
|
||||||
|
bool set_z = false;
|
||||||
r.parse_buffer(gcode, [&total_layer_length, &layer_height, &z, &set_z]
|
r.parse_buffer(gcode, [&total_layer_length, &layer_height, &z, &set_z]
|
||||||
(GCodeReader &reader, const GCodeReader::GCodeLine &line) {
|
(GCodeReader &reader, const GCodeReader::GCodeLine &line) {
|
||||||
if (line.cmd_is("G1")) {
|
if (line.cmd_is("G1")) {
|
||||||
@ -50,7 +50,11 @@ std::string SpiralVase::process_layer(const std::string &gcode)
|
|||||||
z -= layer_height;
|
z -= layer_height;
|
||||||
|
|
||||||
std::string new_gcode;
|
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 layer_height_factor = layer_height / total_layer_length;
|
||||||
float len = 0.f;
|
float len = 0.f;
|
||||||
m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height_factor, transition, &len]
|
m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height_factor, transition, &len]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user