Mesh topology/Neighborships

Hi,

I am planing to write an edge rendering script, which copies a mesh and deletes all edges from the copy which should not be drawn. This together with the wire material results in an edge rendering effect.

In order to decide which edges to delete, the script needs information on which faces of the mesh border the edge in question.

So my question is: Are there any utility functions for dealing with neighborship/topology questions like:

Given a face, which faces are adjacent?
Given an edge, which faces border it?

or is there a half/winged edge data structure available?

I trying to avoid reinventing the wheel, so I would be grateful to any pointers to existing solutions.

Thanks,
angerb

have a look in BPyMesh.py in scripts dir ./bpymodules/ - it has functions to get topology

Thanks, this is exactly what I was looking for.