<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Are there any plans to add a "face.index" attribute 
to python? </FONT><FONT face=Arial size=2>If not - take this as a proposal 
;-)</FONT></DIV>
<DIV><FONT face=Arial size=2>My question is because i've come across this 
problem when writing some functions for computational geometry (like 
computing convex hulls and voronoi diagrams):</FONT></DIV>
<DIV><FONT face=Arial size=2>For these algorithms you have 
to maintain lots of information for vertices and/or faces - like 
adjacent faces, common edges, common vertices, ...</FONT></DIV>
<DIV><FONT face=Arial size=2>Usually i store information like this in lists 
or dictionaries.</FONT></DIV>
<DIV><FONT face=Arial size=2>- Storing a vertex in a list or as key inside a 
dict is easy - simply take the vertex.index as key and store any information you 
need as values. </FONT></DIV>
<DIV><FONT face=Arial size=2>  Then you can do any processing on 
the lists/dictionaries and when you're done you can access the 
'real' vertex of the mesh again - it's mesh.verts[index].</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>- Unfortunately there's no such thing for faces. 
Sure you can use a tuple of the vertex indices that make up the face 
as key. This works fine. But if you want to access the 'real' face again 
you've got a problem...</FONT></DIV>
<DIV><FONT face=Arial size=2>  Wouldn't it be nice if we could have a 
face.index attribute as well? This could be used as key in dictionaries and you 
could later access the face again with mesh.faces[index].</FONT></DIV>
<DIV><FONT face=Arial size=2>  </FONT></DIV>
<DIV><FONT face=Arial size=2>This would also make processing information for 
faces and vertices more consistent.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any thoughts or comments on this?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Greetings,</FONT></DIV>
<DIV><FONT face=Arial size=2>    Michael 
Schardt</FONT></DIV></BODY></HTML>