def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement): 'Get equated geometryOutput.' flippedGeometryOutput = triangle_mesh.getGeometryOutputCopy(geometryOutput) flip.flipPoints(matrix.getVertexes(flippedGeometryOutput), prefix, xmlElement) if flip.getShouldReverse(prefix, xmlElement): flippedFaces = face.getFaces(flippedGeometryOutput) for flippedFace in flippedFaces: flippedFace.vertexIndexes.reverse() return {'union' : {'shapes' : [flippedGeometryOutput, geometryOutput]}}
def addNegativeSphere(derivation, negatives, x): 'Add negative sphere at x.' radius = Vector3(derivation.radiusPlusClearance, derivation.radiusPlusClearance, derivation.radiusPlusClearance) sphereOutput = sphere.getGeometryOutput( radius, derivation.xmlElement.getCopyShallow()) euclidean.translateVector3Path(matrix.getVertexes(sphereOutput), Vector3(x, 0.0, derivation.demiheight)) negatives.append(sphereOutput)
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement): 'Get equated geometryOutput.' flippedGeometryOutput = triangle_mesh.getGeometryOutputCopy(geometryOutput) flip.flipPoints(matrix.getVertexes(flippedGeometryOutput), prefix, xmlElement) if flip.getShouldReverse(prefix, xmlElement): flippedFaces = face.getFaces(flippedGeometryOutput) for flippedFace in flippedFaces: flippedFace.vertexIndexes.reverse() return {'union': {'shapes': [flippedGeometryOutput, geometryOutput]}}
def getGeometryOutputByEndStart(endZ, inradiusComplex, sides, start, topOverBottom, xmlElement): 'Get cylinder triangle mesh by endZ, inradius and start.' inradius = Vector3(inradiusComplex.real, inradiusComplex.imag, 0.5 * abs(endZ - start.z)) cylinderOutput = getGeometryOutput(inradius, sides, topOverBottom, xmlElement) vertexes = matrix.getVertexes(cylinderOutput) if endZ < start.z: for vertex in vertexes: vertex.z = -vertex.z translation = Vector3(start.x, start.y, inradius.z + min(start.z, endZ)) euclidean.translateVector3Path(vertexes, translation) return cylinderOutput
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement): 'Get equated geometryOutput.' transformPoints(matrix.getVertexes(geometryOutput), prefix, xmlElement) return geometryOutput
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement): 'Get equated geometryOutput.' rotatePoints(matrix.getVertexes(geometryOutput), prefix, xmlElement) return geometryOutput
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement): "Get equated geometryOutput." scalePoints(matrix.getVertexes(geometryOutput), prefix, xmlElement) return geometryOutput
def addNegativeSphere(derivation, negatives, x): 'Add negative sphere at x.' radius = Vector3(derivation.radiusPlusClearance, derivation.radiusPlusClearance, derivation.radiusPlusClearance) sphereOutput = sphere.getGeometryOutput(radius, derivation.xmlElement.getCopyShallow()) euclidean.translateVector3Path(matrix.getVertexes(sphereOutput), Vector3(x, 0.0, derivation.demiheight)) negatives.append(sphereOutput)
def translateNegativesPositives(negatives, positives, translation): 'Translate the negatives and postives.' euclidean.translateVector3Path(matrix.getVertexes(negatives), translation) euclidean.translateVector3Path(matrix.getVertexes(positives), translation)