The algorithm in the algorithm cannot be used for the arc of the end point line parallel to the X axis, because the denominator is (y2-y1) in the formula; the literature <2> clearly gives the two sets of center coordinates, but the author believes that Its trade-offs are more complicated. Because in the same case of R, the forward circle will affect the determination of the center coordinates; if the forward and backward directions of R and the circle are unchanged, the coordinates of the start and end points also affect the coordinates of the center of the circle. Therefore, the algorithm needs to make a trade-off according to the angle between G02, G03, +R, -R and the vector from the starting point to the end point and the coordinate axis.
To this end, this paper proposes a vector algorithm that uses the directionality of the vector to quickly and easily solve the center coordinates.
Vector Algorithm for 1R Programming As shown, the radius R of the circle, the starting point A (x1, y1) and the ending point B (x2, y2) are known. It can be seen that the center of the condition satisfies two O1 (X1, Y1) and O2 (X2, Y2). Connect AB and O1O2, the intersection coordinates are M(xm, ym), then: xm=x1+x2(1)ym=y1+y2|MO1|=|MO2|=R2-(x2-x1)2+( Y2-y1)24(2) The vector of the starting point A to B can be shown as: LAB=(x2-x1)i+(y2-y1)j(3) The factor that affects the coordinates of the arc center. The direction vector is lAB=x2- X1(x2-x1)2+(y2-y1)2i+y2-y1(x2-x1)2+(y2-y1)2j=lxi+lyj(4) The vectors of MO1 and MO2 can be respectively shown as: LMO1= (X1-xm)i+(Y1-ym)j(5)LMO2=(X2-xm)i+(Y2-ym)j(6) Determination of the center coordinates and the inversion of the arc (G02, G03), length ( The pros and cons and the positional relationship of the starting point are as shown.
The center of the circle arc of the rounded arc is good or bad. The end position is the position of the center of the circle LAB and LMO1 or LMO2. G02 inferior arc (a) or (e)O2 or O1LAB rotates clockwise 90 to LMO2 or LMO1G02 superior arc ( b) or (f)O1 or O2LAB counterclockwise rotation 90 to LMO1 or LMO2G03 inferior arc (c) or (g)O1 or O2LAB counterclockwise rotation 90 to LMO1 or LMO2G03 superior arc (d) or (h)O2 or O1LAB When the hour hand rotates 90 to LMO2 or LMO1, it can be seen that the inferior arc of the same G02 and the superior arc of G03 are the same center, and the LAB rotates clockwise 90 to the vector direction of its center; the superior arc of G02 and G03 The inferior arc is the same center, and the LAB rotates 90 counterclockwise to the vector direction of its center, regardless of the position of the starting point.
Therefore, the solution of the center of the R programming format can be attributed to solving the problem of the inferior arc of G02 and the center of the superior arc of G02.
If the arc AB is the inferior arc of G02 ((a)), its center is O2. At this time, the LAB rotates clockwise to LMO2. Since LABLMO2=0, the direction vector of the vector MO2 is: lMO2=lyi+(-lx) The coordinates of the center 0 of the j can be calculated: X2=xm+|MO2|lyY2=ym+|MO2|(-lx)(7) If the arc AB is the superior arc of G02 ((b)), its center is O1, at this time , LAB rotates counterclockwise to LMO1, so the direction vector of vector MO1 is: lMO1=(-ly)i+lxj(8) Coordinate of center O1: X1=xm+|MO1|(-ly)Y1=ym+|MO1|lx (9) The above analysis is for the case of (a)(d), and for the case of (e)(h), the subscript of the corresponding center coordinate is only slightly modified. Circular interpolation is a plane curve interpolation. For the YOZ and XOZ planes of the Cartesian coordinate system, it is sufficient to perform the corresponding coordinate transformation.
Conclusion (1) The factors affecting the position of the center of the circle are reduced to two cases, which simplify the calculation and programming. The program is reduced from the original 60 lines to 21 lines. (2) The determined center coordinates are given by the vector method. The choice of the center of the circle is used to reduce the amount of calculation; (3) the accumulation and propagation of errors are reduced in the calculation, and the calculation accuracy is improved; (4) In the formula of this paper, the denominator appears as (x2-x1)2+(y2) -y1)2, so it can be used for the arc of the end point connection with the X-axis or the Y-axis at any angle, which makes up for the shortcomings in the literature <1>.
(Finish)
Feed Screw Barrel,Screw And Barrel For Injection Molding Machine,Feed Screw Barrel For Sale,Screw Barrel For Sale
Zhoushan Qunying Plastic Machinery Manufactory , https://www.qunying-screw.com