コード例 #1
0
ファイル: cool.py プロジェクト: CNCBASHER/skeinforge
	def addFlowRateLineIfNecessary( self, flowRate ):
		"Add a line of flow rate if different."
		flowRateString = euclidean.getFourSignificantFigures( flowRate )
		if flowRateString == self.oldFlowRateString:
			return
		if flowRateString != None:
			self.distanceFeedRate.addLine( 'M108 S' + flowRateString )
		self.oldFlowRateString = flowRateString
コード例 #2
0
ファイル: cool.py プロジェクト: yazici/skeinforge
	def addFlowRateLineIfNecessary( self, flowRateString ):
		"Add a line of flow rate if different."
		flowRateString = euclidean.getFourSignificantFigures( float( flowRateString ) )
		if flowRateString == self.oldFlowRateString:
			return
		if flowRateString != None:
			self.distanceFeedRate.addLine( 'M108 S' + flowRateString )
		self.oldFlowRateString = flowRateString
コード例 #3
0
ファイル: speed.py プロジェクト: TeamTeamUSA/ReplicatorG
	def getFlowRateString( self ):
		"Get the flow rate string."
		if not self.speedRepository.addFlowRate.value:
			return None
		flowRate = self.speedRepository.flowRateSetting.value
		if self.isBridgeLayer:
			flowRate *= self.speedRepository.bridgeFlowRateMultiplier.value
		if self.isSurroundingLoopBeginning:
			flowRate *= self.speedRepository.perimeterFlowRateOverOperatingFlowRate.value
		return euclidean.getFourSignificantFigures( flowRate )
コード例 #4
0
	def getFlowRateString( self ):
		"Get the flow rate string."
		if not self.speedRepository.addFlowRate.value:
			return None
		flowRate = self.speedRepository.flowRateSetting.value
		if self.isBridgeLayer:
			flowRate *= self.speedRepository.bridgeFlowRateMultiplier.value
		if self.isPerimeter:
			flowRate *= self.speedRepository.perimeterFlowRateOverOperatingFlowRate.value
		return euclidean.getFourSignificantFigures( flowRate )