Exemple #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
Exemple #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)
Exemple #3
0
	def setCornersZ( self ):
		"Set maximum and minimum corners and z."
		layerIndex = - 1
		self.cornerHighComplex = complex( - 999999999.0, - 999999999.0 )
		self.cornerLow = Vector3( 999999999.0, 999999999.0, 999999999.0 )
		for line in self.lines[ self.lineIndex : ]:
			splitLine = line.split()
			firstWord = gcodec.getFirstWord( splitLine )
			if firstWord == 'G1':
				location = gcodec.getLocationFromSplitLine( self.oldLocation, splitLine )
				self.cornerHighComplex = euclidean.getMaximum( self.cornerHighComplex, location.dropAxis( 2 ) )
				self.cornerLow = euclidean.getPointMinimum( self.cornerLow, location )
				self.oldLocation = location
			elif firstWord == '(<layer>':
				layerIndex += 1
				if self.raftPreferences.supportChoiceNoSupportMaterial.value:
					if layerIndex > 1:
						return
Exemple #4
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 )
Exemple #5
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 )