mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 10:41:15 -06:00
Pimping up SpiralVase code, fix of 03b6048684
This commit is contained in:
parent
03b6048684
commit
dc4b783e9e
3 changed files with 7 additions and 7 deletions
|
|
@ -54,7 +54,7 @@ std::string SpiralVase::process_layer(const std::string &gcode)
|
|||
// 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;
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ namespace Slic3r {
|
|||
|
||||
class SpiralVase {
|
||||
public:
|
||||
SpiralVase(const PrintConfig &config) : m_config(&config)
|
||||
SpiralVase(const PrintConfig &config) : m_config(config)
|
||||
{
|
||||
m_reader.z() = (float)m_config->z_offset;
|
||||
m_reader.apply_config(*m_config);
|
||||
m_reader.z() = (float)m_config.z_offset;
|
||||
m_reader.apply_config(m_config);
|
||||
};
|
||||
|
||||
void enable(bool en) {
|
||||
|
|
@ -22,7 +22,7 @@ public:
|
|||
std::string process_layer(const std::string &gcode);
|
||||
|
||||
private:
|
||||
const PrintConfig *m_config;
|
||||
const PrintConfig &m_config;
|
||||
GCodeReader m_reader;
|
||||
|
||||
bool m_enabled = false;
|
||||
|
|
@ -32,4 +32,4 @@ private:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // slic3r_SpiralVase_hpp_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue