machinekoder / NGCWriter

NGC (RS-274 GCode) output plugin for Cura
GNU Affero General Public License v3.0
6 stars 5 forks source link

Cura z-offset ignored by ngc2ve.py #3

Open airborneastro opened 4 years ago

airborneastro commented 4 years ago

Hi, It looks like ngc2ve.py removes the line: G92 Z0.3 ; consider this the original z before offset when you use a z-offset in Cura. You will find that line in the original G-code with a first layer thickness of 0.3 as an example. The effect is that the print head moves to the offset z at start, but is reset to the original z at the first printing move. I found that you can remedy that by changing line 302 of ngc2ve.py if (G==0) or (G==92) : to if (G==0) or ((G==92) and (self.getCodeFloat(line, 'A') is not None) :

As a precaution, a G92.1 (erase offset) should be added to both the Start G-Code and the End G-Code in the printer settings. Thanks for your great converter, I am using it on a Kossel printer driven by machinekit/replicape, of course using your great remote UI.