Ejemplo n.º 1
0
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]}}
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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]}}
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement):
    'Get equated geometryOutput.'
    transformPoints(matrix.getVertexes(geometryOutput), prefix, xmlElement)
    return geometryOutput
Ejemplo n.º 7
0
def getManipulatedGeometryOutput(geometryOutput, prefix, xmlElement):
	'Get equated geometryOutput.'
	rotatePoints(matrix.getVertexes(geometryOutput), prefix, xmlElement)
	return geometryOutput
Ejemplo n.º 8
0
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)
Ejemplo n.º 10
0
def translateNegativesPositives(negatives, positives, translation):
    'Translate the negatives and postives.'
    euclidean.translateVector3Path(matrix.getVertexes(negatives), translation)
    euclidean.translateVector3Path(matrix.getVertexes(positives), translation)
Ejemplo n.º 11
0
def translateNegativesPositives(negatives, positives, translation):
	'Translate the negatives and postives.'
	euclidean.translateVector3Path(matrix.getVertexes(negatives), translation)
	euclidean.translateVector3Path(matrix.getVertexes(positives), translation)