diff --git a/js/gcodeGenerating.js b/js/gcodeGenerating.js index d01a4d3..fe7c861 100644 --- a/js/gcodeGenerating.js +++ b/js/gcodeGenerating.js @@ -159,8 +159,11 @@ function generate_gcode() { var isTraveling = !isLoop && i==0; var doRetract = retractionEnabled && prev.distance(to) > retractionminDistance; + +//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 + 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 (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 (!firstPointEver && doRetract) gcode.push("G0 E" + extruder.toFixed(3) + " F" + (retractionspeed * 60).toFixed(3)); // return to normal