def Curve_Leg1(R, A2, i, step, date): Angle = A2 / 180 * math.pi if (R < -abs(Xb)): R = -R q1 = math.atan(Yf / (R + Xf)) r1 = math.sqrt((R + Xf)**2 + (Yf)**2) x0 = r1 * math.cos(q1 + Angle / 2) - R y0 = r1 * math.sin(q1 + Angle / 2) z0 = Zf x1 = r1 * math.cos(q1 - Angle / 2) - R y1 = r1 * math.sin(q1 - Angle / 2) z1 = Zf stepcut.StepCut_Leg1(x0, y0, z0, x1, y1, z1, i, step, date) elif ((R > -abs(Xb)) and (R < 0)): R = -R La = math.sqrt((Xf + R)**2 + Yf**2) Lb = math.sqrt(Xf**2 + Yf**2) q1 = math.acos((R**2 + La**2 - Lb**2) / (2 * La * R)) x0 = La * math.cos(q1 + Angle / 2) - R y0 = La * math.sin(q1 + Angle / 2) z0 = Zf x1 = La * math.cos(q1 - Angle / 2) - R y1 = La * math.sin(q1 - Angle / 2) z1 = Zf stepcut.StepCut_Leg1(x0, y0, z0, x1, y1, z1, i, step, date) elif (R == 0): q1 = math.atan(Yf / Xf) r1 = math.sqrt(Yf**2 + Xf**2) x0 = r1 * math.cos(q1 + Angle / 2) y0 = r1 * math.sin(q1 + Angle / 2) z0 = Zf x1 = r1 * math.cos(q1 - Angle / 2) y1 = r1 * math.sin(q1 - Angle / 2) z1 = Zf stepcut.StepCut_Leg1(x0, y0, z0, x1, y1, z1, i, step, date) elif ((R > 0) and (R < abs(Xb))): La = math.sqrt((Xf - R)**2 + Yf**2) Lb = math.sqrt(Xf**2 + Yf**2) q1 = math.acos((R**2 + La**2 - Lb**2) / (2 * La * R)) x0 = -La * math.cos(q1 + Angle / 2) + R y0 = La * math.sin(q1 + Angle / 2) z0 = Zf x1 = -La * math.cos(q1 - Angle / 2) + R y1 = La * math.sin(q1 - Angle / 2) z1 = Zf stepcut.StepCut_Leg1(x0, y0, z0, x1, y1, z1, i, step, date) else: q1 = math.atan(Yf / (R - Xf)) r1 = math.sqrt((R - Xf)**2 + (Yf)**2) x0 = -r1 * math.cos(q1 + Angle / 2) + R y0 = r1 * math.sin(q1 + Angle / 2) z0 = Zf x1 = -r1 * math.cos(q1 - Angle / 2) + R y1 = r1 * math.sin(q1 - Angle / 2) z1 = Zf stepcut.StepCut_Leg1(x0, y0, z0, x1, y1, z1, i, step, date)
def shrinkage_Leg1(L,A1,i,step,date): Angle = A1/180*math.pi x0 = L/2*math.cos(Angle)+Xf y0 = L/2*math.sin(Angle)+Yf z0 = Zf x1 = -L/2*math.cos(Angle)+Xf y1 = -L/2*math.sin(Angle)+Yf z1 = Zf stepcut.StepCut_Leg1(x0,y0,z0,x1,y1,z1,i,step,date)
def straight_Leg1(L,A1,i,step,date): Angle = A1/180*math.pi x0 = L/2*math.cos(Angle)+Xa y0 = L/2*math.sin(Angle)+Ya z0 = Za x1 = -L/2*math.cos(Angle)+Xa y1 = -L/2*math.sin(Angle)+Ya z1 = Za stepcut.StepCut_Leg1(x0,y0,z0,x1,y1,z1,i,step,date)