1 """
2 Vertex of a triangle mesh.
3
4 """
5
6 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
7 from fabmetheus_utilities import xml_simple_reader
8
9
10 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
11 __credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
12 __date__ = '$Date: 2008/02/05 $'
13 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
14
15
17 "Add vertex elements to an xml element."
18 for vertex in vertexes:
19 vertexElement = getUnboundVertexElement(vertex)
20 vertexElement.parentNode = xmlElement
21 xmlElement.childNodes.append( vertexElement )
22
23 -def addVertexToAttributeDictionary(attributeDictionary, vertex):
24 "Add to the attribute dictionary."
25 if vertex.x != 0.0:
26 attributeDictionary['x'] = str(vertex.x)
27 if vertex.y != 0.0:
28 attributeDictionary['y'] = str(vertex.y)
29 if vertex.z != 0.0:
30 attributeDictionary['z'] = str(vertex.z)
31
38
42