mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 02:37:04 +00:00
FIX: use wrong retraction params in tool change
1. Set shared retract length size to 2. Filaments in one extruder shares the param 2. Move toolchange function before unretract function in append_tcr to get the correct logic jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I215a542ce36107071fad39f1f9e30234fb19a3a0 (cherry picked from commit c4ef6e9e0950c58a8c5f612662145c6a256884ad)
This commit is contained in:
@@ -17,8 +17,8 @@ public:
|
||||
void reset() {
|
||||
// BBS
|
||||
if (m_share_extruder) {
|
||||
m_share_E = 0.;
|
||||
m_share_retracted = 0.;
|
||||
m_share_E = { 0.,0.};
|
||||
m_share_retracted = { 0.,0. };
|
||||
} else {
|
||||
m_E = 0;
|
||||
m_retracted = 0;
|
||||
@@ -33,8 +33,8 @@ public:
|
||||
double extrude(double dE);
|
||||
double retract(double length, double restart_extra);
|
||||
double unretract();
|
||||
double E() const { return m_share_extruder ? m_share_E : m_E; }
|
||||
void reset_E() { m_E = 0.; m_share_E = 0.; }
|
||||
double E() const { return m_share_extruder ? m_share_E[extruder_id()] : m_E; }
|
||||
void reset_E() { m_E = 0.; m_share_E[extruder_id()] = 0.; }
|
||||
// e_per_mm is extrusion_per_mm = geometric volume * (filament flow ratio / cross-sectional area) [Doesn't account for print_flow_ratio, or modifiers like bridge flow ratio etc.]
|
||||
double e_per_mm(double mm3_per_mm) const { return mm3_per_mm * m_e_per_mm3; }
|
||||
// e_per_mm3 is extrusion_per_mm3 = filament flow ratio / cross-sectional area [Doesn't account for print_flow_ratio, or modifiers like bridge flow ratio etc.]
|
||||
@@ -95,8 +95,8 @@ private:
|
||||
// BBS.
|
||||
// Create shared E and retraction data for single extruder multi-material machine
|
||||
bool m_share_extruder;
|
||||
static double m_share_E;
|
||||
static double m_share_retracted;
|
||||
static std::vector<double> m_share_E;
|
||||
static std::vector<double> m_share_retracted;
|
||||
};
|
||||
|
||||
// Sort Extruder objects by the extruder id by default.
|
||||
|
||||
Reference in New Issue
Block a user