[Bf-python] face.index?

Gert De Roost paleajed at yahoo.com
Thu Mar 17 21:47:16 CET 2005


And edge.index too, pretty please ?


--- Michael Schardt <M.Schardt at web.de> wrote:

> Hello!
> 
> Are there any plans to add a "face.index" attribute
> to python? If not - take this as a proposal ;-)
> My question is because i've come across this problem
> when writing some functions for computational
> geometry (like computing convex hulls and voronoi
> diagrams):
> For these algorithms you have to maintain lots of
> information for vertices and/or faces - like
> adjacent faces, common edges, common vertices, ...
> Usually i store information like this in lists or
> dictionaries.
> - 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. 
>   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].
> 
> - 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...
>   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].
>   
> This would also make processing information for
> faces and vertices more consistent.
> 
> Any thoughts or comments on this?
> 
> Greetings,
>     Michael Schardt>
_______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-python
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 



More information about the Bf-python mailing list