예제 #1
0
def getLoopsIntersection( importRadius, loopLists ):
	"Get intersection loops."
	intercircle.directLoopLists( True, loopLists )
	if len(loopLists) < 1:
		return []
	if len(loopLists) < 2:
		return loopLists[0]
	loopsIntersection = loopLists[0]
	for loopList in loopLists[1 :]:
		loopsIntersection = getLoopsIntersectionByPair( importRadius, loopsIntersection, loopList )
	return loopsIntersection
예제 #2
0
def getLoopsIntersection(importRadius, loopLists):
	'Get intersection loops.'
	intercircle.directLoopLists( True, loopLists )
	if len(loopLists) < 1:
		return []
	if len(loopLists) < 2:
		return loopLists[0]
	intercircle.directLoopLists(True, loopLists)
	loopsIntersection = loopLists[0]
	for loopList in loopLists[1 :]:
		loopsIntersection = getLoopsIntersectionByPair( importRadius, loopsIntersection, loopList )
	return loopsIntersection
예제 #3
0
def getLoopsUnified( importRadius, loopLists ):
	"Get joined loops sliced through shape."
	allPoints = []
	corners = getLoopsListsIntersections(loopLists)
	radiusSide = 0.01 * importRadius
	intercircle.directLoopLists( True, loopLists )
	for loopListIndex in xrange( len(loopLists) ):
		insetLoops = loopLists[ loopListIndex ]
		inBetweenInsetLoops = getInBetweenLoopsFromLoops( importRadius, insetLoops )
		otherLoops = euclidean.getConcatenatedList( loopLists[ : loopListIndex ] + loopLists[ loopListIndex + 1 : ] )
		corners += getInsetPointsByInsetLoops( insetLoops, False, otherLoops, radiusSide )
		allPoints += getInsetPointsByInsetLoops( inBetweenInsetLoops, False, otherLoops, radiusSide )
	allPoints += corners[:]
	return trianglemesh.getDescendingAreaLoops(allPoints, corners, importRadius)
예제 #4
0
def getLoopsUnified(importRadius, loopLists):
	'Get joined loops sliced through shape.'
	allPoints = []
	corners = getLoopsListsIntersections(loopLists)
	radiusSide = 0.01 * importRadius
	radiusSideNegative = -radiusSide
	intercircle.directLoopLists(True, loopLists)
	for loopListIndex in xrange(len(loopLists)):
		insetLoops = loopLists[ loopListIndex ]
		inBetweenInsetLoops = getInBetweenLoopsFromLoops(insetLoops, importRadius)
		otherLoops = euclidean.getConcatenatedList(loopLists[: loopListIndex] + loopLists[loopListIndex + 1 :])
		corners += getInsetPointsByInsetLoops(insetLoops, False, otherLoops, radiusSide)
		allPoints += getInsetPointsByInsetLoops(inBetweenInsetLoops, False, otherLoops, radiusSideNegative)
	allPoints += corners[:]
	return triangle_mesh.getDescendingAreaLoops(allPoints, corners, importRadius)