Saturday, October 03, 2015

Defining a Line in an APT programming:


As we understand in the other post to Defining a point in using APT program, Now we can learn to define a line, In NC Programming Line Can be defined in G-code by G01 X_ Y_ Z_, but behind the screen There are many ways of defining the line in an APT Programming,such as through point and parallel to another line, through point and perpendicular to another line etc... 
APT Programming is the back bone of CNC Programming, How ever the Aptsource is defined in many ways for a line the G-Code output after post-processing will be the same in X,Y,Z Coordinates. Below is the example for a Aptsource and the G-code.

Aptsource Code; L1=LINE/5,7,10,4
G-code; G01 X5 Y7;
                      X10 Y4;

The geometry statement for defining a Line is L1 =LINE/P1, P2. So this command creates a line using 2 points. So when u are defining a LINE command you must know the exact points it is passing through or these are the start and end points of a line. In CNC Machining The LINE command is mainly used to the cutting material in the linear motions or the straight cut.


Examples for the Line definition in APT programming:
The following figures show the different ways of defining the LINE and the APT Source codes, through there are many ways to draw a line i tried to explain some of the ways to create the lines and their Aptsource codes. these are the basic knowledge of Drawing lines.




Through Two Points:
If you have two defined points in space, line can be drawn through  the points.

Aptsource Code:
L1=LINE/P1,P2.





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


Using Coordinates of two points:
If you have a co-ordinates of two points, you can draw a points in the space, A line can be drawn by joining the points.

Aptsource Code:
L1=LINE/5,7,10,4








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





Through a point and parallel to another line;
A line L1 can also be drawn parallel with a existing line L2 and Through a point P1,

Aptsource Code:
L1=LINE/P1, PARLEL,L2







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



Through a point and Perpendicular to another line;
A line L1 can also be drawn Perpendicular with a existing line L2 and Through a point P1,

Aptsource Code:
L1=LINE/P1,PERPTO,L2







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


A Parallel line and a distance;
A line L1 can also be drawn parallel with a existing line L2 and Through a distance value,

Aptsource Code:
For Line 1
L1=LINE/PARLEL,L2, XSMALL,3.50
                    OR
L1=LINE/PARLEL,L2, YLARGE,3.50

For Line 2
L2=LINE/PARLEL,L1, XSMALL,3.50
                    OR
L2=LINE/PARLEL,L1, YLARGE,3.50



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




Through a point and at an angle with X, Y or Z axis:
A line L1 can also be drawn Giving an angle With Respective X, Y and Z axis through an existing point P1,

Aptsource Code:
L1=LINE/P1,ATANGL,30









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





Through a point and tangent to a circle:
Through a point P1, if you want to drawn a line tangent to a circle, there are two possibility of drawing a line as shown in the left drawing.

Aptsource Code:
L1=LINE/P1,LEFT,TANTO, C1
                    OR
L2=LINE/P1,RIGHT,TANTO, C1





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

 Tangent to two circles:
There are Four possibility of drawing   a line using 2 circles. the drawing shows the possibility of drawing L1, L2, L3 and L4  Using Circles C1 and C2.

Aptsource Code:
L1=LINE/RIGHT,TANTO, C2,LEFT,TANTO,C1
                              OR
L1=LINE/RIGHT,TANTO, C1,LEFT,TANTO,C2
----------------------------------------------------
L2=LINE/LEFT,TANTO, C1,LEFT,TANTO,C2
                              OR
L2=LINE/RIGHT,TANTO, C2,RIGHT,TANTO,C1
----------------------------------------------------
L3=LINE/RIGHT,TANTO, C1,RIGHT,TANTO,C2
                              OR
L3=LINE/LEFT,TANTO, C2,LEFT,TANTO,C1
----------------------------------------------------
L4=LINE/LEFT,TANTO, C2,RIGHT,TANTO,C1
                              OR
L3=LINE/LEFT,TANTO, C1,RIGHT,TANTO,C2



6 comments:

  1. You writing is always fabulous. This is third time I’ve read your blog and I find the information very useful.
    colored glass filters

    ReplyDelete
  2. This is something I was searching for many days. My thirst has been quenched now after reading your article.I am highly thankful to you for writing this article. Glass Cutting Service By Valley Design.

    ReplyDelete
  3. I was very impressed by your article. I hope others feel the same and you continue to share your knowledge with us. Colored Optical Glass Filters.

    ReplyDelete
  4. Your take on the subject is wonderful. I agree with your opinion. Hope to read more on this topic to increase my knowledge in this field. ALN CNC Machining Services By Valley Design.

    ReplyDelete
  5. Thank you so much for the APT explanation :)

    ReplyDelete
  6. I’ve always wanted to read on this subject. I truly appreciate your wonderful contribution. I’d like to read more from your blog site. Glass Lapping and Polishing Services for All Materials.

    ReplyDelete