Point and Edges based on Armature Hierarchy
On the face of it (no pun intended), this should be reasonably simple to do. Your script would basically go through the following steps:


Create an empty mesh object
Loop through every bone in the armature. For each bone:

Place a vertex at the bone tip and one at the bone root
Connect an edge between those two vertices

Execute a Remove Doubles operator to remove any vertices that are in the same location as one another (thereby also chaining your edges together.


Wrap that process in its own operator and you're good to go. That's pretty much it. Is there a specific part of that process that you're having difficulty with?