Example #1
0
def processXMLElement(xmlElement):
    "Process the xml element."
    target = evaluate.getXMLElementByKey('target', xmlElement)
    if target == None:
        print('Warning, array could not get target for:')
        print(xmlElement)
        return
    vertexes = getVertexesByKey('vertexes', xmlElement)
    if len(vertexes) == 0:
        print('Warning, array could not get vertexes for:')
        print(xmlElement)
        return
    arrayDictionary = xmlElement.attributeDictionary.copy()
    targetMatrixCopy = matrix.getFromObjectOrXMLElement(target)
    matrix.setAttributeDictionaryToMatrix(target.attributeDictionary,
                                          targetMatrixCopy)
    xmlElement.className = 'group'
    for vector3Index in xrange(len(vertexes)):
        vector3 = vertexes[vector3Index]
        vector3Matrix = matrix.Matrix(targetMatrixCopy.tetragrid)
        lastChild = target.getCopy(xmlElement.getIDSuffix(vector3Index),
                                   xmlElement)
        euclidean.overwriteDictionary(xmlElement.attributeDictionary, ['id'],
                                      ['visible'],
                                      lastChild.attributeDictionary)
        vertexElement = vertex.getUnboundVertexElement(vector3)
        matrix.setXMLElementDictionaryToOtherElementDictionary(
            vertexElement, vector3Matrix, 'matrix.', lastChild)
    xmlElement.getXMLProcessor().processXMLElement(xmlElement)
Example #2
0
def processXMLElement(xmlElement):
	"Process the xml element."
	target = evaluate.getXMLElementByKey('target', xmlElement )
	if target == None:
		print('Warning, copy could not get target.')
		return
	translateDictionary = xmlElement.attributeDictionary.copy()
	targetMatrixCopy = matrix.getFromObjectOrXMLElement(target)
	xmlElement.attributeDictionary = target.attributeDictionary.copy()
	matrix.setAttributeDictionaryToMatrix( target.attributeDictionary, targetMatrixCopy )
	euclidean.overwriteDictionary( translateDictionary, [], ['visible'], xmlElement.attributeDictionary )
	xmlElement.className = target.className
	matrix.setXMLElementDictionaryToOtherElementDictionary( xmlElement, targetMatrixCopy, 'matrix.', xmlElement )
	target.copyXMLChildren( xmlElement.getIDSuffix(), xmlElement )
	xmlElement.getXMLProcessor().processXMLElement(xmlElement)
Example #3
0
def processXMLElement(xmlElement):
    "Process the xml element."
    target = evaluate.getXMLElementByKey('target', xmlElement)
    if target == None:
        print('Warning, copy could not get target.')
        return
    translateDictionary = xmlElement.attributeDictionary.copy()
    targetMatrixCopy = matrix.getFromObjectOrXMLElement(target)
    xmlElement.attributeDictionary = target.attributeDictionary.copy()
    matrix.setAttributeDictionaryToMatrix(target.attributeDictionary,
                                          targetMatrixCopy)
    euclidean.overwriteDictionary(translateDictionary, [], ['visible'],
                                  xmlElement.attributeDictionary)
    xmlElement.className = target.className
    matrix.setXMLElementDictionaryToOtherElementDictionary(
        xmlElement, targetMatrixCopy, 'matrix.', xmlElement)
    target.copyXMLChildren(xmlElement.getIDSuffix(), xmlElement)
    xmlElement.getXMLProcessor().processXMLElement(xmlElement)
Example #4
0
def processXMLElement(xmlElement):
	"Process the xml element."
	target = evaluate.getXMLElementByKey('target', xmlElement)
	if target == None:
		print('Warning, array could not get target for:')
		print(xmlElement)
		return
	vertexes = getVertexesByKey('vertexes', xmlElement)
	if len(vertexes) == 0:
		print('Warning, array could not get vertexes for:')
		print(xmlElement)
		return
	arrayDictionary = xmlElement.attributeDictionary.copy()
	targetMatrixCopy = matrix.getFromObjectOrXMLElement(target)
	matrix.setAttributeDictionaryToMatrix(target.attributeDictionary, targetMatrixCopy)
	xmlElement.className = 'group'
	for vector3Index in xrange(len(vertexes)):
		vector3 = vertexes[vector3Index]
		vector3Matrix = matrix.Matrix(targetMatrixCopy.matrixTetragrid)
		lastChild = target.getCopy(xmlElement.getIDSuffix(vector3Index), xmlElement)
		euclidean.overwriteDictionary(xmlElement.attributeDictionary, ['id'], ['visible'], lastChild.attributeDictionary)
		vertexElement = vertex.getUnboundVertexElement(vector3)
		matrix.setXMLElementDictionaryToOtherElementDictionary(vertexElement, vector3Matrix, 'matrix.', lastChild)
	xmlElement.getXMLProcessor().processXMLElement(xmlElement)