Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/CuraEngine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-02-06 12:33:07 +0300
committerGhostkeeper <rubend@tutanota.com>2018-02-06 12:33:07 +0300
commit7abc629e2bf25255ac7b7c5141ee65570766932f (patch)
tree14b663296796b3f23920fe74c6f5a21ea38a96ad
parent12d3bad97b3b03966ce0039a2cfd25545d5de85e (diff)
Also reset E using G92 on BFB and Makerbot flavours3.2.13.2
The original commit says that it's not supported well. However, the RepRapWiki says it's supported nowadays. Maybe the earlier firmware had some trouble there. I'm still not resetting the E value after E10,000 though, just to be sure. It's only resetting the E value in an extruder switch, which was causing a crash because it assumed (and asserted) that the E value was 0 after an extruder switch. Contributes to issue CURA-4918.
-rw-r--r--src/gcodeExport.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/gcodeExport.cpp b/src/gcodeExport.cpp
index c889df049..449fd6835 100644
--- a/src/gcodeExport.cpp
+++ b/src/gcodeExport.cpp
@@ -495,21 +495,18 @@ void GCodeExport::writeExtrusionMode(bool set_relative_extrusion_mode)
void GCodeExport::resetExtrusionValue()
{
- if (flavor != EGCodeFlavor::MAKERBOT && flavor != EGCodeFlavor::BFB)
+ if (!relative_extrusion)
{
- if (!relative_extrusion)
- {
- *output_stream << "G92 " << extruder_attr[current_extruder].extruderCharacter << "0" << new_line;
- }
- double current_extruded_volume = getCurrentExtrudedVolume();
- extruder_attr[current_extruder].totalFilament += current_extruded_volume;
- for (double& extruded_volume_at_retraction : extruder_attr[current_extruder].extruded_volume_at_previous_n_retractions)
- { // update the extruded_volume_at_previous_n_retractions only of the current extruder, since other extruders don't extrude the current volume
- extruded_volume_at_retraction -= current_extruded_volume;
- }
- current_e_value = 0.0;
- extruder_attr[current_extruder].retraction_e_amount_at_e_start = extruder_attr[current_extruder].retraction_e_amount_current;
+ *output_stream << "G92 " << extruder_attr[current_extruder].extruderCharacter << "0" << new_line;
+ }
+ double current_extruded_volume = getCurrentExtrudedVolume();
+ extruder_attr[current_extruder].totalFilament += current_extruded_volume;
+ for (double& extruded_volume_at_retraction : extruder_attr[current_extruder].extruded_volume_at_previous_n_retractions)
+ { // update the extruded_volume_at_previous_n_retractions only of the current extruder, since other extruders don't extrude the current volume
+ extruded_volume_at_retraction -= current_extruded_volume;
}
+ current_e_value = 0.0;
+ extruder_attr[current_extruder].retraction_e_amount_at_e_start = extruder_attr[current_extruder].retraction_e_amount_current;
}
void GCodeExport::writeDelay(double timeAmount)
@@ -748,7 +745,7 @@ void GCodeExport::writeUnretractionAndPrime()
currentSpeed = extruder_attr[current_extruder].last_retraction_prime_speed;
estimateCalculator.plan(TimeEstimateCalculator::Position(INT2MM(currentPosition.x), INT2MM(currentPosition.y), INT2MM(currentPosition.z), eToMm(current_e_value)), currentSpeed, PrintFeatureType::MoveRetraction);
}
- if (getCurrentExtrudedVolume() > 10000.0) //According to https://github.com/Ultimaker/CuraEngine/issues/14 having more then 21m of extrusion causes inaccuracies. So reset it every 10m, just to be sure.
+ if (getCurrentExtrudedVolume() > 10000.0 && flavor != EGCodeFlavor::BFB && flavor != EGCodeFlavor::MAKERBOT) //According to https://github.com/Ultimaker/CuraEngine/issues/14 having more then 21m of extrusion causes inaccuracies. So reset it every 10m, just to be sure.
{
resetExtrusionValue();
}
@@ -909,7 +906,7 @@ void GCodeExport::startExtruder(int new_extruder)
CommandSocket::setExtruderForSend(new_extruder);
CommandSocket::setSendCurrentPosition( getPositionXY() );
- //Change the Z position so it gets re-writting again. We do not know if the switch code modified the Z position.
+ //Change the Z position so it gets re-written again. We do not know if the switch code modified the Z position.
currentPosition.z += 1;
}