0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-12-22 13:13:48 +01:00

Add settings for bottom layer speed and bottom layer flow rate.

Force travel from wait position to first point.
Disable traveling in bottom layers (providing sort of a poor man's raft).
Fix use of firstLayerSlow setting.
This commit is contained in:
Wouter R 2014-01-10 17:47:05 +01:00
parent 44f6534f9e
commit 295ba222a3
2 changed files with 15 additions and 8 deletions

View File

@ -15,9 +15,11 @@ function generate_gcode() {
gcode = [];
console.log("settings: ",settings);
var speed = settings["printer.speed"]
var speed = settings["printer.speed"];
var normalSpeed = speed;
var bottomSpeed = speed*0.5;
var bottomSpeed = settings["printer.bottomLayerSpeed"];
var firstLayerSlow = settings["printer.firstLayerSlow"];
var bottomFlowRate = settings["printer.bottomFlowRate"];
var travelSpeed = settings["printer.travelSpeed"]
var filamentThickness = settings["printer.filamentThickness"];
var wallThickness = settings["printer.wallThickness"];
@ -157,12 +159,14 @@ function generate_gcode() {
var isTraveling = !isLoop && i==0;
var doRetract = retractionEnabled && prev.distance(to) > retractionminDistance;
if (enableTraveling && isTraveling) {
if (doRetract) gcode.push("G0 E" + (extruder - retractionamount).toFixed(3) + " F" + (retractionspeed * 60).toFixed(3)); //retract
var firstPointEver = (layer == 0 && i == 0 && j == 0);
if (firstPointEver || layer > 2 && enableTraveling && isTraveling) { //always travel to first point, then disable traveling for first two layers and use settings for remainder of print
if (!firstPointEver && doRetract) gcode.push("G0 E" + (extruder - retractionamount).toFixed(3) + " F" + (retractionspeed * 60).toFixed(3)); //retract
gcode.push("G0 X" + to.x.toFixed(3) + " Y" + to.y.toFixed(3) + " Z" + z.toFixed(3) + " F" + (travelSpeed * 60).toFixed(3));
if (doRetract) gcode.push("G0 E" + extruder.toFixed(3) + " F" + (retractionspeed * 60).toFixed(3)); // return to normal
if (!firstPointEver && doRetract) gcode.push("G0 E" + extruder.toFixed(3) + " F" + (retractionspeed * 60).toFixed(3)); // return to normal
} else {
extruder += prev.distance(to) * wallThickness * layerHeight / (Math.pow((filamentThickness/2), 2) * Math.PI);
var f = (layer < 2) ? bottomFlowRate : 1;
extruder += prev.distance(to) * wallThickness * layerHeight / (Math.pow((filamentThickness/2), 2) * Math.PI) * f;
gcode.push("G1 X" + to.x.toFixed(3) + " Y" + to.y.toFixed(3) + " Z" + z.toFixed(3) + " F" + (speed * 60).toFixed(3) + " E" + extruder.toFixed(3));
}

View File

@ -96,10 +96,13 @@
<label for="bedTemperature">Bed temperature:</label><input id="bedTemperature" type="number" class="small" name="printer.bed.temperature">degrees C<br>
<br>
<label for="speed">Speed:</label><input id="speed" type="number" name="printer.speed" class="small">mm/s<br>
<label for="bottomLayerSpeed">Bottom layer speed:</label><input id="bottomLayerSpeed" type="number" name="printer.bottomLayerSpeed" class="small">mm/s<br>
<label for="travelSpeed">Travel speed:</label><input id="travelSpeed" type="number" name="printer.travelSpeed" class="small">mm/s<br>
<label for="enableTraveling">Enable traveling:</label><input id="enableTraveling" type="checkbox" name="printer.enableTraveling" value="enableTraveling"><br>
<label for="firstLayerSlow">First layer slow:</label><input id="firstLayerSlow" type="checkbox" name="printer.firstLayerSlow" value="firstLayerSlow"><br>
<label for="useSubLayers">Use sub-layers*:</label><input id="useSubLayers" type="checkbox" name="printer.useSubLayers" value="firstLayerSlow"><br>
<label for="firstLayerSlow">Bottom layers slow:</label><input id="firstLayerSlow" type="checkbox" name="printer.firstLayerSlow" value="firstLayerSlow"><br>
<label for="bottomFlowRate">Bottom layers flow rate*:</label><input id="bottomFlowRate" type="number" name="printer.bottomFlowRate" class="small"><br>
<small>* Multiplier for extrusion rate in first few layers</small>
<label for="useSubLayers">Use sub-layers*:</label><input id="useSubLayers" type="checkbox" name="printer.useSubLayers" value="useSubLayers"><br>
<small>* Continuously move platform while printing instead of once per layer</small>
<br>
<label for="useRetraction">Use retraction:</label><input id="useRetraction" type="checkbox" name="printer.retraction.enabled" value="useRetraction"><br>