so the way ofPath creates a mesh for a shape is by using vertices but also indices, i didn't realized about that when i posted my example. there's ways to do it by using ofPath but also using a polyline will work.
also take a look at this tutorial which explains all the basics of how the different objects that you are trying to use here work: