1
$\begingroup$

When looping through the vertices of a polygon via polygon.vertices, does Blender guarantee that the order of the vertex indices is consecutive around the edge of the polygon?

ob = bpy.context.object
face = ob.data.polygons[0]
for v_ind in face.vertices:
    this_xyz = ob.data.vertices[v_ind]

And same question for the edges of a polygon.

They seem to be for the cases I have checked, but I have been unable to find this documented anywhere. Thanks in advance.

$\endgroup$
  • $\begingroup$ this might help? blender.stackexchange.com/questions/36577/… $\endgroup$ – Mike Pan Feb 16 '18 at 18:21
  • $\begingroup$ Thanks for the link. Unfortunately, I'm working in one of the ".. list too long.." situations. My many-sided polygons were generated via the boolean intersect modifier, but I can guarantee that they have not been modified since creation. In this case, can I count on Blender to have ordered the polygon vertex indices consecutively? $\endgroup$ – Animik Feb 16 '18 at 18:33
  • $\begingroup$ I am not sure. Hopefully someone else can chime in here. $\endgroup$ – Mike Pan Feb 16 '18 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.