예제 #1
0
파일: extrude.py 프로젝트: Spacexula/SFACT
def getGeometryOutputByNegativesPositives(negatives, positives, xmlElement):
	'Get triangle mesh from derivation, negatives, positives and xmlElement.'
	positiveOutput = triangle_mesh.getUnifiedOutput(positives)
	if len(negatives) < 1:
		return solid.getGeometryOutputByManipulation(positiveOutput, xmlElement)
	if len(positives) < 1:
		negativeOutput = triangle_mesh.getUnifiedOutput(negatives)
		return solid.getGeometryOutputByManipulation(negativeOutput, xmlElement)
	return solid.getGeometryOutputByManipulation({'difference' : {'shapes' : [positiveOutput] + negatives}}, xmlElement)
예제 #2
0
파일: extrude.py 프로젝트: 3DNogi/SFACT
def getGeometryOutputByNegativesPositives(elementNode, negatives, positives):
	'Get triangle mesh from elementNode, negatives and positives.'
	positiveOutput = triangle_mesh.getUnifiedOutput(positives)
	if len(negatives) < 1:
		return solid.getGeometryOutputByManipulation(elementNode, positiveOutput)
	if len(positives) < 1:
		negativeOutput = triangle_mesh.getUnifiedOutput(negatives)
		return solid.getGeometryOutputByManipulation(elementNode, negativeOutput)
	return solid.getGeometryOutputByManipulation(elementNode, {'difference' : {'shapes' : [positiveOutput] + negatives}})
예제 #3
0
파일: extrude.py 프로젝트: folksjos/RepG
def getGeometryOutputByNegativesPositives(elementNode, negatives, positives):
	'Get triangle mesh from elementNode, negatives and positives.'
	positiveOutput = triangle_mesh.getUnifiedOutput(positives)
	if len(negatives) < 1:
		return solid.getGeometryOutputByManipulation(elementNode, positiveOutput)
	if len(positives) < 1:
		negativeOutput = triangle_mesh.getUnifiedOutput(negatives)
		return solid.getGeometryOutputByManipulation(elementNode, negativeOutput)
	return solid.getGeometryOutputByManipulation(elementNode, {'difference' : {'shapes' : [positiveOutput] + negatives}})
예제 #4
0
def getGeometryOutputByNegativesPositives(negatives, positives, xmlElement):
    'Get triangle mesh from derivation, negatives, positives and xmlElement.'
    positiveOutput = triangle_mesh.getUnifiedOutput(positives)
    if len(negatives) < 1:
        return solid.getGeometryOutputByManipulation(positiveOutput,
                                                     xmlElement)
    if len(positives) < 1:
        negativeOutput = triangle_mesh.getUnifiedOutput(negatives)
        return solid.getGeometryOutputByManipulation(negativeOutput,
                                                     xmlElement)
    return solid.getGeometryOutputByManipulation(
        {'difference': {
            'shapes': [positiveOutput] + negatives
        }}, xmlElement)