コード例 #1
0
ファイル: extrude.py プロジェクト: folksjos/RepG
def getGeometryOutputByNestedRing(derivation, nestedRing, portionDirections):
	'Get geometry output by sorted, nested loops.'
	loopLists = getLoopListsByPath(derivation, None, nestedRing.vector3Loop, portionDirections)
	outsideOutput = triangle_mesh.getPillarsOutput(loopLists)
	if len(nestedRing.innerNestedRings) < 1:
		return outsideOutput
	shapes = [outsideOutput]
	for nestedRing.innerNestedRing in nestedRing.innerNestedRings:
		loopLists = getLoopListsByPath(derivation, 1.000001, nestedRing.innerNestedRing.vector3Loop, portionDirections)
		shapes.append(triangle_mesh.getPillarsOutput(loopLists))
	return {'difference' : {'shapes' : shapes}}
コード例 #2
0
ファイル: extrude.py プロジェクト: folksjos/RepG
def addPositives(derivation, paths, positives):
	'Add pillars output to positives.'
	portionDirections = getSpacedPortionDirections(derivation.interpolationDictionary)
	for path in paths:
		loopLists = getLoopListsByPath(derivation, None, path, portionDirections)
		geometryOutput = triangle_mesh.getPillarsOutput(loopLists)
		positives.append(geometryOutput)
コード例 #3
0
def addNegativesPositives(derivation, negatives, paths, positives):
    "Add pillars output to negatives and positives."
    for path in paths:
        endMultiplier = None
        normal = euclidean.getNormalByPath(path)
        if normal.dot(derivation.normal) < 0.0:
            endMultiplier = 1.000001
        loopListsByPath = getLoopListsByPath(derivation, endMultiplier, path)
        geometryOutput = triangle_mesh.getPillarsOutput(loopListsByPath)
        if endMultiplier == None:
            positives.append(geometryOutput)
        else:
            negatives.append(geometryOutput)
コード例 #4
0
ファイル: extrude.py プロジェクト: folksjos/RepG
def addNegativesPositives(derivation, negatives, paths, positives):
	'Add pillars output to negatives and positives.'
	portionDirections = getSpacedPortionDirections(derivation.interpolationDictionary)
	for path in paths:
		endMultiplier = None
		if not euclidean.getIsWiddershinsByVector3(path):
			endMultiplier = 1.000001
		loopLists = getLoopListsByPath(derivation, endMultiplier, path, portionDirections)
		geometryOutput = triangle_mesh.getPillarsOutput(loopLists)
		if endMultiplier == None:
			positives.append(geometryOutput)
		else:
			negatives.append(geometryOutput)
コード例 #5
0
def addPositives(derivation, paths, positives):
    "Add pillars output to positives."
    for path in paths:
        loopListsByPath = getLoopListsByPath(derivation, None, path)
        geometryOutput = triangle_mesh.getPillarsOutput(loopListsByPath)
        positives.append(geometryOutput)
コード例 #6
0
def addNegatives(derivation, negatives, paths):
    "Add pillars output to negatives."
    for path in paths:
        loopListsByPath = getLoopListsByPath(derivation, 1.000001, path)
        geometryOutput = triangle_mesh.getPillarsOutput(loopListsByPath)
        negatives.append(geometryOutput)