Cut up long moves into sections of 1cm, to reduce the impact of buffering lots of long moves.

master
daid 2012-09-20 14:28:44 +02:00
parent 4df94e7da4
commit 7b02b1661a
1 changed files with 10 additions and 0 deletions

View File

@ -234,6 +234,16 @@ class DimensionSkein:
location = gcodec.getLocationFromSplitLine(self.oldLocation, splitLine)
if self.oldLocation != None:
distance = abs( location - self.oldLocation )
if distance > 11.0:
extra = ''
while distance > 11.0:
self.oldLocation.z = location.z
self.oldLocation += (location - self.oldLocation) / distance * 10.0
distance -= 10.0
e = self.getExtrusionDistanceString(10.0, splitLine)
extra += self.distanceFeedRate.getLinearGcodeMovementWithFeedRate(self.feedRateMinute, self.oldLocation.dropAxis(), self.oldLocation.z) + e + '\n'
print extra, line, distance
line = extra + line
self.oldLocation = location
else:
if self.oldLocation == None: