示例#1
0
def getOuterLoops(loops):
    'Get widdershins outer loops.'
    outerLoops = []
    for loop in loops:
        if not euclidean.isPathInsideLoops(outerLoops, loop):
            outerLoops.append(loop)
    intercircle.directLoops(True, outerLoops)
    return outerLoops
示例#2
0
def getOuterLoops(loops):
    "Get widdershins outer loops."
    outerLoops = []
    for loop in loops:
        if not euclidean.isPathInsideLoops(outerLoops, loop):
            outerLoops.append(loop)
    intercircle.directLoops(True, outerLoops)
    return outerLoops
示例#3
0
def getLoopsDifference(importRadius, loopLists):
	"Get difference loops."
	negativeLoops = getLoopsUnified(importRadius, loopLists[1 :])
	intercircle.directLoops(False, negativeLoops)
	positiveLoops = loopLists[0]
	intercircle.directLoops(True, positiveLoops)
	radiusSide = 0.01 * importRadius
	corners = getLoopsListsIntersections(loopLists)
	corners += getInsetPointsByInsetLoops(negativeLoops, True, positiveLoops, radiusSide)
	corners += getInsetPointsByInsetLoops(positiveLoops, False, negativeLoops, radiusSide)
	allPoints = corners[:]
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(importRadius, negativeLoops), True, positiveLoops, radiusSide)
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(importRadius, positiveLoops), False, negativeLoops, radiusSide)
	return trianglemesh.getDescendingAreaLoops( allPoints, corners, importRadius)
示例#4
0
def getLoopsDifference(importRadius, loopLists):
	'Get difference loops.'
	halfImportRadius = 0.5 * importRadius # so that there are no misses on shallow angles
	radiusSide = 0.01 * importRadius
	negativeLoops = getLoopsUnified(importRadius, loopLists[1 :])
	intercircle.directLoops(False, negativeLoops)
	positiveLoops = loopLists[0]
	intercircle.directLoops(True, positiveLoops)
	corners = getInsetPointsByInsetLoops(negativeLoops, True, positiveLoops, radiusSide)
	corners += getInsetPointsByInsetLoops(positiveLoops, False, negativeLoops, radiusSide)
	allPoints = corners[:]
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(negativeLoops, halfImportRadius), True, positiveLoops, radiusSide)
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(positiveLoops, halfImportRadius), False, negativeLoops, radiusSide)
	return triangle_mesh.getDescendingAreaOrientedLoops(allPoints, corners, importRadius)
示例#5
0
def getLoopsDifference(importRadius, loopLists):
	'Get difference loops.'
	halfImportRadius = 0.5 * importRadius # so that there are no misses on shallow angles
	radiusSide = 0.01 * importRadius
	negativeLoops = getLoopsUnified(importRadius, loopLists[1 :])
	intercircle.directLoops(False, negativeLoops)
	positiveLoops = loopLists[0]
	intercircle.directLoops(True, positiveLoops)
	corners = getInsetPointsByInsetLoops(negativeLoops, True, positiveLoops, radiusSide)
	corners += getInsetPointsByInsetLoops(positiveLoops, False, negativeLoops, radiusSide)
	allPoints = corners[:]
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(negativeLoops, halfImportRadius), True, positiveLoops, radiusSide)
	allPoints += getInsetPointsByInsetLoops(getInBetweenLoopsFromLoops(positiveLoops, halfImportRadius), False, negativeLoops, radiusSide)
	return triangle_mesh.getDescendingAreaLoops(allPoints, corners, importRadius)
示例#6
0
def getLoopsDifference(importRadius, loopLists):
    "Get difference loops."
    negativeLoops = getLoopsUnified(importRadius, loopLists[1:])
    intercircle.directLoops(False, negativeLoops)
    positiveLoops = loopLists[0]
    intercircle.directLoops(True, positiveLoops)
    radiusSide = 0.01 * importRadius
    corners = getLoopsListsIntersections(loopLists)
    corners += getInsetPointsByInsetLoops(negativeLoops, True, positiveLoops,
                                          radiusSide)
    corners += getInsetPointsByInsetLoops(positiveLoops, False, negativeLoops,
                                          radiusSide)
    allPoints = corners[:]
    allPoints += getInsetPointsByInsetLoops(
        getInBetweenLoopsFromLoops(importRadius, negativeLoops), True,
        positiveLoops, radiusSide)
    allPoints += getInsetPointsByInsetLoops(
        getInBetweenLoopsFromLoops(importRadius, positiveLoops), False,
        negativeLoops, radiusSide)
    return trianglemesh.getDescendingAreaLoops(allPoints, corners,
                                               importRadius)