feedRate = 3600.0
moveType = 'move'
layerThickness = 0.1
- pathType = 'CUSTOM';
+ pathType = 'CUSTOM'
currentLayer = []
- currentPath = gcodePath('move', pathType, layerThickness, pos[:])
+ currentPath = gcodePath('move', pathType, layerThickness, pos)
currentPath['extruder'] = currentExtruder
currentLayer.append(currentPath)
z = getCodeFloat(line, 'Z')
e = getCodeFloat(line, 'E')
#f = getCodeFloat(line, 'F')
- oldPos = pos[:]
+ oldPos = pos
+ pos = pos[:]
if posAbs:
if x is not None:
pos[0] = x * scale + posOffset[0]
currentPath['extruder'] = currentExtruder
currentLayer.append(currentPath)
- currentPath['points'].append(pos[:])
+ currentPath['points'].append(pos)
currentPath['extrusion'].append(e * extrudeAmountMultiply)
elif G == 4: #Delay
S = getCodeFloat(line, 'S')
if x is None and y is None and z is None:
pos = center
else:
+ pos = pos[:]
if x is not None:
pos[0] = center[0]
if y is not None:
- pos[0] = center[1]
+ pos[1] = center[1]
if z is not None:
- pos[0] = center[2]
+ pos[2] = center[2]
elif G == 90: #Absolute position
posAbs = True
elif G == 91: #Relative position