You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>To provide a compromise between no Z hop, which reduces stringing but has a higher chance of the nozzle knocking the model loose, and Z hop, which does the opposite.</p>
13
+
<h5>When required:</h5>
14
+
<p>This is currently experimental, and may not be needed in many cases. If you have a print that keeps disloging from nozzle contact, this may be worth a try.</p>
15
+
<h5>Tools:</h5>
16
+
<p>Your own sliced gcode and the post processor on on this page.</p>
17
+
<buttonclass="zoom" onclick="$('html, body').animate({scrollTop: ($('#zh').offset().top-200)},500);">Scroll to post processor</button>
18
+
</div>
19
+
<p>This page allows you to paste in your existing sliced gcode and have it convert it to diagonal Z hop. It is a simple conversion and has been tested thoroughly, but still use it with caution.</p>
20
+
<p>This concept is covered in detail in the following video:</p>
<p>This is the result of a 'what if' thought when printing a tricky model. It may turn out to be useful, useless, or perhaps need alteration to be more effective. The post processing script on this page has limitations that actual slicing software does not. Proper implementation in a slicer might be more effective. Please try it out and post your feedback in the comments of the video above.</p>
24
+
<p>If this concept does have merit, I am very happy for it to be implemented into any and every slicer that wants it. If the process helps people, I gladly release it to the public domain.</p>
25
+
<h2>Traditional retraction, travel and Z hop</h2>
26
+
<p>Retraction is when filament is pulled away from the hot end to reduce pressure. This will usually be done before a travel move. A travel move is a movement made by the printer where no filament is extruded. At the end of the travel move, the extruder will usually unretract to get nozzle pressure back to normal, and then continue printing. Without retraction, prints tend to suffer from stringing, where filament leaks during travel moves and creates fine strings of filament connecting surfaces that should be isolated:</p>
<p>Z hop is an option your slicer can employ either side of a travel move. After retraction, the nozzle will lift up vertically, followed by the travel move, then move vertically downwards to return to the correct height, before unretracting and resuming printing.</p>
30
+
<p>Z hop gives the nozzle additional clearance over the model, which can prevent the nozzle from crashing into the model and knocking it loose. This can ensure success on a tricky model where parts with steep overhangs may curl up on the tip into the path of the nozzle. However, Z hop is compromised because it generally introduces fine stringing. It improves reliability at the expense of print quality.</p>
31
+
<h2>Aim of diagonal Z hop</h2>
32
+
<p>Rather than have Z hop be a three part movement (up, travel horizontally then down), diagonal Z hop breaks a travel move into two sections.</p>
33
+
<ul>
34
+
<li>In the traditional version, the first move is half way horizontally while also travelling vertically up, and the second completes the horizontal travel move whilst coming vertically back down to printing height.</li>
35
+
<li>In the alternate version, the first move travels diagonally up to above the next extrusion point, before dropping vertically downwards.</li>
36
+
</ul>
37
+
<p>It is hoped that the sequence is faster than standard Z hop, reduces stringing, whilst still offering additional clearance over delicate models to prevent collisions.</p>
38
+
<p>The following diagrams best illustrate the movment path for each of these options:</p>
<p>The following form will convert your existing gcode to have diagonal Z hop. Slice a model of your choice in your own slicer with the following considerations:</p>
44
+
<ul>
45
+
<li>Traditional retraction as opposed to firmware retraction.</li>
46
+
<li>Z hop should be turned OFF. Slice with a normal travel move only.</li>
47
+
<li>Absolute movements <i>G90</i> vs relative movements <i>G91</i>. This is the default for most slicers.</li>
48
+
</ul>
49
+
<p>Firmware and slicer flavour should not matter. As long as the slicer outputs <i>G0</i>/<i>G1</i> commands for movements, this post processor should work.</p>
50
+
<p>Please consider that like using standard Z hop, your Z axis will be a lot more active during printing. If you already experience any problems with binding, any form of Z hop will make it worse.</p>
51
+
<h4>Existing gcode</h4>
52
+
<p>You may attach a file and have this page automatically extract its contents to the input box, or paste the gcode into the input box yourself.</p>
<p>Every attempt has been made to ensure this is safe but ultimately there always is risk in running modified gcode from the internet. Preview the gcode in your slicer or <ahref="http://zupfe.velor.ca" target="_blank">Zupfe GCode Viewer</a> and <spanstyle="color:red; font-weight: bolder;">print at your own risk.</span></p>
80
+
<p>Only print this gcode when you are present, alert and capable of stopping the printer in case of emergency.</p>
81
+
<p>Validation has been built into the forms to only allow sensible min and max values, however this is not foolproof.</p>
<p style="text-align: center;">This page is fully <a href="https://github.com/teachingtechYT/teachingtechYT.github.io" target="_blank">open source</a>. If you find a bug or have a feature request, please post in the <a href="https://github.com/teachingtechYT/teachingtechYT.github.io/issues" target="_blank">issues</a> section. Make sure to read the <a href="https://github.com/teachingtechYT/teachingtechYT.github.io/issues/323" target="_blank">pinned readme</a>.</p>
32
31
<p style="text-align: center;">This page was created using:</p>
halfX=(oldX+nextX)/2;// Calculate half way point for X travel
784
+
halfY=(oldY+nextY)/2;// Calculate half way point for Y travel
785
+
}
786
+
oldX=parseFloat(gcodeArray[item].match(regexpX)[0].substring(1));// Store X position in case of multiple travel moves in a row
787
+
oldY=parseFloat(gcodeArray[item].match(regexpY)[0].substring(1));// Store Y position in case of multiple travel moves in a row
788
+
halfZ=parseFloat(oldZ+hop).toFixed(4);// Calculate temporary z height for peak of diagonal travel
789
+
if(version=="trad"){// Create movements for a diagonal Z hop halfway between points
790
+
varnewLine=gType+" X"+parseFloat(halfX).toFixed(4)+" Y"+parseFloat(halfY).toFixed(4)+" Z"+halfZ;// Create new G0/G1 travel move to the halfway point
791
+
if(oldF!=-1){// Check if a feedrate was stored or bogus -1 value
792
+
newLine+=" F"+oldF;// Add F feedrate to the line if possible
793
+
}
794
+
newLine+=" ; Diagonal Z hop part 1\n";// Add comment
795
+
gcodeArray[item]=newLine+gcodeArray[item]+" Z"+oldZ+" ; Diagonal Z hop part 2";// Add new travel move plus old travel together, adding Z height to the end of the old travel move.
796
+
}else{// Create movements for a diagonal Z hop above the destination, then lower down
797
+
gcodeArray[item]+=" Z"+halfZ+" ; Diagonal Z hop part 1\n";
798
+
gcodeArray[item]+=gType+" Z"+oldZ+" ; Diagonal Z hop part 2";
799
+
}
800
+
}else{// If the travel length was too short, add comment only
801
+
gcodeArray[item]+=" ; Travel move of "+travelLength+" below user threshold of "+minLength+" mm";
802
+
}
803
+
804
+
}
805
+
}
806
+
}
807
+
}
808
+
});
809
+
gcode=gcodeArray.join("\n");// Join all of the individuallines back together
810
+
varheader="; Experimental diagonal Z hop post processor from: https://teachingtechyt.github.io/diagonalZhop.html\n";// Add URL
811
+
header+="; Diagonal Z hop height: "+hop+" mm\n";// Add user input
812
+
header+="; Miniumum travel length: "+minLength+" mm\n"// Add user input
813
+
header+="; Version: ";// Add user input
814
+
if(version=="trad"){
815
+
header+="Traditional (diagonal move up to half way point)\n";
816
+
}else{
817
+
header+="Alternate (diagonal move to above finishing point)\n";
818
+
}
819
+
gcode=header+gcode;// Append string to the start of the start of the gcode
820
+
document.diagZhop.diagZhopGcode.value=gcode;// Insert post processed gcode into the output box
0 commit comments