I am using the LoopTools addon to loft a surface between two or more curves. (It is very useful, thank you!) However, I occasionally run into cases where the tool does not recognize when a face being added is actually a triangle and not a quad, and therefore errors when faces.new() is given a set including a repeat vertex. In the code I see that the triangle check (under the “eekadoodle prevention”) is only checking if vertex #3 == vertex #4, and not all possible combinations of vertices.
I can fix the problem in the code by removing all duplicates in the list of vertices that will define the face, changing lines 1391-1392 of mesh_looptools.py from
if faces[i][-1] == faces[i][-2]:
faces[i] = faces[i][:-1]
to
if sorted(faces[i]) != sorted(list(set(faces[i]))):
faces[i] = list(set(faces[i]))
My question is: is it possible that the data I am providing is not formatted correctly, and that I can therefore fix this problem on my end? If so, what is happening here? I have only observed the error at the triangles that are created at the endpoints of curves. (I am developing an addon, so requiring users to modify a Blender-standard addon is non-ideal.)
Thanks in advance for your help.