def getAroundBetweenPath(self, begin, end):
'Get the path around the loops in the way of the original line segment.'
+ addedJumpLine = False
aroundBetweenPath = []
boundaries = self.getBoundaries()
boundarySegments = self.getBoundarySegments(begin, boundaries, end)
segment = boundarySegment.segment
if boundarySegmentIndex < len(boundarySegments) - 1 and self.runningJumpSpace > 0.0:
segment = boundarySegment.getSegment(boundarySegmentIndex, boundarySegments, self.edgeWidth, self.runningJumpSpace)
+ if not addedJumpLine:
+ self.distanceFeedRate.addLine("(<nextmovehasspacejump>)")
+ addedJumpLine = True
aroundBetweenPath += self.getAroundBetweenLineSegment(segment[0], boundaries, segment[1])
if boundarySegmentIndex < len(boundarySegments) - 1:
aroundBetweenPath.append(segment[1])
self.totalExtrusionDistance = 0.0
self.travelFeedRatePerSecond = None
self.zDistanceRatio = 5.0
+ self.addRetraction = False
def addLinearMoveExtrusionDistanceLine(self, extrusionDistance):
'Get the extrusion distance string from the extrusion distance.'
self.absoluteDistanceMode = True
elif firstWord == 'G91':
self.absoluteDistanceMode = False
+ elif firstWord == '(<nextmovehasspacejump>)':
+ #Check for the space jump moves for retraction, these tags are added by the comb plugin.
+ self.addLinearMoveExtrusionDistanceLine(-self.repository.retractionDistance.value * self.retractionRatio)
+ self.addRetraction = True
elif firstWord == '(<layer>':
self.layerIndex += 1
settings.printProgress(self.layerIndex, 'dimension')
elif firstWord == 'M101':
- self.addLinearMoveExtrusionDistanceLine(self.restartDistance * self.retractionRatio)
+ if self.addRetraction:
+ self.addLinearMoveExtrusionDistanceLine(self.restartDistance * self.retractionRatio)
+ self.addRetraction = False
if self.totalExtrusionDistance > self.repository.maximumEValueBeforeReset.value:
if not self.repository.relativeExtrusionDistance.value:
self.distanceFeedRate.addLine('G92 E0')
self.isExtruderActive = True
elif firstWord == 'M103':
self.retractionRatio = self.getRetractionRatio(lineIndex)
- self.addLinearMoveExtrusionDistanceLine(-self.repository.retractionDistance.value * self.retractionRatio)
self.isExtruderActive = False
elif firstWord == 'M108':
self.flowRate = float( splitLine[1][1 :] )