def addToFillXIntersectionIndexTables(self, supportLayer):
     'Add fill segments from the boundary layers.'
     supportLoops = supportLayer.supportLoops
     supportLayer.fillXIntersectionsTable = {}
     if len(supportLoops) < 1:
         return
     euclidean.addXIntersectionsFromLoopsForTable(supportLoops, supportLayer.fillXIntersectionsTable, self.interfaceStep)
    def addSupportSegmentTable(self, layerIndex):
        'Add support segments from the boundary layers.'
        aboveLoops = self.boundaryLayers[ layerIndex + 1 ]
        supportLayer = self.supportLayers[layerIndex]

        if len(aboveLoops) < 1:
            return

        boundaryLayer = self.boundaryLayers[layerIndex]
        rise = self.slicedModel.layers[layerIndex + 1 ].z - self.slicedModel.layers[layerIndex].z

        outsetSupportLoops = intercircle.getInsetSeparateLoopsFromLoops(-self.minimumSupportRatio * rise, boundaryLayer)
        numberOfSubSteps = 4
        subStepSize = self.interfaceStep / float(numberOfSubSteps)
        aboveIntersectionsTable = {}
        euclidean.addXIntersectionsFromLoopsForTable(aboveLoops, aboveIntersectionsTable, subStepSize)
        outsetIntersectionsTable = {}
        euclidean.addXIntersectionsFromLoopsForTable(outsetSupportLoops, outsetIntersectionsTable, subStepSize)
        euclidean.subtractXIntersectionsTable(aboveIntersectionsTable, outsetIntersectionsTable)
        for aboveIntersectionsTableKey in aboveIntersectionsTable.keys():
            supportIntersectionsTableKey = int(round(float(aboveIntersectionsTableKey) / numberOfSubSteps))
            xIntersectionIndexList = []
            if supportIntersectionsTableKey in supportLayer.xIntersectionsTable:
                euclidean.addXIntersectionIndexesFromXIntersections(0, xIntersectionIndexList, supportLayer.xIntersectionsTable[ supportIntersectionsTableKey ])
            euclidean.addXIntersectionIndexesFromXIntersections(1, xIntersectionIndexList, aboveIntersectionsTable[ aboveIntersectionsTableKey ])
            supportLayer.xIntersectionsTable[ supportIntersectionsTableKey ] = euclidean.getJoinOfXIntersectionIndexes(xIntersectionIndexList)
 def addToFillXIntersectionIndexTables(self, supportLayer):
     'Add fill segments from the boundary layers.'
     supportLoops = supportLayer.supportLoops
     supportLayer.fillXIntersectionsTable = {}
     if len(supportLoops) < 1:
         return
     euclidean.addXIntersectionsFromLoopsForTable(
         supportLoops, supportLayer.fillXIntersectionsTable,
         self.interfaceStep)
 def addEmptyLayerSupport(self, boundaryLayerIndex):
     'Add support material to a layer if it is empty.'
     supportLayer = SupportLayer([])
     self.supportLayers.append(supportLayer)
     if len(self.boundaryLayers[ boundaryLayerIndex ]) > 0:
         return
     aboveXIntersectionsTable = {}
     euclidean.addXIntersectionsFromLoopsForTable(self.getInsetLoopsAbove(boundaryLayerIndex), aboveXIntersectionsTable, self.interfaceStep)
     belowXIntersectionsTable = {}
     euclidean.addXIntersectionsFromLoopsForTable(self.getInsetLoopsBelow(boundaryLayerIndex), belowXIntersectionsTable, self.interfaceStep)
     supportLayer.xIntersectionsTable = euclidean.getIntersectionOfXIntersectionsTables([ aboveXIntersectionsTable, belowXIntersectionsTable ])
 def addEmptyLayerSupport(self, boundaryLayerIndex):
     'Add support material to a layer if it is empty.'
     supportLayer = SupportLayer([])
     self.supportLayers.append(supportLayer)
     if len(self.boundaryLayers[boundaryLayerIndex]) > 0:
         return
     aboveXIntersectionsTable = {}
     euclidean.addXIntersectionsFromLoopsForTable(
         self.getInsetLoopsAbove(boundaryLayerIndex),
         aboveXIntersectionsTable, self.interfaceStep)
     belowXIntersectionsTable = {}
     euclidean.addXIntersectionsFromLoopsForTable(
         self.getInsetLoopsBelow(boundaryLayerIndex),
         belowXIntersectionsTable, self.interfaceStep)
     supportLayer.xIntersectionsTable = euclidean.getIntersectionOfXIntersectionsTables(
         [aboveXIntersectionsTable, belowXIntersectionsTable])
    def addSupportSegmentTable(self, layerIndex):
        'Add support segments from the boundary layers.'
        aboveLoops = self.boundaryLayers[layerIndex + 1]
        supportLayer = self.supportLayers[layerIndex]

        if len(aboveLoops) < 1:
            return

        boundaryLayer = self.boundaryLayers[layerIndex]
        rise = self.slicedModel.layers[
            layerIndex + 1].z - self.slicedModel.layers[layerIndex].z

        outsetSupportLoops = intercircle.getInsetSeparateLoopsFromLoops(
            -self.minimumSupportRatio * rise, boundaryLayer)
        numberOfSubSteps = 4
        subStepSize = self.interfaceStep / float(numberOfSubSteps)
        aboveIntersectionsTable = {}
        euclidean.addXIntersectionsFromLoopsForTable(aboveLoops,
                                                     aboveIntersectionsTable,
                                                     subStepSize)
        outsetIntersectionsTable = {}
        euclidean.addXIntersectionsFromLoopsForTable(outsetSupportLoops,
                                                     outsetIntersectionsTable,
                                                     subStepSize)
        euclidean.subtractXIntersectionsTable(aboveIntersectionsTable,
                                              outsetIntersectionsTable)
        for aboveIntersectionsTableKey in aboveIntersectionsTable.keys():
            supportIntersectionsTableKey = int(
                round(float(aboveIntersectionsTableKey) / numberOfSubSteps))
            xIntersectionIndexList = []
            if supportIntersectionsTableKey in supportLayer.xIntersectionsTable:
                euclidean.addXIntersectionIndexesFromXIntersections(
                    0, xIntersectionIndexList, supportLayer.
                    xIntersectionsTable[supportIntersectionsTableKey])
            euclidean.addXIntersectionIndexesFromXIntersections(
                1, xIntersectionIndexList,
                aboveIntersectionsTable[aboveIntersectionsTableKey])
            supportLayer.xIntersectionsTable[
                supportIntersectionsTableKey] = euclidean.getJoinOfXIntersectionIndexes(
                    xIntersectionIndexList)
Beispiel #7
0
	def getHorizontalXIntersectionsTable( self, loops ):
		"Get the horizontal x intersections table from the loops."
		horizontalXIntersectionsTable = {}
		euclidean.addXIntersectionsFromLoopsForTable( loops, horizontalXIntersectionsTable, self.millWidth )
		return horizontalXIntersectionsTable
Beispiel #8
0
 def getHorizontalXIntersectionsTable(self, loops):
     'Get the horizontal x intersections table from the loops.'
     horizontalXIntersectionsTable = {}
     euclidean.addXIntersectionsFromLoopsForTable(
         loops, horizontalXIntersectionsTable, self.millWidth)
     return horizontalXIntersectionsTable