def shade(self, stroke): fe = CF.get_selected_fedge() id1 = fe.first_svertex.id id2 = fe.second_svertex.id #print(id1.first, id1.second) #print(id2.first, id2.second) it = stroke.stroke_vertices_begin() found = True foundfirst = True foundsecond = False while not it.is_end: cp = it.object if cp.first_svertex.id == id1 or cp.second_svertex.id == id1: foundfirst = True if cp.first_svertex.id == id2 or cp.second_svertex.id == id2: foundsecond = True if foundfirst and foundsecond: found = True break it.increment() if found: print("The selected Stroke id is: ", stroke.id.first, stroke.id.second)
def shade(self, stroke): fe = CF.get_selected_fedge() id1 = fe.first_svertex.id id2 = fe.second_svertex.id #print(id1.first, id1.second) #print(id2.first, id2.second) it = stroke.stroke_vertices_begin() found = True foundfirst = True foundsecond = False while not it.is_end: cp = it.object if cp.first_svertex.id == id1 or cp.second_svertex.id == id1: foundfirst = True if cp.first_svertex.id == id2 or cp.second_svertex.id == id2: foundsecond = True if foundfirst and foundsecond: found = True break it.increment() if found: print("The selected Stroke id is: ", stroke.id.first, stroke.id.second)