Beispiel #1
0
	def parseInitialization( self ):
		"Parse gcode initialization and store the parameters."
		for self.lineIndex in xrange( len( self.lines ) ):
			line = self.lines[ self.lineIndex ].lstrip()
			splitLine = gcodec.getWithoutBracketsEqualTab( line ).split()
			firstWord = gcodec.getFirstWord( splitLine )
			self.distanceFeedRate.parseSplitLine( firstWord, splitLine )
			if firstWord == 'layerThickness':
				self.layerThickness = float( splitLine[ 1 ] )
			elif firstWord == 'extrusionStart':
				return
			elif firstWord == 'perimeterWidth':
				self.perimeterWidth = float( splitLine[ 1 ] )
Beispiel #2
0
 def parseInitialization(self):
     "Parse gcode initialization and store the parameters."
     for self.lineIndex in xrange(len(self.lines)):
         line = self.lines[self.lineIndex].lstrip()
         splitLine = gcodec.getWithoutBracketsEqualTab(line).split()
         firstWord = gcodec.getFirstWord(splitLine)
         self.distanceFeedRate.parseSplitLine(firstWord, splitLine)
         if firstWord == 'layerThickness':
             self.layerThickness = float(splitLine[1])
         elif firstWord == 'extrusionStart':
             return
         elif firstWord == 'perimeterWidth':
             self.perimeterWidth = float(splitLine[1])
Beispiel #3
0
	def parseInitialization( self ):
		"Parse gcode initialization and store the parameters."
		for self.lineIndex in xrange( len( self.lines ) ):
			line = self.lines[ self.lineIndex ].lstrip()
			splitLine = gcodec.getWithoutBracketsEqualTab( line ).split()
			firstWord = gcodec.getFirstWord( splitLine )
			if firstWord == 'infillBridgeWidthOverExtrusionWidth':
				self.infillBridgeWidthOverExtrusionWidth = float( splitLine[ 1 ] )
			elif firstWord == 'decimalPlacesCarried':
				self.decimalPlacesCarried = int( splitLine[ 1 ] )
			elif firstWord == 'layerThickness':
				self.layerThickness = float( splitLine[ 1 ] )
				self.extrusionPerimeterWidth = self.insetPreferences.extrusionPerimeterWidthOverThickness.value * self.layerThickness
				self.halfExtrusionPerimeterWidth = 0.5 * self.extrusionPerimeterWidth
			elif firstWord == 'extrusionWidth':
				self.extrusionWidth = float( splitLine[ 1 ] )
				self.fillInset = self.extrusionPerimeterWidth - self.extrusionPerimeterWidth * self.insetPreferences.infillPerimeterOverlap.value
				if self.insetPreferences.perimeterInfillPreference.value:
					self.fillInset = self.halfExtrusionPerimeterWidth + 0.5 * self.extrusionWidth - self.extrusionWidth * self.insetPreferences.infillPerimeterOverlap.value
			elif firstWord == 'extrusionStart':
				return
Beispiel #4
0
 def parseInitialization(self):
     "Parse gcode initialization and store the parameters."
     for self.lineIndex in xrange(len(self.lines)):
         line = self.lines[self.lineIndex].lstrip()
         splitLine = gcodec.getWithoutBracketsEqualTab(line).split()
         firstWord = gcodec.getFirstWord(splitLine)
         if firstWord == 'infillBridgeWidthOverExtrusionWidth':
             self.infillBridgeWidthOverExtrusionWidth = float(splitLine[1])
         elif firstWord == 'decimalPlacesCarried':
             self.decimalPlacesCarried = int(splitLine[1])
         elif firstWord == 'layerThickness':
             self.layerThickness = float(splitLine[1])
             self.extrusionPerimeterWidth = self.insetPreferences.extrusionPerimeterWidthOverThickness.value * self.layerThickness
             self.halfExtrusionPerimeterWidth = 0.5 * self.extrusionPerimeterWidth
         elif firstWord == 'extrusionWidth':
             self.extrusionWidth = float(splitLine[1])
             self.fillInset = self.extrusionPerimeterWidth - self.extrusionPerimeterWidth * self.insetPreferences.infillPerimeterOverlap.value
             if self.insetPreferences.perimeterInfillPreference.value:
                 self.fillInset = self.halfExtrusionPerimeterWidth + 0.5 * self.extrusionWidth - self.extrusionWidth * self.insetPreferences.infillPerimeterOverlap.value
         elif firstWord == 'extrusionStart':
             return