Exemplo n.º 1
0
	def parseCorner( self, line ):
		"Parse a gcode line and use the location to update the bounding corners."
		splitLine = getSplitLineBeforeBracketSemicolon( line )
		firstWord = getFirstWord( splitLine )
		if firstWord == '(<boundaryPoint>':
			locationComplex = getLocationFromSplitLine( None, splitLine ).dropAxis( 2 )
			self.cornerMaximum = euclidean.getMaximum( self.cornerMaximum, locationComplex )
			self.cornerMinimum = euclidean.getMinimum( self.cornerMinimum, locationComplex )
		elif firstWord == 'G1':
			location = getLocationFromSplitLine( self.oldLocation, splitLine )
			locationComplex = location.dropAxis( 2 )
			self.cornerMaximum = euclidean.getMaximum( self.cornerMaximum, locationComplex + self.cornerRadius )
			self.cornerMinimum = euclidean.getMinimum( self.cornerMinimum, locationComplex - self.cornerRadius )
			self.oldLocation = location
Exemplo n.º 2
0
 def parseCorner(self, line):
     "Parse a gcode line and use the location to update the bounding corners."
     splitLine = line.split()
     firstWord = gcodec.getFirstWord(splitLine)
     if firstWord == "(<boundaryPoint>":
         locationComplex = gcodec.getLocationFromSplitLine(None, splitLine).dropAxis(2)
         self.cornerMaximum = euclidean.getMaximum(self.cornerMaximum, locationComplex)
         self.cornerMinimum = euclidean.getMinimum(self.cornerMinimum, locationComplex)
Exemplo n.º 3
0
	def addTemperatureOrbits( self, endpoints, temperaturePreference, temperatureTimeChangePreference, z ):
		"Add the temperature and orbits around the support layer."
		if self.layerIndex < 0:
			return
		boundaryLoops = self.boundaryLayers[ self.layerIndex ].loops
		self.addTemperature( temperaturePreference.value )
		if len( boundaryLoops ) < 1:
			layerCornerHigh = complex( - 999999999.0, - 999999999.0 )
			layerCornerLow = complex( 999999999.0, 999999999.0 )
			for endpoint in endpoints:
				layerCornerHigh = euclidean.getMaximum( layerCornerHigh, endpoint.point )
				layerCornerLow = euclidean.getMinimum( layerCornerLow, endpoint.point )
			squareLoop = euclidean.getSquareLoop( layerCornerLow, layerCornerHigh )
			intercircle.addOrbitsIfLarge( self.distanceFeedRate, squareLoop, self.orbitalFeedRatePerSecond, temperatureTimeChangePreference.value, z )
			return
		perimeterInset = 0.4 * self.perimeterWidth
		insetBoundaryLoops = intercircle.getInsetLoopsFromLoops( perimeterInset, boundaryLoops )
		if len( insetBoundaryLoops ) < 1:
			insetBoundaryLoops = boundaryLoops
		largestLoop = euclidean.getLargestLoop( insetBoundaryLoops )
		intercircle.addOrbitsIfLarge( self.distanceFeedRate, largestLoop, self.orbitalFeedRatePerSecond, temperatureTimeChangePreference.value, z )
Exemplo n.º 4
0
	def addTemperatureOrbits( self, segments, temperaturePreference, temperatureTimeChangePreference, z ):
		"Add the temperature and orbits around the support layer."
		if self.layerIndex < 0:
			return
		boundaryLoops = self.boundaryLayers[ self.layerIndex ].loops
		self.addTemperature( temperaturePreference.value )
		if len( boundaryLoops ) < 1:
			endpoints = getEndpointsFromSegments( segments )
			layerCornerHigh = complex( - 999999999.0, - 999999999.0 )
			layerCornerLow = complex( 999999999.0, 999999999.0 )
			for endpoint in endpoints:
				layerCornerHigh = euclidean.getMaximum( layerCornerHigh, endpoint.point )
				layerCornerLow = euclidean.getMinimum( layerCornerLow, endpoint.point )
			squareLoop = getSquareLoop( layerCornerLow, layerCornerHigh )
			intercircle.addOrbits( squareLoop, self, temperatureTimeChangePreference.value, z )
			return
		perimeterInset = 0.4 * self.extrusionPerimeterWidth
		insetBoundaryLoops = intercircle.getInsetLoops( perimeterInset, boundaryLoops )
		if len( insetBoundaryLoops ) < 1:
			insetBoundaryLoops = boundaryLoops
		largestLoop = euclidean.getLargestLoop( insetBoundaryLoops )
		intercircle.addOrbits( largestLoop, self, temperatureTimeChangePreference.value, z )