import bpy
import bmesh
obj = bpy.context.scene.objects.active
m = obj.data
bm = bmesh.new()
bm.from_mesh(m)
bm.verts.index_update()
verts = []
firstV = bm.verts[6]
secondV = bm.verts[12]
verts.append(firstV)
verts.append(secondV)
for v in bm.verts:
for e in v.link_edges:
vv = e.other_vert(v)
print(v.index, obj.matrix_world *v.co, vv.index)
def findGrandChild(v, vv):
for e in vv.link_edges:
vvv = e.other_vert(vv)
if vvv.index != v.index:
if vvv.index == firstV.index:
break
verts.append(vvv)
findGrandChild(vv, vvv)
findGrandChild(firstV, secondV)
for x in verts:
x.index
for x in verts:
print(x.index, obj.matrix_world * x.co)
for x in verts:
print(x.index, obj.matrix_world * x.normal)