edges.new - Edges Not Adding Correctly (black not solid orange) I'm using a python script to create edges.

For some reason, my script is recognizing some edges, displayed in solid orange.
Others are not recognized the same and are displayed in black.
(see image)



When I manually select two of the verticies on a black line and hit f the edge is added correctly and displays orange. This is specifically a problem because I cannot face-->fill the shape until all the edges are displaying as orange.

I'm adding the edges like this:


class Graphics:

    def __init__(self,bm):

    def drawLoop(self, bm, lines):
        for i in lines:
            self.drawLine(bm, i.p1tuple(),i.p2tuple())


    def drawLine(self, bm, tup1, tup2):
        v1 = bm.verts.new(tup1)
        v2 = bm.verts.new(tup2)
        bm.edges.new((v1, v2))


My Main is like this:

import bpy
import bmesh
import sys

obj = bpy.context.object
me = obj.data
bm = bmesh.from_edit_mesh(me)

graphics = Graphics(bm)


bmesh.update_edit_mesh(obj.data)
Look like you are creating 2 new vertices per line, that's creating disjointed segments. Instead, just create a new vertex, then the new edge between the previous vertex and the new one, etc...