def main2(): global handles polynomial_spline.set_handles(handles, env) #env.SetViewer('qtcoin') yR, yL, Q = main() handles = plotPoints(yL, handles, array((0, 0, 0))) handles = plotPoints(yR, handles, array((0, 0, 0))) P0 = yL[-1] Rn = nextLine(P0) Rn += 33 * 0.003 Pd, Qd = meridian2(P0, Rn, 1, Q[0]) yM = getPointsfromQ(Qd) yR2, yL2, Q2 = drawParallel(Pd, Qd[-1], -1) handles = plotPoints(yM, handles, array((0, 0, 0))) handles = plotPoints(yL2, handles, array((0, 0, 0))) handles = plotPoints(yR2, handles, array((0, 0, 0))) P0 = yR2[-1] Rn = nextLine(P0) Rn += 33 * 0.003 Pd, Qd = meridian2(P0, Rn, 1, Q[-1]) yM = getPointsfromQ(Qd) yR3, yL3, Q3 = drawParallel(Pd, Qd[-1], 1) handles = plotPoints(yM, handles, array((0, 0, 0))) handles = plotPoints(yL3, handles, array((0, 0, 0))) handles = plotPoints(yR3, handles, array((0, 0, 0))) return yR3, yL3, Q3, yR2, yL2, Q2, yR, yL, Q
def main(): QALL = [] global handles global Rn polynomial_spline.set_handles(handles,env) env.SetViewer('qtcoin') Pd, q0 = initialPoint() sign = 1 q0=q0[0][0] robot.SetDOFValues(q0,ikmodel.manip.GetArmIndices()) manipulabilityNUM = coating.manipulabilityDET(manip) for i in range(0,loops): yR, yL, Q = drawParallel(Pd,q0,sign) if sign==1: P0=yL[-1] qi=Q[0] else: P0=yR[-1] qi=Q[-1] QALL.extend(Q) Rn+=loopdistance*0.003 Pd, Qd=meridian2(P0,1,qi) yM = getPointsfromQ(Qd) QALL.extend(Qd) handles=plotPoints(yM, handles,array((1,0,0))) sign*=-1 q0=Qd[-1] return QALL
def main3(): QALL = [] global handles polynomial_spline.set_handles(handles, env) env.SetViewer('qtcoin') Pd, q0 = initialPoint() sign = 1 q0 = q0[0][0] robot.SetDOFValues(q0, ikmodel.manip.GetArmIndices()) manipulabilityNUM = coating.manipulabilityDET(manip) for i in range(0, loops): yR, yL, Q = drawParallel(Pd, q0, sign) if sign == 1: P0 = yL[-1] qi = Q[0] else: P0 = yR[-1] qi = Q[-1] QALL.extend(Q) Rn = nextLine(P0) Rn += loopdistance * 0.003 Pd, Qd = meridian2(P0, Rn, 1, qi) yM = getPointsfromQ(Qd) QALL.extend(Qd) #handles=plotPoints(yL, handles,array((1,0,0))) #handles=plotPoints(yR, handles,array((1,0,0))) handles = plotPoints(yM, handles, array((1, 0, 0))) sign *= -1 q0 = Qd[-1] return QALL
def main2(): global handles polynomial_spline.set_handles(handles,env) #env.SetViewer('qtcoin') yR, yL, Q = main() handles=plotPoints(yL, handles,array((0,0,0))) handles=plotPoints(yR, handles,array((0,0,0))) P0=yL[-1] Rn=nextLine(P0) Rn+=33*0.003 Pd, Qd=meridian2(P0,Rn,1,Q[0]) yM = getPointsfromQ(Qd) yR2, yL2, Q2 = drawParallel(Pd,Qd[-1],-1) handles=plotPoints(yM, handles,array((0,0,0))) handles=plotPoints(yL2, handles,array((0,0,0))) handles=plotPoints(yR2, handles,array((0,0,0))) P0=yR2[-1] Rn=nextLine(P0) Rn+=33*0.003 Pd, Qd=meridian2(P0,Rn,1,Q[-1]) yM = getPointsfromQ(Qd) yR3, yL3, Q3 = drawParallel(Pd,Qd[-1],1) handles=plotPoints(yM, handles,array((0,0,0))) handles=plotPoints(yL3, handles,array((0,0,0))) handles=plotPoints(yR3, handles,array((0,0,0))) return yR3, yL3, Q3,yR2, yL2, Q2, yR, yL, Q