Exemple #1
0
	def addTowers( self ):
		"Add towers."
		bottomLayerIndex = self.getBottomLayerIndex()
		if bottomLayerIndex == None:
			return
		self.addLayerLinesIfDifferent( bottomLayerIndex )
		removedIsland = euclidean.getTransferClosestSurroundingLoop( self.oldOrderedLocation, self.islandLayers[ bottomLayerIndex ], self )
		while 1:
			self.climbTower( removedIsland )
			bottomLayerIndex = self.getBottomLayerIndex()
			if bottomLayerIndex == None:
				return
			self.addLayerLinesIfDifferent( bottomLayerIndex )
			removedIsland = euclidean.getTransferClosestSurroundingLoop( self.oldOrderedLocation, self.islandLayers[ bottomLayerIndex ], self )
Exemple #2
0
 def addTowers(self):
     "Add towers."
     bottomLayerIndex = self.getBottomLayerIndex()
     if bottomLayerIndex == None:
         return
     self.addLayerLinesIfDifferent(bottomLayerIndex)
     removedIsland = euclidean.getTransferClosestSurroundingLoop(
         self.oldOrderedLocation, self.islandLayers[bottomLayerIndex], self)
     while 1:
         self.climbTower(removedIsland)
         bottomLayerIndex = self.getBottomLayerIndex()
         if bottomLayerIndex == None:
             return
         self.addLayerLinesIfDifferent(bottomLayerIndex)
         removedIsland = euclidean.getTransferClosestSurroundingLoop(
             self.oldOrderedLocation, self.islandLayers[bottomLayerIndex],
             self)
Exemple #3
0
	def climbTower( self, removedIsland ):
		"Climb up the island to any islands directly above."
		outsetDistance = 1.5 * self.extrusionWidth
		for step in range( self.towerPreferences.maximumTowerHeight.value ):
			aboveIndex = self.oldLayerIndex + 1
			if aboveIndex >= len( self.islandLayers ):
				return
			outsetRemovedLoop = removedIsland.boundingLoop.getOutsetBoundingLoop( outsetDistance )
			islandsWithin = []
			for island in self.islandLayers[ aboveIndex ]:
				if self.isInsideRemovedOutsideCone( island, outsetRemovedLoop, aboveIndex ):
					islandsWithin.append( island )
			if len( islandsWithin ) < 1:
				return
			self.addLayerLinesIfDifferent( aboveIndex )
			removedIsland = euclidean.getTransferClosestSurroundingLoop( self.oldOrderedLocation, islandsWithin, self )
			self.islandLayers[ aboveIndex ].remove( removedIsland )
Exemple #4
0
 def climbTower(self, removedIsland):
     "Climb up the island to any islands directly above."
     outsetDistance = 1.5 * self.extrusionWidth
     for step in range(self.towerPreferences.maximumTowerHeight.value):
         aboveIndex = self.oldLayerIndex + 1
         if aboveIndex >= len(self.islandLayers):
             return
         outsetRemovedLoop = removedIsland.boundingLoop.getOutsetBoundingLoop(
             outsetDistance)
         islandsWithin = []
         for island in self.islandLayers[aboveIndex]:
             if self.isInsideRemovedOutsideCone(island, outsetRemovedLoop,
                                                aboveIndex):
                 islandsWithin.append(island)
         if len(islandsWithin) < 1:
             return
         self.addLayerLinesIfDifferent(aboveIndex)
         removedIsland = euclidean.getTransferClosestSurroundingLoop(
             self.oldOrderedLocation, islandsWithin, self)
         self.islandLayers[aboveIndex].remove(removedIsland)