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)
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}})
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)