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
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
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 )
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 )