Exemplo n.º 1
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)
Exemplo n.º 2
0
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}})
Exemplo n.º 3
0
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}})
Exemplo n.º 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)