- dist = []
- nbSlices = 50
- du = 1.0/nbSlices
- for i in range(nbSlices + 1):
- p = geompy.MakeVertexOnCurve(edge, du*i)
- d = geompy.MinDistance(p,pt)
- dist.append((d,i))
+ dist = list()
+ nb_slices = 50
+ delta = 1.0/float(nb_slices)
+ for i_aux in range(nb_slices + 1):
+ pti = geompy.MakeVertexOnCurve(edge, delta*float(i_aux))
+ dpti = geompy.MinDistance(pti,point)
+ dist.append((dpti,i_aux))