import mathutils import matplotlib.pyplot as plt import bpypolyskel verts = [ mathutils.Vector((4.969433784484863,1.9546908140182495,0.0)), mathutils.Vector((0.7886532545089722,-4.564602375030518,0.0)), mathutils.Vector((12.384053230285645,-12.00064754486084,0.0)), mathutils.Vector((16.673797607421875,-5.311416149139404,0.0)), mathutils.Vector((13.403173446655273,-3.2139952182769775,0.0)), mathutils.Vector((10.740840911865234,-7.365513324737549,0.0)), mathutils.Vector((5.342212200164795,-3.903414726257324,0.0)), mathutils.Vector((7.895577907562256,0.07817655056715012,0.0)), mathutils.Vector((4.969433784484863,1.9546908140182495,15.049558639526367)), mathutils.Vector((0.7886532545089722,-4.564602375030518,15.049558639526367)), mathutils.Vector((12.384053230285645,-12.00064754486084,15.049558639526367)), mathutils.Vector((16.673797607421875,-5.311416149139404,15.049558639526367)), mathutils.Vector((13.403173446655273,-3.2139952182769775,15.049558639526367)), mathutils.Vector((10.740840911865234,-7.365513324737549,15.049558639526367)), mathutils.Vector((5.342212200164795,-3.903414726257324,15.049558639526367)), mathutils.Vector((7.895577907562256,0.07817655056715012,15.049558639526367)) ] firstVertIndex = 8 numPolygonVerts = 8 faces = bpypolyskel.polygonize(verts, firstVertIndex, numPolygonVerts, None, 0.0, 0.5) fig = plt.figure() ax = fig.gca(projection='3d') for face in faces: for edge in zip(face, face[1:] + face[:1]): p1 = verts[edge[0]] p2 = verts[edge[1]] ax.plot([p1.x,p2.x],[p1.y,p2.y],[p1.z,p2.z]) plt.show()