Пример #1
0
	def linearMove( self, splitLine ):
		"Add a linear move to the loop."
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		self.feedrateTable[ location ] = self.feedrateMinute
		if self.extruderActive:
			self.addToExtrusion( location )
		self.oldLocation = location
Пример #2
0
	def linearMove( self, splitLine ):
		"Add line to time spent on layer."
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		if self.oldLocation != None:
			feedrateSecond = self.feedrateMinute / 60.0
			self.layerTime += location.distance( self.oldLocation ) / feedrateSecond
		self.highestZ = max( location.z, self.highestZ )
		self.oldLocation = location
Пример #3
0
	def linearMove( self, splitLine ):
		"Add to loop path if this is a loop or path."
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		if self.isLoopPerimeter:
			if self.isNextExtruderOn():
				self.loopPath = euclidean.PathZ( location.z )
		if self.loopPath != None:
			self.loopPath.path.append( location.dropAxis( 2 ) )
		self.oldLocation = location
Пример #4
0
	def linearMove( self, splitLine ):
		"Bevel a linear move."
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		if self.oldLocation != None:
			nextLocation = self.getNextLocation()
			if nextLocation != None:
				location = self.splitPointGetAfter( location, nextLocation )
		self.oldLocation = location
		self.oldFeedrateMinute = self.feedrateMinute
Пример #5
0
	def getUnpausedFeedrateMinute( self, location, splitLine ):
		"Get the feedrate which will compensate for the pause."
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		if self.oldLocation == None:
			return self.feedrateMinute
		distance = location.distance( self.oldLocation )
		if distance <= 0.0:
			return self.feedrateMinute
		specifiedFeedrateSecond = self.feedrateMinute / 60.0
		resultantReciprocal = 1.0 - self.delaySecond / distance * specifiedFeedrateSecond
		if resultantReciprocal < self.minimumSpeedUpReciprocal:
			return self.feedrateMinute * self.maximumSpeed
		return self.feedrateMinute / resultantReciprocal
Пример #6
0
	def getStretchedLine( self, splitLine ):
		"Get stretched gcode line."
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		if self.oldLocation != None:
			if self.extruderActive and self.threadMaximumAbsoluteStretch > 0.0:
				self.addStretchesBeforePoint( location )
		self.oldLocation = location
		if self.extruderActive and self.threadMaximumAbsoluteStretch > 0.0:
			return self.getStretchedLineFromIndexLocation( self.lineIndex - 1, self.lineIndex + 1, location )
		if self.isJustBeforeExtrusion() and self.threadMaximumAbsoluteStretch > 0.0:
			return self.getStretchedLineFromIndexLocation( self.lineIndex - 1, self.lineIndex + 1, location )
		return self.lines[ self.lineIndex ]
Пример #7
0
 def getUnpausedFeedrateMinute(self, location, splitLine):
     "Get the feedrate which will compensate for the pause."
     self.feedrateMinute = gcodec.getFeedrateMinute(self.feedrateMinute,
                                                    splitLine)
     if self.oldLocation == None:
         return self.feedrateMinute
     distance = location.distance(self.oldLocation)
     if distance <= 0.0:
         return self.feedrateMinute
     specifiedFeedrateSecond = self.feedrateMinute / 60.0
     resultantReciprocal = 1.0 - self.delaySecond / distance * specifiedFeedrateSecond
     if resultantReciprocal < self.minimumSpeedUpReciprocal:
         return self.feedrateMinute * self.maximumSpeed
     return self.feedrateMinute / resultantReciprocal
Пример #8
0
	def getActiveFeedrateRatio( self ):
		"Get the feedrate of the first active move over the operating feedrate."
		isSearchExtruderActive = self.isExtruderActive
		for afterIndex in xrange( self.lineIndex, len( self.lines ) ):
			line = self.lines[ afterIndex ]
			splitLine = line.split()
			firstWord = gcodec.getFirstWord( splitLine )
			if firstWord == 'G1':
				if isSearchExtruderActive:
					return gcodec.getFeedrateMinute( self.feedrateMinute, splitLine ) / self.operatingFeedrateMinute
			elif firstWord == 'M101':
				isSearchExtruderActive = True
		print( 'active feedrate ratio was not found in oozebane.' )
		return 1.0
Пример #9
0
	def getOozebaneLine( self, line ):
		"Get oozebaned gcode line."
		splitLine = line.split()
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		if self.oldLocation == None:
			return line
		if self.startupStepIndex < len( self.afterStartupDistances ):
			return self.getAddAfterStartupLines( line )
		if self.extruderInactiveLongEnough:
			return self.getAddBeforeStartupLines( line )
		if self.shutdownStepIndex < len( self.earlyShutdownDistances ):
			return self.getAddShutSlowDownLines( line )
		if self.isStartupEarly:
			return self.getLinearMoveWithFeedrateSplitLine( self.operatingFeedrateMinute, splitLine )
		return line
Пример #10
0
	def getRaftedLine( self, splitLine ):
		"Get elevated gcode line with operating feedrate."
		location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
		self.feedrateMinute = gcodec.getFeedrateMinute( self.feedrateMinute, splitLine )
		self.oldLocation = location
		z = location.z
		if self.operatingJump != None:
			z += self.operatingJump
		if not self.isFirstLayerWithinTemperatureAdded and not self.isSurroundingLoop:
			self.isFirstLayerWithinTemperatureAdded = True
			self.addTemperature( self.raftPreferences.temperatureShapeFirstLayerWithin.value )
			if self.raftPreferences.addRaftElevateNozzleOrbitSetAltitude.value:
				boundaryLoops = self.boundaryLayers[ self.layerIndex ].loops
				if len( boundaryLoops ) > 1:
					intercircle.addOperatingOrbits( boundaryLoops, euclidean.getXYComplexFromVector3( self.oldLocation ), self, self.raftPreferences.temperatureChangeTimeBeforeNextThreads.value, z )
		return self.getGcodeFromFeedrateMovementZ( self.feedrateMinute, location.dropAxis( 2 ), z )
Пример #11
0
 def getStretchedLine(self, splitLine):
     "Get stretched gcode line."
     location = gcodec.getLocationFromSplitLine(self.oldLocation, splitLine)
     self.feedrateMinute = gcodec.getFeedrateMinute(self.feedrateMinute,
                                                    splitLine)
     if self.oldLocation != None:
         if self.extruderActive and self.threadMaximumAbsoluteStretch > 0.0:
             self.addStretchesBeforePoint(location)
     self.oldLocation = location
     if self.extruderActive and self.threadMaximumAbsoluteStretch > 0.0:
         return self.getStretchedLineFromIndexLocation(
             self.lineIndex - 1, self.lineIndex + 1, location)
     if self.isJustBeforeExtrusion(
     ) and self.threadMaximumAbsoluteStretch > 0.0:
         return self.getStretchedLineFromIndexLocation(
             self.lineIndex - 1, self.lineIndex + 1, location)
     return self.lines[self.lineIndex]