- totalExtrusion += e - currentE
- currentE = e
- if totalExtrusion > maxExtrusion:
- maxExtrusion = totalExtrusion
- if moveType == 'move' and oldPos.z != pos.z:
- if oldPos.z > pos.z and abs(oldPos.z - pos.z) > 5.0 and pos.z < 1.0:
- oldPos.z = 0.0
- layerThickness = abs(oldPos.z - pos.z)
- if currentPath.type != moveType or currentPath.pathType != pathType:
- currentPath = gcodePath(moveType, pathType, layerThickness, currentPath.list[-1])
- currentPath.extruder = currentExtruder
+ currentE += e
+ else:
+ e = 0.0
+ if moveType == 'move' and oldPos[2] != pos[2]:
+ if oldPos[2] > pos[2] and abs(oldPos[2] - pos[2]) > 5.0 and pos[2] < 1.0:
+ oldPos[2] = 0.0
+ layerThickness = abs(oldPos[2] - pos[2])
+ if currentPath['type'] != moveType or currentPath['pathType'] != pathType:
+ currentPath = gcodePath(moveType, pathType, layerThickness, currentPath['points'][-1])
+ currentPath['extruder'] = currentExtruder