Add layer number to output comments

This commit is contained in:
daid 2012-03-19 17:58:30 +01:00
parent a4c7ee8c4d
commit f6eca8e280

View file

@ -68,6 +68,7 @@ class GcodeSmallSkein:
self.lastFeedRateString = None
self.lastZString = None
self.output = cStringIO.StringIO()
self.layerNr = 0
def getCraftedGcode( self, gcodeText ):
"Parse gcode text and store the gcode."
@ -125,4 +126,7 @@ class GcodeSmallSkein:
self.output.write(';TYPE:FILL\n');
elif line.startswith('(<alteration>'):
self.output.write(';TYPE:CUSTOM\n');
elif line.startswith('(<layer>'):
self.output.write(';LAYER:%d\n' % (self.layerNr));
self.layerNr += 1