Search This Blog

Thursday, October 08, 2015

Defining a Circle in an APT programming


In an Apt programming the geometry statement for defining a CIRCLE is very easy, as said before the APT programmer as kept everything close to English words.  The statement for circle can be written as C1 =CIRCLE/P1, R. So this command creates a Circle using a point and radius defined around it. . So when u are defining a CIRCLE command you must know the exact center point and the radius around it. The CIRCLE command is mainly used to the cutting material in the Circular motions or removing the material in the holes, the output gcode will be G02 for clockwise circular interpolation and the G03 for the anticlockwise interpolation. though the gcode is simple the background apt code will defer with respect to the arc or the circle.

Examples for the CIRCLE (C1) definition in APT programming:

There are many ways of defining the CIRCLE in an APT Programming, The following figures show the different ways of defining the CIRCLE in an APT programming


Center of the circle and the radius:
The circle can be drawn by knowing the center point and the radius of the circle. P1 is the center point from the X5 and Y6 from the origin point of the coordinates and R is the radius. this is the simple circle we draw commonly. 



Aptsource Code:
C1=CIRCLE/5,6,2
          OR
C1=CIRCLE/5,6,0,2 (Where 0=Z-axis)
          OR
C1=CIRCLE/CENTER,P1,RADIUS,2







----------------------------------------------------------------------------------------------------

Center of the circle and a tangent line:
The circle can be drawn by knowing the center point and using a line passing through tangent of the circle, here the center of the circle is fixed and the line is fixed, so the circle will be created using P1 as the center and the other end is joined to the tangent line to make the circle.


Aptsource Code:
C1=CIRCLE/CENTER,P1,TANTO,L1











----------------------------------------------------------------------------------------------------


Center of the circle and a point on the circumference:
The circle can be drawn by knowing the center point P1 and using another point P2 as the distance for the radius of the circle. In any space two point is enough to draw a circle. so the aptsource code can be written as shown as below, after drawing the circle the aptsource code takes the X and Y coordinates of P1 and P2 from the origin point and prepares the code.





Aptsource Code:
C1=CIRCLE/CENTER,P1,P2












----------------------------------------------------------------------------------------------------


Circle using three points:
The circle can be drawn by using the three points in a space, P1, P2 and P3 are the points in the space, so the curve moving the points makes a circle C1. however the aptsource code says the circle is formed using three points, the gcode generates the circle with the start point given and goes clock wise or anticlockwise to form a circle giving X,Y coordinate and I,J as the radius of the curve movement.



Aptsource Code:
C1=CIRCLE/P1, P2,P3













----------------------------------------------------------------------------------------------------


The center and a tangent circle:
The below drawing shows the two possibility of drawing a circle, If you have a point P1 and a circle C1, You can draw a circle C2 using point P1 as the center and the C1 circle circumference as tangent. Same way to draw a circle C3 you can use P1 as a center and the C2 circle circumference as tangent. the aptsource code can be written as shown.



Aptsource Code:
C1=CIRCLE/CENTER,P1,
SMALL,TANTO,C2
                OR
C3=CIRCLE/CENTER,P1,
LARGE,TANTO,C2








----------------------------------------------------------------------------------------------------


Center of the circle and a tangent to another circle:
If you have a center point P1, and Circle C2 in a space, you can draw a circle with two possibilities.
Circle C1 Can be drawn using center point P1 and the tangent to lower circumference of the Circle C2 and circle C3 can be drawn using center point P1 and the Tangent to the upper circumference of the circle. the aptsource code can be written to circle C1 and C3 is as shown below.


C1=CIRCLE/CENTER,P1,
SMALL,TANTO,C2
                OR
C3=CIRCLE/CENTER,P1,
LARGE,TANTO,C2







----------------------------------------------------------------------------------------------------


Known radius and the two intersecting lines:
The circle can be drawn by known radius and the two intersecting lines in the space, there are four corner while the line intersects, by using the known radius R we can draw circle tangent to each corners, we can draw for possible circles C1, C2, C3 and C4. the apt source for this code can be written a shown below,




Aptsource Code:
C1=CIRCLE/XLARGE,L2,
YSMALL,L1,RADIUS,.75
                  OR
C2=CIRCLE/XLARGE,L2,
YLARGE,L1,RADIUS,.75
                   OR
C3=CIRCLE/XSMALL,L2,
YLARGE,L1,RADIUS,.75
                    OR
C4=CIRCLE/XSMALL,L2,
YSMALL,L1,RADIUS,.75

The modifiers XLARGE, etc., are used to indicate which of the four circles is wanted.

----------------------------------------------------------------------------------------------------


Known radius and tangent to the line with the given radius:
If we have a known radius, a point and a tangent line in a space, the circles can be drawn in two possibilities. if the given point is P1, then the circle C1 and C2 can be drawn tangent to L1 passing through P1 in two possibilities as shown in below drawing. If the given point is P2 and it lies on the line, then the circle can be drawn in two possibilities as the circle passes through the point and the tangent to the line as shown in the below diagram. the aptsource for the circles C1,C2, C3 and C4 can be written as below: 


Aptsource Code:
C1=CIRCLE/TANTO,L1,
XSMALL,P1,RADIUS,.5
              OR
C2=CIRCLE/TANTO,L1,
XLARGE,P1,RADIUS,.5

If the point lies on the line then the apt program can be written as below,

C3=CIRCLE/TANTO,L1,
YLARGE,P2,RADIUS,.5
             OR
C4=CIRCLE/TANTO,L1,
YSMALL,P2,RADIUS,.5


----------------------------------------------------------------------------------------------------
I have explained some of the examples of drawing a circles, we can draw the circle in many ways in a space. now a days we you the computer software to calculate and generate the aptsource codes, computer software make the life easy. 

Enjoy learning cnc programming and Apt programming.

5 comments: