Upload
pritish-mohan
View
50
Download
23
Tags:
Embed Size (px)
DESCRIPTION
apt programming intro
Citation preview
APT or Automatically Programmed Tool is a high-level computer programming language used to generate
instructions for numerically controlled machine tools. Douglas T. Ross is considered by many to be the
father of APT. APT is a language and system that makes numerically controlled manufacturing possible.
This
early language was used widely into the 1970s and is still a standard internationally.
APT is used to program CNC machine tools to create complex parts using a cutting tool moving in space. It
is used to calculate a point-to-point path that a tool must follow to generate a desired form. APT is a CAM
system based on a special-purpose language. It was created and refined during the late 1950s and early
1960s to simplify the task of calculating geometry points that a tool must traverse in space to cut the
increasingly complex parts required in the aerospace industry. It was a direct result of the new CNC
technology becoming available at that time, and the daunting task that a machinist or engineer faced
calculating the movements of the CNC for the complex parts for which it was capable. APT was created
before graphical interfaces were available, and so it relies on text to specify the geometry and toolpaths
needed to machine a part.
APT shares many similarities to computer programming languages like Fortran. A general-purpose
computer
language takes source text and converts the statements to instructions that can operate the internals of a
computer. APT converts source statements into programs for numerically- or computer-controlled machine
tools. Typically, this is a text file that contains CNC-vendor dependent commands to generate tool motions
and machine states. Most commonly, this is some form of G-code.
Chapter 1. Language and Syntax
The input to the APT processor is a part program that is a collection of APT statements set forth in an
ordered fashion. APT statements are used for the following purposes:
To define a scalar or geometric quantity.
To describe a cutter path.
To describe auxiliary machine tool functions.
To define machining parameters.
These statements are typed into an editor and saved as a plain-text ASCII file, which is the input to the APT
processor. Columns 1 through 72, inclusively, contain information pertinent to the part programming text,
while columns 73 to 80 are reserved for sequence and/or identification purposes. Blank columns are ignored
by the processor, so blanks can be used to make the text more readable.
1.1. Elements of the APT Language
Each statement is made up of one or more of the following elements (expressed according to set rules of
syntax):
Punctuation
Vocabulary Words
Numbers
Symbols, including Labels
1.1.1. Punctuation
Punctuation for the APT language includes the comma, slash, asterisk, double asterisk, plus, minus, single
dollar, double dollar, equal, period and parentheses [, / * ** + - $ $$ = . ( )]. This punctuation is used to
separate individual words and elements of the source statements used in the APT language and to indicate
arithmetic operations. The APT processor will automatically accept either BCD or EBCDIC characters.
(ASCII for apt360)
The Comma (,)
Used to separate elements of a statement where no other punctuation is appropriate.
MACHIN/ BENDIX, 2, CURCUL
TLLFT, GOLFT/ L1, TO, l2
The Slash (/)
Used either to separate major elements of a statement or as the arithmetic operator, divide, in a
compute statement.
GOLFT/ L1, PAST, C3
A = B / D
The Asterisk (*)
Used as the arithmetic operator multiply.
A = B * C
The Double Asterisk (**)
Used as the arithmetic operator exponentiation. The example below means A=BC.
A = B ** C
The Plus Sign (+)
Used either to indicate arithmetic addition or to specify a signed number. In specifying signed
numbers, plus is assumed if no sign appears.
A = B + C
D = E + F * (+2) * G
P = POINT/ +1, +2, +3
The Minus Sign (-)
Used either to indicate arithmetic subtraction or to specify a signed number.
A = B - C
D = E + F * (-2) * G
P = POINT/ -1, -2, -3
The Single Dollar Sign ($)
Used to indicate the end of a line and to indicate to the processor that the APT statement is continued
on the next line. Any information appearing to the right of the dollar sign is treated as commentary;
that is, the full line is printed out as input translation time, but the information to the right of the
dollar sign is ignored by the rest of the processor.
P1 = PLANE/ PARLEL, PL1, $ clearance
XLARGE, 6.9
A = B * C $ continued on the next line
- D + G
The Double Dollar Sign ($$)
This sign is optional; it's use indicates the end of a part program statement before the end of the 72
column data field. The information to the right of the double dollar sign is to be treated as
commentary. Absence of either a single or double dollar sign causes a part program statement to be
discontinued at the end of the 72-column data field.
CUTTER/ 1, .25 $$ Filleted end mill
The Equal Sign (=)
This sign is used as follows:
$$ To assign a name to a geometric surface or macro.
$$ (This name could be used as a variable later in the source program.)
PT1 = POINT/ X, Y, Z
MAC1 = MACRO/ A, B, C
$$ To assign a value to a scalar variable.
A = B + C
$$ To assign a variable to a macro variable.
CALL/ MAC1, ALPHA1 = 4., ALPHA2 = B
MAC1 = MACRO/ A1 = B, C, D
The Period (Decimal Point) (.)
Used to separate the integral from the fractional part of a number.
4.62
2.
1.23
.005
The Left and Right Parentheses [()]
Used as follows:
$$ To enclose the arguments of an arithmetic function
A = COSF(B)
$$ To enclose subscripts of a variable
A(J) = B(2) + G
$$ To enclose the arithmetic argument of the arithmetic IF statement
IF(A - B * C) 12, 13, 14
$$ To enclose nested definitions
GO/ (L1 = LINE/ X1, Y1, X2, Y2), L3
$$ To enclose any parenthetical expression or related list of objects
A = B * (-3) + c
$$ Right parenthesis -- to separate statement label from the statement
A4) K = 1
1.1.2. Vocabulary Words
The APT processor recognizes a set of vocabulary words that are assigned to the following classes of
activity:
Types of geometric quantities and surfaces; POINT, PLANE, SPHERE, etc.
Computing operators and functions; IF, SINF, COSF, etc.
Postprocessor instructions; STOP, END, SPINDL, etc.
Modifiers, designators and selectors; XLARGE, POSY, LEFT, etc.
Action verbs; GO, GODLTA, etc.
Modes of operation; NOPOST, CLPRNT, PTONLY, etc.
1.1.3. Numbers
All numbers used in a part program are treated by the APT processor as floating-point quantities. Integers
are not treated as a separate class of numbers. The number one (1) may be expressed in the following ways:
1
1.
1.0
.01e2
10.0e-1
1000.e-3
.001e+3
+1
+10.e-1
When writing a number in the exponential format (using an e followed by an exponent), a decimal point
must be given in the number preceding the e. If no decimal point appears, the presence of the alpha character
e will cause the number to be interpreted as a variable symbol.
The maximum number of significant digits allowed is 16, with a range of about 10-75
to 1075
.
Whenever a number is used as an index of a subscript only, its integral part is used; for example, if I = 2.4,
the index or subscript value of I is 2.
1.1.4. Symbols
A symbol is used to define an entity in a part program statement that is to be referenced in later statements.
For example, the statement
CIRC1 = CIRCLE/ 1, 2, 3, 8
defines a circle whose center is at X = 1, Y = 2 and Z = 3, and whose radius is 8. Later part program
statements can now refer to this circle by referencing the symbol CIRC1.
A symbol is made up of from one to six alphanumeric characters, at least one of which must be a letter.
(Punctuation characters cannot be used in a variable symbol.) A symbol, sometimes noted as "variable
symbol", cannot be the same as a vocabulary word. Further, a symbol must be defined before a reference to
that symbol in another part program statement. Because of the dynamic environment of the APT language,
new vocabulary words are frequently required. The use of at least one numeric character in a symbol is
recommended to protect against subsequent changes.
1.1.5. Statement Labels
A statement may have a label (or "ID") so that other part program statements can reference it. A statement
label must be from on the six alphanumeric characters (all of which can be numeric) and must occur to the
extreme left of the statement. A statement label must be terminated by a right parentheses.
IF (I + 2) JOE, 123, 41E
JOE) I = 1
123) J = 3
41E) K = 1
1.1.6. Statement Size Limitation
The maximum number of elements that may be included in a single APT statement is 600. For example, this
statement:
ID6) CIRC1 = CIRCLE/ 1, 2, 3, 8
contains the 13 elements listed in Table 1.1.
Table 1.1. Statement Elements
Count Symbol Type Count Symbol Type
1 ID6 Statement Label 8 , Punctuation
2 ) Punctuation 9 2 Number
3 CIRC1 Symbol 10 , Punctuation
4 = Punctuation 11 3 Number
5 CIRCLE Vocabulary Word 12 , Punctuation
6 / Punctuation 13 8 Number
7 1 Number
Chapter 2. Computing and Subscripted Variables
The ability to perform a variety of computing operations and the concept of subscripted variables have been
included to provide additional capability in the APT language.
2.1. Computing in the APT Language
The computing feature allows a given quantity to be expressed as the result of one or more arithmetic
operations. For example, the statement:
A = 2 + 6 * SQRTF(4)
specifies that the symbol A is to be assigned the value 14 (the result of multiplying 6 times the square root of
4 and adding 2). A computing statement may be made up of some combination of the following:
Scalars
Arithmetic Operators
Arithmetic Expression
Arithmetic Functions
2.1.1. Scalars
Scalars are one-dimensional quantities that can be operated on as is or combined to define a geometric
quantity. Scalars, sometimes noted as "scalar variables", can be multiply-defined, that is, the value of the
scalar can be reassigned by a new computing statement.
2.1.2. Arithmetic Operators
Table 2.1. Operators
Operator Description
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation
2.1.3. Arithmetic Expressions
Scalar symbols, numbers and arithmetic operators may be combined to form an arithmetic expression.
2 * A + B
3. * A + B/ (4. * C)
A + B ** 2 + 3 * C
In the APT language, an arithmetic expression may replace a scalar or a subscript. A scalar symbol or a
variable my be assigned a value by an arithmetic expression.
F = 2 * A + B
C = 3 * A + B / (4. * C)
H = 3.14159
Parentheses may be used in arithmetic expressions to indicate the order of the operations. Within
parentheses, or where parentheses are omitted, the order of operations is as follows:
Table 2.2. Operator Precedence
Operator Precedence
Evaluation of Functions 1 (highest)
** 2
* / 3
+ - 4 (lowest)
Among operations of the same priority, processing is done from left to right.
For example the following expressions are equivalent:
F = A * B + C / D * A ** 2
F = (A * B) + (C / D) * (A ** 2)
An arithmetic expression enclosed in parentheses can be substituted for a scalar value (where a scalar value
is appropriate) in and APT statement except RESERV/.
P1 = POINT/ (A + 2. * B), Y, (-3 + E)
However, an arithmetic expression can never appear to the left of an equal sign, except when used to denote
a subscript value.
Legal Not Legal
A(I + 2) = D * C I + 2 = D * C
D = A(I + K + 1) CALL/ MAC1, B + C = A, D = E / 2, F = G + H
CALL/ MAC2, B = A(I + K * 2)
2.1.4. Arithmetic Functions
The following functions are available in the APT language:
Table 2.3. Arithmetic Functions
Name Function Example Usage
ABSF(x) Absolute Value of x X = ABSF(-22.5)
ATANF(x) Arctangent of x X = ATANF(.577350)
EXPF(x) ex X = EXPF(2)
SINF(x) Sine of x X = SINF(45)
COSF(x) Cosine of x X = COSF(45)
Name Function Example Usage
DOTF(svector, svector) Dot Product of Vectors DP = DOTF(V1, V2)
LNTHF(svector) Vector Magnitude LEN = LNTHF(V)
LOGF(x) logex LOG = LOGF(2)
SQRTF(x) Square Root of x SQR = SQRTF(4)
ANGLF(scircle, spoint)
Angle between the positive X axis
and a line joining the center of
a circle and a point.
A = ANGLF(C1, (POINT/ 2, -
3))
NUMF(SPAT) The number of points in a pattern. N = NUMF(PAT1)
DISTF(splane, splane)
or
DISTF(sline, sline)
Distance between parallel lines
or parallel planes. (Mixing
surfaces types is not allowed.)
D = DISTF(L1, L2)
LOG10F(x) Log10x LG = LOG10F(2)
TANF(x) Tangent of x T = TANF(30.)
ATAN2F(x, y) Arctangent of x/y A = ATAN2F(2, .5)
Note
The arguments to SINF, COSF and TANF are in degrees. ANGLF,
ATANF and ATANF2F return degrees.
The output of each of these functions is single-valued; hence, these functions can be used to define an
arithmetic expression.
R = A * SQRTF(C ** 2 + D ** 2) / E
2.2. Subscripted Variables in the APT Language
The APT processor provides the capability of defining an array of geometric quantities or scalars that may
be referenced by one symbolic name. The individual quantities may be defined or referenced by means of a
subscript or an index.
A(1) = 2
A(2) = 5
The scalar quantity 2 is stored in the first storage location for A, and the scalar quantity 5 is stored in the
second storage location of A.
2.2.1. The Reserve (RESERV) Statement
When a symbol is used to define an array of quantities, the RESERV statement must be used to define the
extent of the array before any referencing to the subscripted symbol in the part program. For example:
RESERV/ A, 50
$$ or
RESERV/ 50, A
indicates that 50 storage locations are to be set aside for the symbol A. The first pair of entries in the
RESERV statement defines the order for subsequent pairs (symbol, range or range, symbol). The array(s)
defined in a RESERV statement may be used to store either scalars or surfaces. Statement ID's and MACRO
names cannot be subscripted. The first usage of a subscripted variable will determine whether surfaces (or
scalars) are to be allowed for that array. For example:
RESERV/ L1, 10, C1, 20, P1, 5, Q, 20
L1(2) = LINE/ 2.0, 1.0, 2.0, 5.0
C1(5) = CIRCLE/ 0, 0, 0, 0
P1(1) = POINT/ 0, 1, 0
Q(1) = 6.0 * 3 ** 2
would allow ten surfaces to be defined using the symbol L1(1)-L1(10), 20 surfaces to be defined using the
symbols C1(1)-C1(20), etc. Finally, 20 scalars could be defined using the symbols Q(1)-Q(20).
The extent of the array must be specified by a scalar number; a variable symbol cannot be used in place of
the required value.
$$ OK
RESERV/ A, 50
$$ Not allowed
B = 50
RESERV/ A, B
The value of the index (subscript) in a later part program statement cannot extend beyond the range assigned
to the symbol by the RESERV statement. The above example indicates that the allowable range for the
subscript is between 1 and 50, inclusive. Thus, the following examples would result in an error condition.
A(0) = 6
A(61) = 3.56
A(-1) = 10
The value of the subscript may be expressed as a number (as shown in the examples), as a symbolic scalar,
or as a computed expression. Although the subscript value may -- as a result, for instance, of having been
computed -- have a fractional part (that is, not be a perfect integer), it is truncated to an integer value when
used for subscripting purposes.
2.2.2. Inclusive Subscripts
Several input formats used in APT part programming call for writing strings (sometimes long) of data items
of the same class, such as all point definitions. Sometimes these data items have been calculated earlier in
the part program and can be defined as elements of a subscripted array. In place of writing a string of data of
the form:
A(1), A(2), A(3), A(4), ... A(n)
a modification of the subscript format permits the writing of a single item:
A(1, THRU, n)
which is exactly equivalent to the list of elements of the subscripted array A shown above.
The general form of this "inclusive subscript" notation is:
where a, b and c are scalar values expressed in any of the forms available in the APT language. This notation
is equivalent to a list of consecutive individual elements of the subscript array for the symbol NAME,
between subscript value a and subscript value b at interval of c. The value a specifies the lowest subscript of
the implied list, and be the highest value. These are not necessarily the first and last values of the entire
array; they must, of course, be within the range of the array.
the implied list is from a to b if the incremental value c is positive, and from be to a if the increment is
negative. A negative c may be specified by either a negative sign for the increment with the INCR modifier,
or a positive c with the DECR modifier. A negative c with DECR is equivalent to a double negative, the
effect being positive. The incremental modifier and value need not be given; if omitted, a positive increment
of 1 is assumed. When using incremental values other than 1, the final subscript of the implied list will be
the last subscript value that does not exceed the specified limit and need not be the same as the limiting
value. For Example:
A(1, THRU, 8, INCR, 3)
implies the list:
A(1), A(4), A(7)
When the value of the last subscript of the array is desired for b in the inclusive subscript notation, the
modifier ALL may be used, in place of a scalar following THRU, to indicate it. When the inclusive subscript
is to represent a list with the subscript limits of 1 and the highest value of the array, regardless of the
increment value, of direction, the notation "a, THRU, b" in the subscript nest may be replaced by the single
modifier ALL; for example:
A(ALL) or
A(ALL, DECR, 2)
The first element of the examples implies a list of all of the elements of the array A, in the order:
A(1), A(2), A(3), ... A(n)
The second example implies a list of every other element of the array A, starting with the last one, in the
order:
A(n), A(n-2), A(n-4), ...
If the low end of the range is to be 1, the value of a may be omitted. For example:
A(THRU, ALL)
is equivalent to:
A(1, THRU, ALL)
Examples of the use of inclusive subscripts:
L1 = LINE/ A(ALL)
where A is a scalar array with four or six elements.
L1 = LINE/ B(7, THRU, 10)
where B is a scalar array with ten or more elements.
L1 = LINE/ B(7, THRU, ALL)
where B is a scalar array with exactly ten or exactly twelve elements.
T1 = TABCYL/ NOZ, SPLINE, P(ALL)
where P is an array of three of more points.
In the general form:
NAME(a, THRU, b)
a should be the lower value of the range, and b should be the upper value of the range. If a=b,
P(5, THRU, 3)
has an implied positive direction and an increment value of 1. It should therefore define the low end of the
array P(5) and continue defining with a positive increment of 1 (P(6), P(7), ...) until the high end is reached
or passed. In this case, the high end, 3, is passed immediately, so P(6), etc., are not defined. However, the
one value P(5) is defined.
The converse example:
P(5, THRU, 3, DECR, 1)
is to start at the high end P(3) and decrease by 1 until the low end P(5) is reached. In this case, only P(3) will
be defined.
Inclusive subscript notation may be used in any geometric definition statement (with the one exception
noted in Section 3.22.2) and the PRINT or PUNCH statements. These are the only types of statements in
which the inclusive subscript is allowed.
Chapter 3. Geometric Statements in APT
The APT language permits the definition of a variety of geometric entities, with the added capability that
each of the allowable types can be defined in several ways. For instance, a point can be defined simply by
listing the x, y and z coordinates, or it can be defined as the intersection of two lines, or as one of the two
possible points of intersection of a line and a circle, etc. The geometric types allowed, together with the APT
vocabulary word used to indicate each, are listed below.
Table 3.1. Geometry Type and Name
Geometric Type Vocabulary Word
Point POINT
Line LINE
Plane PLANE
Circle CIRCLE
Cylinder CYLNDR
Ellipse ELLIPS
Hyperbola HYPERB
Cone CONE
General Conic GCONIC
Loft Conic LCONIC
Vector VECTOR
Matrix MATRIX
Sphere SPHERE
Quadric QADRIC
Tabulated Cylinder TABCYL
Polyconic Surface POLCON
Ruled Surface RLDSRF
3.1. Format
The general format of a surface definition is:
SNAME = SURFACE TYPE/ method of definition
where SNAME is a symbol, the SURFACE TYPE is one of the vocabulary words defining the surfaces
listed above and the method of definition is as defined in the following sections. A variable symbol may be
redefined, and then only as a surface of the same type, if one of two techniques involving the word CANON
is used.
CANON as a modifier
Any geometric definitions type involving the word CANON will allow the symbol to be redefined
(see Section 3.22).
These statements are provided to set a module condition to allow redefinition of surface variables.
The specification of CANON/ ON will allow subsequent surface variables to be redefined with any
geometric definition. The specification of CANON/ OFF, which is the default mode, will require the
CANON modifier for redefinition.
3.1.1. Modifiers
Some of the methods of definition require a modifier (or selector). This is necessary when there is more than
one solution as represented by the definitions itself. For example:
SPT = POINT/ XSMALL, INTOF, sline, scircle (see Figure 3.1)
would mean "define SPT as the point that has the smallest X coordinate value of the two possibilities when
the line sline is intersected with the circle scircle".
Figure 3.1. Geometry Modifier
3.1.2. Canonical Form
A particular geometric type can be defined in many ways. However, it would be highly inefficient to pass all
of this information along from section to section of the APT processor. Therefore, the APT processor
reduces to a common format each of the possible definitions for a particular geometric type. This format is
called the canonical form and is usually the most basic analytical expression for the surface type in question;
(Chapter 16 contains a table of the canonical forms for all of the allowable surface types.) For example, the
statement given in Section 3.1.1 would be evaluated, and only the x, y and z coordinates for the point would
be stored for later use.
3.2. The ZSURF Definition
The ZSURF definition supplies a means of defining an implicit Z coordinate for a point whenever it is
required for use in a geometric definition or a motion command. The general form of this statement is:
When only the X and Y coordinates for a point have been specified in a part program statement, the APT
processor projects the point on the ZSURF plane to calculate the implicit Z value. (if ZSURF is not
specified, the XY plane is assumed.) For example:
ZSURF/ SPLANE
SPOINT = POINT/ X, Y
The Z value is supplied by projecting the point (X, Y) in a direction parallel to the Z axis onto the plane
SPLANE.
3.3. The Point (POINT) Definitions
A point is a unique position in space and can be defined in several ways.
3.3.1. Rectangular Coordinates
SPT = POINT/ xcoord, ycoord, zcoord
SPT = POINT/ xcoord, ycoord
Figure 3.2. POINT by Rectangular Coordinates
PT1 = POINT/ 2, 4, 3
PT2 = POINT/ 2, 4, 0
PT3 = POINT/ -5, -2, 3
PT4 = POINT/ -5, -2, 0
3.3.2. Intersection of Two Lines
SPT = POINT/ INTOF, sline, sline
Figure 3.3. POINT by Line, Line Intersection
PT1 = POINT/ INTOF, LN1, LN4
PT2 = POINT/ INTOF, LN2, LN1
PT3 = POINT/ INTOF, LN1, LN3
PT4 = POINT/ INTOF, LN2, LN3
PT5 = POINT/ INTOF, LN2, LN4
3.3.3. Intersection of a Line and a Circle
Figure 3.4. POINT by Line, Circle Intersection
P1 = POINT/ YSMALL, INTOF, L1, C3
P2 = POINT/ YLARGE, INTOF, L1, C3
P3 = POINT/ YSMALL, INTOF, L1, C1
P4 = POINT/ YLARGE, INTOF, L1, C1
P5 = POINT/ XLARGE, INTOF, L2, C1
P6 = POINT/ XSMALL, INTOF, L2, C1
P7 = POINT/ XLARGE, INTOF, L2, C2
P8 = POINT/ XSMALL, INTOF, L2, C2
3.3.4. Intersection of Two Circles
Figure 3.5. POINT by Circle, Circle Intersection
P1 = POINT/ YLARGE, INTOF, C1, C2
P2 = POINT/ YSMALL, INTOF, C1, C2
P3 = POINT/ XSMALL, INTOF, C3, C4
P4 = POINT/ XLARGE, INTOF, C3, C4
3.3.5. On a Circle at an Angle with the X Axis
SPT = POINT/ scircle, ATANGL, degrees
The point lies on the circle so that the line from the point to the center of the circle makes a stated angle with
the X axis.
Figure 3.6. POINT by Circle, Angle
P1 = POINT/ C1, ATANGL, 45.0
P2 = POINT/ C1, ATANGL, 90
P3 = POINT/ C1, ATANGL, 225
$$ or
P1 = POINT/ C1, ATANGL, -315
P2 = POINT/ C1, ATANGL, -270
P3 = POINT/ C1, ATANGL, -135
Note
The angle is expressed in degrees and decimal fractions of a degree and is measured from the positive X
axis. A positive angle is measured counter clockwise.
3.3.6. Center of a Circle
SPT = POINT/ CENTER, scircle
Figure 3.7. POINT by Circle Center
PT1 = POINT/ CENTER, C1
3.3.7. Intersection of a Line and a Conic
Figure 3.8. POINT by Line, Conic Intersection
P1 = POINT/ XLARGE, INTOF, L1, C1
P2 = POINT/ XSMALL, INTOF, L1, C1
3.3.8. Intersection of Three Planes
SPT = POINT/ INTOF, splane, splane, splane
Figure 3.9. POINT by 3 Plane Intersection
P1 = POINT/ INTOF, PLANE1, PLANE2, PLANE3
3.3.9. Polar Coordinates
Figure 3.10. POINT by Polar Coordinates
PT1 = POINT/ RTHETA, XYPLAN, 5.66, 45
PT2 = POINT/ THETAR, XYPLAN, 150.0, 6
3.3.10. Intersection of a Line and a Tabulated Cylinder
SPT = POINT/ INTOF, sline, STABCYL, spoint
It is necessary to include a point on the TABCYL near the desired intersection to differentiate between the
several possible intersections. Further, since the APT processor uses this point as a basis for locating the
proper interval, a careful selection of this point can reduce processing time. The optimum point specification
is the last point of the TABCYL definition before the intersection point (that is, if the intersection point is
between the ninth and tenth points of the original TABCYL definition, using the ninth point as the "near
point" results in the most efficient processing). This is true for all the definitions involving a TABCYL
where a "near point" is required.
Figure 3.11. POINT by Line, Tabulated Cylinder Intersection
PNT = POINT/ INTOF, LN1, TBCYL1, PNTA
3.3.11. The Location in a PATERN
SPT = POINT/ spattern, n
Where n specifies the nth
point in the definition order of the pattern.
3.4. The Line (LINE) Definitions
A line is the intersection of two planes and is treated by the APT processor as a vertical plane surface (that
is, perpendicular to the XY plane).
3.4.1. Through Two Points
Note
The two points must not be coincidental
Figure 3.12. LINE by Two Points
LN1 = LINE/ -3, -3.5, 4, 3.5
LN2 = LINE/ 7, 2, 3, 1
$$ or
PT1 = POINT/ -3, -3.5
PT2 = POINT/ 4, 3.5
PT3 = POINT/ 7, 2
PT4 = POINT/ 3, 1
LN1 = LINE/ PT1, PT2
LN2 = LINE/ PT3, PT4
3.4.2. Through a Point and Tangent to a Circle
Note
The modifiers RIGHT and LEFT are applied looking from the point toward the circle.
Figure 3.13. LINE by Point and Tangent Circle
LN1 = LINE/ PT1, LEFT, TANTO, C1
LN2 = LINE/ PT1, RIGHT, TANTO, C1
LN3 = LINE/ PT2, RIGHT, TANTO, C1
3.4.3. Tangent to Two Circles
Note
The modifiers RIGHT and LEFT are applied looking from the first referenced circle toward the second.
Figure 3.14. LINE by Tangent Circles
L1 = LINE/ RIGHT, TANTO, C1, RIGHT, TANTO, C2
L2 = LINE/ LEFT, TANTO, C1, LEFT, TANTO, C2
L3 = LINE/ RIGHT, TANTO, C1, LEFT, TANTO, C2
L4 = LINE/ LEFT, TANTO, C1, RIGHT, TANTO, C2
3.4.4. Through a Point and at an Angle with the X or Y Axis
Figure 3.15. LINE by Point Angle
LN1 = LINE/ PT1, ATANGL, 45, XAXIS
LN2 = LINE/ PT2, ATANGL, 22.5
LN3 = LINE/ PT3, ATANGL, 60, YAXIS
3.4.5. Through a Point and Having a Slope with Respect to the X or Y Axis
The three lines illustrated in Figure 3.15 could be defined as follows:
LN1 = LINE/ PT1, SLOPE, 1, XAXIS
LN2 = LINE/ PT2, SLOPE, .4142
LN3 = LINE/ PT3, SLOPE, 1.7321, YAXIS
3.4.6. The X or Y Axis
3.4.7. Through a Point and Having a Slope with Respect to Another Line
SLN = LINE/ spoint, SLOPE, slope, sline
The lines L1 and L3 illustrated in Figure 3.16 could be defined as follows:
LN1 = LINE/ PT2, SLOPE, .26759, L2
LN3 = LINE/ PT3, SLOPE, -1, L1
3.4.8. Through a Point at an Angle with a Line
SLN = LINE/ spoint, ATANGL, degrees, sline
Note
A positive angle is measured counter clockwise from the given line. A negative angle is measured
clockwise.
Figure 3.16. LINE by Point, Angle to Line
L1 = LINE/ PT2, ATANGL, 15, L2
L3 = LINE/ PT3, ATANGL, 135, L1
3.4.9. Through a Point and Parallel to a Line
SLN = LINE/ spoint, PARLEL, sline
Figure 3.17. LINE by Point, Parallel Line
L1 = LINE/ PT1, PARLEL, LX
3.4.10. Through a Point and Perpendicular to a Line
SLN = LINE/ spoint, PERPTO, sline
Figure 3.18. LINE by Point, Perpendicular Line
LN1 = LINE/ PT1, PERPTO, LNX
3.4.11. Parallel to a Line at a Distance
Note
The modifiers denote the direction in which the line is offset
Figure 3.19. LINE by Distance from Parallel Line
L1 = LINE/ PARLEL, LX, XSMALL, 2
$$ or
L1 = LINE/ PARLEL, LX, YLARGE, 2.0
L2 = LINE/ PARLEL, LX, XLARGE, 2
$$ or
L2 = LINE/ PARLEL, LX, YSMALL, 2.0
3.4.12. Intersection of Two Planes
SLN = LINE/ INTOF, splane, splane
Note
The planes cannot be coplanar, parallel to one another, or both vertical (perpendicular to the XY plane).
Figure 3.20. LINE by Plane Intersection
L1 = LINE/ INTOF, PLN1, PLN2
3.4.13. Slope Intercept Form
Figure 3.21. LINE by Slope Intercept Form
L1 = LINE/ SLOPE, .40403, INTERC, 3
L2 = LINE/ SLOPE, -.40403, INTERC, 3
$$ or
L1 = LINE/ SLOPE, .40403, INTERC, YAXIS, 3
L2 = LINE/ SLOPE, -.40403, INTERC, XAXIS, 7.425
$$ or
L1 = LINE/ ATANGL, 22, INTERC, 3
L2 = LINE/ ATANGL, -22, INTERC, 3
$$ or
L1 = LINE/ ATANGL, 22, INTERC, YAXIS, 3
L2 = LINE/ ATANGL, -22, INTERC, XAXIS, 7.425
3.4.14. Angle and Axis Intercept
See Figure 3.21
3.4.15. Through a Point and Tangent to a Tabulated Cylinder
SLN = LINE/ spoint, TANTO, stabcyl, spoint
Note
A point on the TABCYL near the point of tangency is included to specify the desired point of tangency.
(This point may be omitted if it is the same as the spoint specified immediately after the slash.)
Figure 3.22. LINE by Point, Tangent Tabulated Cylinder
L3 = LINE/ P3, TANTO, TABC, P4
3.4.16. Through a Point and Perpendicular to a Tabulated Cylinder
SLN = LINE/ spoint, PERPTO, stabcyl, spoint
Note
A point on the TABCYL near the normal is included to specify the desired normal.
Figure 3.23. LINE by Point, Tangent Tabulated Cylinder
L2 = LINE/ P1, PERPTO, TABC, P2
3.5. The Plane (PLANE) Definitions
A plane is a surface that contains all points of a straight line joining any two points of the surface.
3.5.1. Coefficients of the Plane Equation
SPL = PLANE/ a, b, c, d
Figure 3.24. PLANE by Coefficients
PLANA = PLANE/ 0, 0, 1, 1.5
PLANB = PLANE/ .5, 0, 1, -4
3.5.2. Passing Through Three Nonlinear Points
SPL = PLANE/ spoint, spoint, spoint
Figure 3.25. PLANE by Three Points
P1 = POINT/ 1, 1, 1
P2 = POINT/ 2, 3, 2
P3 = POINT/ 3, 4, 0
PLN = PLANE/ P1, P2, P3
3.5.3. Through a Point and Parallel to a Plane
SPL = PLANE/ spoint, PARLEL, splane
Figure 3.26. PLANE by Point, Parallel Plane
PL1 = PLANE/ P1, PARLEL, PLN
PL2 = PLANE/ P2, PARLEL, PLN
3.5.4. Parallel to a Plane at a Distance
Figure 3.27. PLANE by Parallel Plane at Distance
PLQ = PLANE/ PARLEL, PL5, XLARGE, D
3.5.5. Through a Point and Perpendicular to a Vector
SPL = PLANE/ spoint, PERPTO, svector
Figure 3.28. PLANE by Point, Vector
PLN1 = PLANE/ PT, PERPTO, VEC
3.5.6. Through Two Points and Perpendicular to a Plane
Note
A line joining the two given points must not be perpendicular to the given plane.
Figure 3.29. PLANE by Two Points, Perpendicular Plane
PLN6 = PLANE/ PERPTO, PL2, PTA, PTB
3.5.7. Perpendicular to Two Intersecting Planes and Passing Through a Point
SPL = PLANE/ spoint, PERPTO, splane, splane
3.6. The Circle (CIRCLE) Definitions
A circle is the locus of points that are equidistant from a fixed point. The APT processor defines a circle as a
cylinder perpendicular to the XY plane.
3.6.1. Coordinates of the Center and the Radius
SCIR = CIRCLE/ xcoord, ycoord, zcoord, radius
SCIR = CIRCLE/ xcoord, ycoord, radius
Figure 3.30. CIRCLE by Coordinates, Radius
C1 = CIRCLE/ 4, 3, 2
$$ or
PT1 = POINT/ 4, 3
C1 = CIRCLE/ CENTER, PT1, RADIUS, 2
3.6.2. Center and a Line to which it is Tangent
SCIR = CIRCLE/ CENTER, spoint, TANTO, sline
Figure 3.31. CIRCLE by Center Point, Tangent Line
C1 = CIRCLE/ CENTER, PT2, TANTO, L1
3.6.3. Center and a Point on the Circumference
SCIR = CIRCLE/ CENTER, spoint, spoint
Figure 3.32. CIRCLE by Center Point, Circumference Point
C1 = CIRCLE/ CENTER, PNTB, PNTC
3.6.4. Three Points on the Circumference
SCIR = CIRCLE/ spoint, spoint, spoint
Figure 3.33. CIRCLE by Three Points
C1 = CIRCLE/ PT1, PT2, PT3
3.6.5. Center Point and Tangent to a Circle
Note
There are two possibilities. The modifiers LARGE and SMALL indicate the circle is to be chosed with
the largest or smallest (respectively) radius.
Figure 3.34. CIRCLE by Center Point, Tangent Circle
C2 = CIRCLE/ CENTER, PT1, SMALL, TANTO, C1
C3 = CIRCLE/ CENTER, PT1, LARGE, TANTO, C1
3.6.6. Radius and Tangent to Two Intersecting Lines
Figure 3.35. CIRCLE by Radius, Two Tangent Lines
C1 = CIRCLE/ YLARGE, L2, YLARGE, L1, RADIUS, .375
C2 = CIRCLE/ YSMALL, L1, XLARGE, L2, RADIUS, .375
C3 = CIRCLE/ YSMALL, L2, YSMALL, L1, RADIUS, .375
C4 = CIRCLE/ XSMALL, L2, YLARGE, L1, RADIUS, .375
$$ or
C1 = CIRCLE/ XLARGE, L2, XSMALL, L1, RADIUS, .375
C2 = CIRCLE/ XLARGE, L1, YLARGE, L2, RADIUS, .375
C3 = CIRCLE/ XSMALL, L2, XLARGE, L1, RADIUS, .375
C4 = CIRCLE/ YSMALL, L2, XSMALL, L1, RADIUS, .375
3.6.7. Radius and Tangent to a Line and Passing Through a Point
Figure 3.36. CIRCLE by Radius, Point, Tangent Line
C1 = CIRCLE/ TANTO, LN1, XSMALL, PT1, RADIUS, .5
C2 = CIRCLE/ TANTO, LN1, XLARGE, PT1, RADIUS, .5
$$ or
C1 = CIRCLE/ TANTO, LN1, YSMALL, PT1, RADIUS, .5
C2 = CIRCLE/ TANTO, LN1, YLARGE, PT1, RADIUS, .5
3.6.8. Radius and Tangent to a Line and a Circle
Figure 3.37. CIRCLE by Radius, Tangent Line, Tangent Circle
C1 = CIRCLE/ YLARGE, LG, XSMALL, OUT, CG, RADIUS, 1.
C2 = CIRCLE/ YLARGE, LG, XSMALL, IN, CG, RADIUS, 1.
C3 = CIRCLE/ YSMALL, LG, XSMALL, OUT, CG, RADIUS, 1.
C4 = CIRCLE/ YSMALL, LG, XSMALL, IN, CG, RADIUS, 1.
C5 = CIRCLE/ YLARGE, LG, XLARGE, IN, CG, RADIUS, 1.
C6 = CIRCLE/ YSMALL, LG, XLARGE, IN, CG, RADIUS, 1.
C7 = CIRCLE/ YLARGE, LG, XLARGE, OUT, CG, RADIUS, 1.
C8 = CIRCLE/ YSMALL, LG, XLARGE, OUT, CG, RADIUS, 1.
3.6.9. Radius and Tangent to Two Circles
Figure 3.38. CIRCLE by Radius, Two Tangent Circles
CIR3 = CIRCLE/ YLARGE, IN, CIR2, OUT, CIR1, RADIUS, .25
CIR5 = CIRCLE/ YSMALL, OUT, CIR2, OUT, CIR4, RADIUS, .5
CIR6 = CIRCLE/ YLARGE, OUT, CIR2, OUT, CIR4, RADIUS, .5
3.6.10. Radius and Tangent to a Line and a Tabulated Cylinder
Note
A point on the TABCYL must be included that is nearest the desired tangency point.
Figure 3.39. CIRCLE by Radius, Tangent Line, Tangent TABCLY
CL1 = CIRCLE/ TANTO, L1, XSMALL, TABC, YLARGE, PNTA, RADIUS, .5
3.7. The Cylinder (CYLNDR) Definitions
A cylinder is the locus of all points at a constant distance from a given line.
3.7.1. An Axis Point, an Axis Vector and a Radius
SCYL = CYLNDR/ x, y, z, a, b, c, radius
Note
(x, y, z) represent a point on the axis of the cylinder, (a, b, c) are the components of the unit vector in
the direction of the axis and (radius) represents the radius of the cylinder.
Figure 3.40. CYLNDR by Point, Vector, Radius
C1 = CYLNDR/ 8, 0, 1, 0, 0, 1, 1.0
3.7.2. Substitution of Symbols in the Canonical Form
SCYL = CYLNDR/ spoint, a, b, c, radius
SCYL = CYLNDR/ x, y, z, svector, radius
SCYL = CYLNDR/ spoint, svector, radius
For example, the cylinder in Figure 3.40 could also be defined:
C1 = CYLNDR/ PTA, 0, 0, 1, 1.0
C1 = CYLNDR/ 8, 0, 1, VECTA, 1.0
C1 = CYLNDR/ PTA, VECTA, 1.0
3.8. The Ellipse (ELLIPS) Definition
An ellipse is a plane curve that is the locus of a point moving in such a manner that the sum of the distances
from that point to two fixed points in the plane is constant.
3.8.1. Center, Semi-Major and Semi-Minor Axes, and the Angle the Major Axis Makes
with the X Axis.
SELP = ELLIPS/ CENTER, spoint, semi-maj, semi-min, angle
Note
The ellipse define will be in the XY plane. A positive angle (in degrees) is measured counter clockwise.
Figure 3.41. ELLIPS Example
EL1 = ELLIPS/ CENTER, PTA, 3.25, 1.9, 30
3.9. The Hyperbola (HYPERB) Definition
A hyperbola is a plane curve that is the locus of a point moving such that the differences of the distances
from that point to two fixed points in the plane are consistant.
3.9.1. Center, Half-Tranverse Axis, Half-Conjugate Axis and the Angle of the Transverse
Axis to the X axis.
SHYP = HYPERB/ CENTER, spoint, half-transverse, half-conjugate, angle
Note
A positive angle (in degrees) is measured counter clockwise.
Figure 3.42. HYPERB Example
HYP1 = HYPERB/ CENTER, PTA, 2, 1, 45
3.10. The Cone (CONE) Definitions
A cone is a surface generated by moving a straight line so that the line always touches a circle, and passes
through a fixed point.
3.10.1. Canonical Form
SCN = CONE/ CANON, x, y, z, a, b, c, costheta
Note
(x, y, z) are the coordinates of the vertex of the cone, (a, b, c) are the components of the unit vector in
the direction of the axis of the cone, and (costheta) is the cosine of the vertex half-angle.
Figure 3.43. CONE by Canonical Form
CONEA = CONE/ CANON, 3.1, 2, 0, 0, 0, 1, .866
3.10.2. Expressing the Vertex and Axis Vector Symbolically
SCN = CONE/ spoint, svector, half-angle
For example, the cone in Figure 3.43 could also be defined as:
CONEA = CONE/ PTA, VECB, 30.0
3.11. The General Conic (GCONIC) Definitions
The general conic is the plane curve represented by the general class of second-degree equations in two
variables:
Ax2 + Bxy + Cy
2 + Dx + Ey + F = 0
3.11.1. Coefficients of the General Equation
SGC = GCONIC/ A, B, C, D, E, F
3.11.2. Coefficients of the Alternate Equation
SGC = GCONIC/ P, Q, R, S, T
Where the alternate equation is defined as follows:
3.11.3. Coefficients of the Inverse of the Alternate Equation
SGC = GCONIC/ P, Q, R, S, T, FUNOFY
Where the alternate equation is defined as follows:
3.12. The Loft Conic (LCONIC) Definitions
A loft conic is a general conic expressed by a combination of five independent conditions, rather than by a
mathematical expression.
3.12.1. Five Points
Figure 3.44. LCONIC by Five Points
LCONA = LCONIC/ SPT, PTA, PTB, PTC, PTD, PTE
3.12.2. Four Points and a Slope
Figure 3.45. LCONIC by Four Points, Slope
LC1 = LCONIC/ 4PT1SL, PTA, 1.0, PTB, PTC, PTD
3.12.3. Three Points and a Two Slopes
Figure 3.46. LCONIC by Three Points, Two Slopes
LCOND = LCONIC/ 3PT2SL, PTA, 1.887, PTB, -.577, PTC
3.13. The Vector (VECTOR) Definitions
The vector is that quantity which has both magnitude and direction. In cases where a specific magnitude is
not defined for a vector, the unit vector (magnitude = 1) is assumed.
The formats given in Section 3.13.4, Section 3.13.5, Section 3.13.6 and Section 3.13.9 accept as input both
points and vectors. In these formats, if a point is specified it is equivalent to a vector from the origin to the
given point.
3.13.1. X, Y, Z Components
SVCT = VECTOR/ x, y, z
Figure 3.47. VECTOR by X, Y, Z
VEC1 = VECTOR/ 1, 1, 4
VEC2 = VECTOR/ +2, -6, -1
$$ or
VEC1 = VECTOR/ 2, 2, -3, 3, 3, 1
VEC2 = VECTOR/ -5, 2, 3, -3, -4, 2
$$ or
VEC1 = VECTOR/ P1, P2
VEC2 = VECTOR/ P4, P3
3.13.2. Two End Points
Note
The defined vector is from the first point toward the second point. (See Figure 3.47)
3.13.3. Perpendicular to a Plane
The modifiers are used to indicate the direction the vector is to point. (POSX indicates the vector points in
the positive X direction, etc.)
Figure 3.48. VECTOR by Perpendicular Plane
VECTA = VECTOR/ PERPTO, PLANA, POSX
3.13.4. A Scalar Times a Vector
SVCT = VECTOR/ scalar, TIMES, svector
Figure 3.49. VECTOR by Scaled Vector
VEC3 = VECTOR/ 4.0, TIMES, VEC
VEC4 = VECTOR/ -1, TIMES, VEC
3.13.5. The Cross Product of Two Vectors or Points
SVCT = VECTOR/ svector, CROSS, svector
Note
The resultant vector will be perpendicular to the plane of the two given vectors, and its length will be
the scalar product of the magnitudes of the given vectors and the sine of the included angle. The
direction of the resultant vector will be as see in Figure 3.50 (an application of the "right-hand rule").
Figure 3.50. VECTOR by Cross Product
VECTA = VECTOR/ V1, CROSS, V2
VECTB = VECTOR/ V2, CROSS, V1
3.13.6. Normalizing a Vector, Point or Components
Note
A normalized vector has the same direction as the given vector, with a magnitude equal to one.
Figure 3.51. VECTOR by Normal
VECTA = VECTOR/ UNIT, VECB
3.13.7. A Length (Magnitude) and an Angle in a Plane
The angle is measured from the first axis specified in the modifier; that is, from the X axis in the XYPLAN,
from the Y axis in the YZPLAN, and from the Z axis in the ZXPLAN.
Figure 3.52. VECTOR by Length, Angle
VEC = VECTOR/ LENGTH, 6, ATANGL, 30, XYPLAN
3.13.8. Parallel to the Intersection of Two Planes
Figure 3.53. VECTOR by Intersecting Planes
VECA = VECTOR/ PARLEL, INTOF, PLNA, PLNB, NEGZ
3.13.9. The Addition or Subtraction of Two Vectors or Points
SVCT = VECTOR/ svector, PLUS, svector
SVCT = VECTOR/ spoint, PLUS, spoint
SVCT = VECTOR/ svector, MINUS, svector
SVCT = VECTOR/ spoint, MINUS, spoint
Figure 3.54. VECTOR by Addition, Subtraction
VECTC = VECTOR/ V1, PLUS, V2
VECTD = VECTOR/ V1, MINUS, V2
3.13.10. In the XY Plane Having an Angle with a Line
Figure 3.55. VECTOR by Angle, Line
V1 = VECTOR/ ATANGL, 30, L1, POSY
V1 = VECTOR/ ATANGL, 30, L1, XLARGE
V2 = VECTOR/ ATANGL, 135, L1, XSMALL
V2 = VECTOR/ ATANGL, 135, L1, NEGX
V3 = VECTOR/ ATANGL, 330, L1, POSX
V3 = VECTOR/ ATANGL, 330, L1, XLARGE
3.14. The Matrix (MATRIX) Definitions
A matrix is a rectangular array of numbers defining the three simultaneous equations that represent the
relationship between two coordinate systems.
3.14.1. The Equation Coefficients (Canonical Form)
SMAT1 = MATRIX/ a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3
where a1, b1, etc. are the coefficients of the equations:
a1x + b1y + c1z - d1 = 0
a2x + b2y + c2z - d2 = 0
a3x + b3y + c3z - d3 = 0
which define three mutually perpendicular planes of the new coordinate system.
3.14.2. A Translation of Axis
SMAT2 = MATRIX/ TRANSL, d1, d2, d3
Note
d3 may be omitted. If it is omitted, the APT processor assumes d3 = 0.
The parameters d1, d2 and d3 are the coordinates of the origin of the new coordinate system expressed in
terms of the old system.
The format will generate the following canonical form:
1, 0, 0, d1, 0, 1, 0, d2, 0, 0, 1, d3
3.14.3. A Rotation of Axis
Note
angle is in degrees
a. Rotation in the XY plane, where positive rotation is from the X axis to the Y axis (counter clockwise)
M1 = MATRIX/ XYROT, A
The canonical form generally will be:
COS A, -SIN A, 0, 0, SIN A, COS A, 0, 0, 0, 0, 1, 0
b. Rotation in the YZ plane, where positive rotation is from the Y axis to the Z axis (counter clockwise)
M2 = MATRIX/ YZROT, B
The canonical form generally will be:
1, 0, 0, 0, 0, COS B, -SIN B, 0, 0, SIN B, COS B, 0
c. Rotation in the ZX plane, where positive rotation is from the Z axis to the X axis (counter clockwise)
M3 = MATRIX/ ZXROT, C
The canonical form generally will be:
COS C, 0, SIN C, 0, 0, 1, 0, 0, -SIN C, 0, COS C, 0
3.14.4. Matrix Combinations
As shown in Section 3.14.5 a MATRIX can be defined as a combination (Multiplication) of matrices.
Because matrix operations of this type are not commutative, the order of the operation becomes quite
important. That is, if M and N are matrices, in general:
M x N N x M
To illustrate, compare the result of performing a rotation followed by a translation with the result obtained
by first performing the translation and then the rotation.
If matrix A is multiplied into matrix B, the resultant matrix C will have the effect of first performing the B
operations and then performing the A operations. For example, let A be a translation matrix and B be a
rotation matrix. Then:
Atranslation x Brotation = C
Matrix C will have the effect of first a rotation and then a translation. On the other hand, if the matrix
multiplication is reversed:
Arotation x Btranslation = C
C will first translate and then rotate. Notice that the effect of a matrix multiplication can be thought of as
being the opposite of the order of multiplication.
3.14.5. The Product of Two Matrices
The order of matrix multiplication for most of the combinations above is left to right. For example:
M1 = MATRIX/ MATR, MATT
where MATR is a rotation matrix and MATT is a translation matrix will yield:
M1 = MATR x MATT
There are exceptions to this general rule. The formats given below define the cases in which the order of
matrix multiplication is right to left rather than left to right.
All other formats result in a matrix multiplication order of left to right.
Assume matrix is multiplied into matrix , where:
a41 = b41 = 0
a42 = b42 = 0
a43 = b43 = 0
a44 = b44 = 1
The canonical form generated will be:
Obviously, the order of the matrices given in this format is quite important.
3.14.6. The Inverse of a Matrix
SMAT6 = MATRIX/ INVERS, smatrix
If the input matrix is defined as:
a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3,
the canonical form generated will be:
A1 = a1
B1 = a2
C1 = a3
D1 = -(a1d1 + a2d2 + a3d3)
A2 = b1
B2 = b2
C2 = b3
D2 = -(b1d1 + b2d2 + b3d3)
A3 = c1
B3 = c2
C3 = c3
D3 = -(c1d1 + c2d2 + c3d3)
3.14.7. Three Mutually Perpendicular Planes
SMAT7 = MATRIX/ splane, splane, splane
If the canonical forms of the three planes are:
PLAN1: A1, B1, C1, D1
PLAN2: A2, B2, C2, D2
PLAN3: A3, B3, C3, D3
the canonical form generated will be:
A1, A2, A3, -(A1D1 = A2D2 + A3D3),
B1, B2, B3, -(B1D1 = B2D2 + B3D3),
C1, C2, C3, -(C1D1 = C2D2 + C3D3)
3.14.8. Scale Factor
SMAT8 = MATRIX/ SCALE, s
The canonical form generated will be:
s, 0, 0, 0, 0, s, 0, 0, 0, 0, s, 0
3.14.9. Origin, X Axis Vector and a Vector in the 1st or 2nd Quadrant
SMAT = MATRIX/ spoint, svector1, svector2
Where svector1 represents the new X axis and svector2 is in the first or second quadrant.
3.14.10. A Mirror Matrix about One or More Planes
3.14.11. A Mirror Matrix about a Line or Plane
3.15. The Sphere (SPHERE) Definitions
A sphere is a surface such that all points on the surface are equidistant from a fixed point.
3.15.1. Center Point and Radius
Figure 3.56. SPHERE by Center Point, Radius
S1 = SPHERE/ PNTC, 2.5
$$ or
S1 = SPHERE/ CENTER, PNTC, PNTA
3.15.2. Center Point and a Point on the Surface
SPH = SPHERE/ CENTER, spoint, spoint
See Figure 3.56.
3.15.3. Center Point and a Plane to which it is Tangent
SPH = SPHERE/ CENTER, spoint, TANTO, splane
Figure 3.57. SPHERE by Center Point, Tangent Plane
SPHA = SPHERE/ CENTER, PTA, TANTO, PLANEB
3.15.4. Passing Through Four Points
SPH = SPHERE/ spoint, spoint, spoint, spoint
Note
The four points cannot be coplanar.
Figure 3.58. SPHERE by Four Points
SPHD = SPHERE/ PNTA, PNTB, PNTC, PNTD
3.16. The Quadric (QADRIC) Definitions
The general qadric surface is the locus of points that satisfy the following general equation in the second
degree:
SQAD = QADRIC/ a, b, c, d, e, f, g, h, p, q, r, d
3.16.1. Permissible Quadric Surfaces
Figure 3.59 through Figure 3.62 and Figure 3.63 through Figure 3.67 show all allowable quadric surfaces,
together with the normal equation for each surface.
Figure 3.59. Elliptic Cone
Figure 3.60. Elliptic Cylinder
Figure 3.61. Hyperbolic Cylinder
Figure 3.62. Parabolic Cylinder
Figure 3.63. Real Ellipsoid
Figure 3.64. Hyperboloid of One Sheet
Figure 3.65. Hyperboloid of Two Sheets
Figure 3.66. Elliptic Paraboloid
Figure 3.67. Hyperboloid Paraboloid
3.16.2. Quadratics as a Special Form of QADRIC
In many instances a quadratic (that is, parabola, ellipse, hyperbola) is defined in equation form. For
example, an ellipse my be specified in the following form:
Ax2 + By
2 + Cx + Dy + E = 0
ELLP1 = QADRIC/ A, B, 0, 0, 0, 0, C, D, 0, E
As further illustration, the parabola (y - a)2
- p(x - b) = 0 can be expressed
y2 - 2ay + a
2 - px + pb = 0
or, collecting terms:
y2 - 2ay - px + (pb + a
2 )
The general quadric definition can then be used as follows:
PARB = QADRIC/ 0, 1, 0, 0, 0, 0, -p,$$
(-2 * a), 0, (p * b + a**2)
This provides the facility for specifying any two-dimensional quadratic curve with the QADRIC surface
definition.
3.15. The Sphere (SPHERE) Definitions
3.17. The Reference System (REFSYS)
Statement
3.17. The Reference System (REFSYS) Statement
Chapter 3. Geometric Statements in APT
3.17. The Reference System (REFSYS) Statement
The REFSYS statement is used to describe a surface or surfaces in one coordinate system (such as an
auxiliary view on a blueprint) and to machine this surface or surfaces in another coordinate system.
REFSYS/ smatrix
REFSYS/ NOMORE
The REFSYS statement specifies a matrix that will be used to transform the geometric surface or surfaces to
any other coordinate system. smatrix expresses the origin and coordinate planes of the new system in terms
of the old system (or base system). A particular reference system is in effect until it is either replaced by a
new reference system (REFSYS/ smatrix) or terminated by a REFSYS/ NOMORE, which causes a return to
the base or original coordinate system. All of the geometric types listed in Section 3.3 through Section 3.16,
except the MATRIX definition itself, can be transformed by using the REFSYS statement. No other APT
surface can be transformed. If a nested definition is used in the REFSYS statement, the MATRIX must be
given a name.
A geometric definition defined in a particular reference system will not be transformed until it is used in a
reference system different (by name) from the system in which it was defined. Example:
REFSYS/ (MAT1 = MATRIX/ TRANSL, 5, 5, 0)
P1 = POINT/ 2, 4, 0
REFSYS/ NOMORE
A) GOTO/ P1
The point P1 will be defined with the coordinate values X = 2, Y = 4, Z = 0. At statement labeled A, the
point P1 will be used to define the output point -- by applying the translation matrix MAT1, the output point
will have the coordinate values X = 7, Y = 9, Z = 0; P1 will still be defined as X = 2, Y = 4, Z = 0 in
reference system MAT1. To rephrase, a geometric definition when used in another system will be
dynamically redefined as often as it is used while preserving its static definition in its own system.
Note
When both rotation and translation are specified, the translation is made first, then the rotation.
3.18. The Tabulated Cylinder (TABCYL) Definition
A tabulated cylinder (TABCYL) is the surface generated by moving a line (generatrix) along a space curve
(directrix) such that it is always parallel to a given line. The space curve is defined by a set of points and an
interpolation scheme for "fairing" between given points. A maximum of 139 points may be given to define
the space curve. However, when using some of the formats available for TABCYL specification, it is
possible to exceed the limitation on the maximum number of elements in one statement (see Section 1.1.6)
well before the 139 point limit is reached. The limiting value in such cases depends upon the number of
elements being used in the description of each point, and must be determined by the part programmer.
The general format of the TABCYL is:
Note
A symbolic vector (svector) must be specified if, and only if, the XYZ format is used.
The various options available under the formats indicated above (CANON, NOX, NOY, NOZ, RTHETA,
THETAR, XYZ), together with the data representations, are discussed in the following sections.
3.18.1. Transformation (TRFORM)
A TABCYL can be transformed at the time it is defined by using TRFORM and specifying the symbolic
MATRIX (smatrix) to be used.
3.18.2. CANON Format
A TABCYL can be defined by specifying the canonical form of parameters:
STAB = TABCYL/ CANON, n, k, m1, ... m9, u1, v1, a1, b1, c1, r1, u2, v2, a2, b2, c2, r2, ... un, vn, an, bn, cn, rn,
un+1, vn+1,
See Section 16.15 for an explanation of the terms.
3.18.3. NOZ, RTHETA, THETAR Formats
The data in these formats is given in the XY plane, the generatrix is normal to the XY plane; and coordinate
transformation is limited to the XY plane. NOZ implies X, Y coordinates only are given; RTHETA and
THETAR indicate polar coordinates, where r is the radius (in units) and is the angle in degrees measured counter clockwise from the positive X axis.
Note
RTHETA means r1, 1, r2, 2, ... rn, n, and THETAR implies 1, r1, 2, ... r2, n, rn.
The following sections discuss the options (PTNORM, PTSLOP, TWOPT, FOURPT, SPLINE) available
under these formats.
Note
The NOZ format is used, although the options also apply to RTHETA and THETAR
3.18.3.1. PTNORM
STAB = TABCYL/ NOZ, PTNORM, [TRAFORM, smatrix,] x1, y1, n1, x2, y2, n2, ... xn, yn, nn
This option is used when the normals (n1, n2, ... nn, where n is specified in degrees measured counter
clockwise from the positive X axis) are to be input for each given point. The interpolation technique defines
a series of curves that go through the given points, matching the specified normals at each point.
3.18.3.2. PTSLOP
STAB = TABCYL/ NOZ, PTSLOP, [TRAFORM, smatrix,] x1, y1, s1, x2, y2, s2, ... xn, yn, sn
This option is used when the slopes (s1, s2, ... sn, where s is specified as y / x) are known at each given point. The fitting scheme is such that the slopes are matched at each point.
3.18.3.3. TWOPT
This option is used when the slopes or normals are specified only at selected points. The program computes
a slope or normal when not specified; it then processes as in Section 3.18.3.1 or Section 3.18.3.2.
3.18.3.4. FOURPT
STAB = TABCYL/ NOZ, FOURPT, [TRAFORM, smatrix,] x1, y1, x2, y2, ... xn, yn
This option defines a series of curves, each one passing through four successive input points. The resulting
TABCYL does not have a continuous slope.
3.18.3.5. SPLINE
This TABCYL is similar to the TWOPT, PTNORM and PTSLOP types, except that the slopes or normals
are adjusted until the curvature is continuous.
3.18.4. NOX, NOY Formats
These formats are identical to the NOZ format (Section 3.18.3) except that the data reference plane is
different.
NOX implies the XZ plane and requires that the points be specified in the y, z order (y1, z1, y2, z2, ..., yn,
zn). NOY implies the ZX plane and requires that the points be specified in the z, x order (z1, x1, z2, x2, ...,
zn, xn).
3.18.5. XYZ Format
This format requires that the symbolic vector (svector) representing the generatrix be specified. Further, the
processor determines which coordinate plane will control the fitting techniques; therefore, no slopes or
normals can be given.
The options (TWOPT, FOURPT, SPLINE) are as outlined in Section 3.18.3.3 through Section 3.18.3.5,
respectively, with the exception that no slopes are given in the TWOPT method.
3.19. The Polyconic (POLCON) Definition
The polyconic surface is defined to be a continuous family of conic sections in parallel planes. The shape of
the conics is regulated by a set of polynomial curves.
Figure 3.68. POLCON Nomenclature
3.19.1. Method of Definition
The input to the polyconic routine is the canonical form of the polyconic, as follows:
POLY1 = POLCON/ CANON, JROOTS,
M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12,
T, Cb, Pb,
A0, A1, A2, A3, A4, A5, A6, A7,
B0, B1, B2, B3, B4, B5, B6, B7,
C0, C1, C2, C3, C4, C5, C6, C7,
D0, D1, D2, D3, D4, D5, D6, D7,
L0, L1, L2, L3, L4, L5, L6, L7,
H0, H1, H2, H3, H4, H5, H6, H7,
P0, P1, P2, P3, P4, P5, P6, P7,
A 1/2, B 1/2, C 1/2, D 1/2, L 1/2, H 1/2, P 1/2
where:
JROOTS
Equal to 2 if there are square root terms, 1 otherwise
M1 - M12
Transformation matrix (may be all zeros)
T
Thickness between defined surface and working surface
Cb
Origin of curves, that is, the start of the polyconic
Pb
Full-size length of the valid region of the surface
A0-P1/2
Coefficients of surface control equations, each of the form:
f(d) = A 1/2 d + A0 + A1d + a2d2 + a3d3 + a4d4 + a5d5 + a6d6 + a7d7
Note
The coefficients of the square root terms for all the surface control equations are in the bottom line of
the canonical form. The square root terms may all be zero (JROOTS = 1).
See Figure 3.68 for a graphic representation of a POLCON.
3.20. The Ruled Surface (RLDSRF) Definitions
A ruled surface is a surface generated by straight lines (called rulings) joining corresponding points on two
space curves. An alternate form of the ruled surface allows substitution of a point of the second space curve.
The space curves are two-dimensional (formed by a plane cutting a surface) and are limited by two end
points. The line joining the end points of a space curve is a base line, whose length considered as unity, or
100 percent. A point on one space curve corresponds to a point on the second space curve when the
associated points on the base lines are of equal percentage.
The following surfaces are permitted within a ruled surface definition: line, plane, circle, cylinder, ellipse,
hyperbola, cone, general conic, loft conic, sphere, quadric and tabulated cylinder.
3.20.1. Six Points and Two Surfaces
A ruled surface may be defined by specifying:
A surface and three points on a plane intersecting the surface (two of the points being end points of the
desired space curve), and a second surface and three points on a plane intersecting the surface (two of the
points being the end points of the second space curve).
Figure 3.69. RLDSRF by Six Points, Two Surfaces
RS1 = RLDSRF/ SURF1, P1A, P1B, P1C, SURF2, P2A, P2B, P2C
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, spoint, ssurface, spoint, spoint, spoint
With reference to Figure 3.69, the following restrictions apply:
P1A, P1B and P1C cannot be colinear (similarly for P2A, P2B and P2C)
P1A, P1B and P2A, P2B must be the end points of the first and second space curves respectively.
3.20.2. Two Surfaces, Four Points and Two Vectors
A ruled surface may be defined by specifying:
A surface and two end points of a plane curve and a vector, and a second surface with two end points of a
space curve and a vector. (The two points and the vector determine an intersecting plane in each case.)
Figure 3.70. RLDSRF by Two Surfaces, Four Points, Two Vectors
RS2 = RLDSRF/ SURF1, P1A, P1B, V1, SURF2, P2A, P2B, V2
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, svector, ssurface, spoint, spoint, svector
3.20.3. Two Surfaces, Five Points and a Vector
A ruled surface may be defined by specifying:
Three non-colinear points to define one intersecting plane and two points, and a vector to define the other
intersecting plane.
Figure 3.71. RLDSRF by Two Surfaces, Five Points, Vector
RS3 = RLDSRF/ SURF1, P1A, P1B, V1, SURF2, P2A, P2B, P2C
$$ or
RS3 = RLDSRF/ SURF1, P1A, P1B, P1C, SURF2, P2A, P2B, V2
Format:
SRLD = RLDSRF/ ssurface, spoint, spoint, svector, ssurface, spoint, spoint, spoint
or
SRLD = RLDSRF/ ssurface, spoint, spoint, spoint, ssurface, spoint, spoint, svector
3.20.4. Replacing One of the Curves with a Point
A rules surface may be defined by using a point as one of the surfaces.
Figure 3.72. RLDSRF by Replacing Curve with Point
RS4 = RLDSRF/ SURF1, P1A, P1B, P1C, P2
$$ or
RS4 = RLDSRF/ SURF1, P1A, P1B, V1, P2
Format:
See Section 14.6 for further information on RLDSRF.
3.21. Nested Definitions
The nested definition permits defining a geometric quantity (except a scalar variable) in the APT statements
that refer symbolically to these quantities. All of the geometric types can be nested except TABCYL,
POLCON and RLDSRF. The following examples illustrate some of the applications of nested definitions.
3.21.1. Nested Geometric Definitions Instead of Symbols
SP3 = SPHERE/ CENTER, (POINT/ INTOF L1, L2), TANTO, (PLANE/ $
PTA, PERPTO, (VECTOR/ PTB, PTC))
In this example, the SP3 is defined by its center and a plane to which it is tangent. However, the center of
the sphere is defined by a nested definition of a point that is the intersection of two lines. Similarly, the plane
is defined by a nested definition as passing through a point and perpendicular to a vector that, in turn, is
defined as a nested definition.
3.21.2. Nested Geometric Definitions with Symbols Attached
It is possible to nest the name a geometric type simultaneously. For example:
SP4 = SPHERE/ CENTER, (PT2 = POINT/ INTOF, L1, L2), $
TANTO, PLANEA
The center of the sphere is defined as a nested point definition and has been assigned the symbol PT2.
3.21.3. Nested Geometric Definitions in Non-Geometric Definition Statements
A nested definition can be used in any APT statement where a surface type is referenced.
REFSYS/ (SMATA = MATRIX/ definition)
ZSURF/ (SPLANA = PLANE/ definition)
FROM/ (SPTA = POINT/ definition)
GOTO/ (POINT/ definition)
GOLFT/ (SLA = LINE/ definition)
GOFWD/ (CIRCLE/ definition), PAST, (SLB = LINE/ definition)
3.21.4. Special Case of Nested Definition
Because of the high incident of POINT in other geometric definition formats, a special nesting capability is
provided for points.
In any part of a geometric definition where it would be valid to write:
(POINT/ a, b)
or
(POINT/ a, b, c)
that is, to use a nested point definition without a symbol attached, it would also be valid to write:
(a, b)
or
(a, b, c)
The POINT/ is not required in this case. For example:
C1 = CIRCLE/ P1, P2, (POINT/ 1, 4, 8)
can be written:
C1 = CIRCLE/ P1, P2, (1, 4, 8)
3.21. Nested Definitions
The nested definition permits defining a geometric quantity (except a scalar variable) in the APT statements
that refer symbolically to these quantities. All of the geometric types can be nested except TABCYL,
POLCON and RLDSRF. The following examples illustrate some of the applications of nested definitions.
3.21.1. Nested Geometric Definitions Instead of Symbols
SP3 = SPHERE/ CENTER, (POINT/ INTOF L1, L2), TANTO, (PLANE/ $
PTA, PERPTO, (VECTOR/ PTB, PTC))
In this example, the SP3 is defined by its center and a plane to which it is tangent. However, the center of
the sphere is defined by a nested definition of a point that is the intersection of two lines. Similarly, the plane
is defined by a nested definition as passing through a point and perpendicular to a vector that, in turn, is
defined as a nested definition.
3.21.2. Nested Geometric Definitions with Symbols Attached
It is possible to nest the name a geometric type simultaneously. For example:
SP4 = SPHERE/ CENTER, (PT2 = POINT/ INTOF, L1, L2), $
TANTO, PLANEA
The center of the sphere is defined as a nested point definition and has been assigned the symbol PT2.
3.21.3. Nested Geometric Definitions in Non-Geometric Definition Statements
A nested definition can be used in any APT statement where a surface type is referenced.
REFSYS/ (SMATA = MATRIX/ definition)
ZSURF/ (SPLANA = PLANE/ definition)
FROM/ (SPTA = POINT/ definition)
GOTO/ (POINT/ definition)
GOLFT/ (SLA = LINE/ definition)
GOFWD/ (CIRCLE/ definition), PAST, (SLB = LINE/ definition)
3.21.4. Special Case of Nested Definition
Because of the high incident of POINT in other geometric definition formats, a special nesting capability is
provided for points.
In any part of a geometric definition where it would be valid to write:
(POINT/ a, b)
or
(POINT/ a, b, c)
that is, to use a nested point definition without a symbol attached, it would also be valid to write:
(a, b)
or
(a, b, c)
The POINT/ is not required in this case. For example:
C1 = CIRCLE/ P1, P2, (POINT/ 1, 4, 8)
can be written:
C1 = CIRCLE/ P1, P2, (1, 4, 8)
Chapter 4. Point-To-Point Programming
The APT language provides the capability for explicitly referencing an absolute location to which the cutter
is to be positioned. This concept of moving a cutter from one specific location directly to another specific
location by means of a single straight line movement is called point-to-point programming. The movement
is accomplished with the APT statements FROM, GOTO, and GODLTA. These statements completely
control the motion of the cutter and require no additional information.
4.1. The Initialization (FROM) Statement
The FROM statement specifies a location at which the tip of the cutter is assumed to be positioned. A
FROM statement should be given before any other statement used to define a cutter position; in this regard it
will not result in any movement of the cutter. However, later FROM statements in the part program will
usually result in a movement of the tool. The general format of the FROM statement is as follows:
FROM/ x, y (See Section 4.4)
The FROM point is specified either symbolically or by listing the x, y and z coordinates. The first optional
field is used to specify information concerning the axis of the cutter (either by referencing a symbolic vector
or by giving the individual components). The last optional field is used to specify a feed rate that is to be in
effect until a new value is specified on a later statement.
Note
If the alternate form is used (FROM/ x, y), the optional fields cannot be used.
4.2. The Absolute Movement (GOTO) Statement
The GOTO statement is used to move a tool from its current point of reference to a specified point. The tip
of the cutter will be located at the specified point. The general format of the GOTO statement is as follows:
GOTO/ x, y (See Section 4.4)
The GOTO point is specified either symbolically or by listing the x, y and z coordinates. The two optional
fields have exactly the same meaning as indicated in the FROM statement, and the same rules apply.
4.3. The Incremental Movement (GODLTA) Statement
The GODLTA statement specifies an incremental value that is to be added to each of the coordinates of the
current tool position. This statement, then, defines the amount of movement of the tool in each axis
direction, rather than the specific point to Which the tool is to move (as did the GOTO statement). The
general form of the GODLTA statement is as follows:
The amount to be added to each coordinate can be specified by listing the values (dx, dy, dz) or by
referencing the components of a symbolic vector (done by specifying svector). The third option (specifying
a single scalar value) indicates the tool is to be moved by that amount directly along the tool axis. (A
positive value for delta generates a movement similar to "withdrawing" the tool; a negative value defines a
movement comparable to a plunge operation.) The optional feed rate field has the same meaning as
indicated in the FROM statement,
4.4. Implication of the ZSURF Statement
The ZSURF statement (see Section 3.2) can be used to supply the z coordinate when the alternate form for
the FROM or GOTO statement is used (that is, FROM/ x, y or GOTO/ x, y). The z coordinate is computed
from the plane defined by the ZSURF statement and is zero if no ZSURF statement is specified.
.5. Pattern Definition Statement
A pattern is a set of one or more points. The maximum number of points that can be included in a pattern is
330. Pattern definition statements may be constructed in such a way that a pattern containing the full 330
points cannot be defined. In this case a diagnostic is issued. If this occurs, the desired pattern can always be
defined by breaking the definition statement up into two patterns and adding them together. Even the very
worst case pattern definition statement can always define at least 230 points. It is very unusual to encounter
a pattern definition that cannot define a full 330 points. Patterns may be defined using the formats listed
below. Pattern definitions may not be nested.
4.5.1. Linear (LINEAR) Patterns
A linear pattern is a set of point locations, all of which lie on a straight line.
4.5.1.1. Start Point, End Point and Number of Equally Spaced Points
The start and end points are included in npoints.
SPAT = PATERN/ LINEAR, spoint1, spoint2, npoints
Figure 4.1. LINEAR PATERN 1
PAT1 = PATERN/ LINEAR, PT1, PT2, 9
$$ or
PAT1 = PATERN/ LINEAR, PT1, VEC1, 9
$$ or
PAT1 = PATERN/ LINEAR, PT1, VEC1, INCR, 8, AT, 1
4.5.1.2. Start Point, a Vector, and Number of Equally Spaced Points
The start point is included in npoints. The distance between the points is equal to the vector magnitude. (See
Figure 4.1)
SPAT = PATERN/ LINEAR, spoint, svector, npoints
4.5.1.3. Start Point, a Vector, and an Incremental Spacing
The start point is not included in npoints. The distance between the points is equal to i. (See Figure 4.1)
SPAT = PATERN/ LINEAR, spoint, svector, INCR, npoints, AT, i
4.5.1.4. Starting Point, a Vector and Successive Increments
SPAT = PATERN/ LINEAR, spoint, svector, INCR, i1, i2, ... in
Where i1, i2, ... in, are the successive increments along the vector.
Figure 4.2. LINEAR PATERN 2
PAT2 = PATERN/ LINEAR, PT2, VEC2, INCR, 2, 1, 1, 3
4.5.2. Arc (ARC) Patterns
An ARC pattern is a set of point locations, all of which lie on a single circle. The points may be defined in
the counterclockwise or clockwise direction by specifying the appropriate modifier as follows:
CLW Clockwise
CCLW Counterclockwise
The angles used in arc PATERN definitions are specified in degrees measured counterclockwise from the
positive X axis.
4.5.2.1. A Circle, Start and End Angles and the Number of Points
Where sa and ea specify the starting and ending angles, respectively. The number of points includes the
starting and ending points in the pattern.
Figure 4.3. ARC PATERN
PAT1 = PATERN/ ARC, C1, 70, 230, CCLW, 5
$$ or
PAT2 = PATERN/ ARC, C1, -130, 70, CLW, 5
$$ or
PAT3 = PATERN/ ARC, C1, 70, CLW, INCR, 200, 40, 40, 40
$$ or
PAT4 = PATERN/ ARC, C1, 70, CCLW, INCR, 4, AT, 40
4.5.2.2. A Circle, Starting Angle, and Angular Increments
Where sa is the starting angle and a1, a2, ... an define the angular displacements between successive points
on the circle in the direction specified by CLW or CCLW. (See Figure 4.3)
4.5.2.3. A Circle, Starting Angle, and Number of Increments at an Angular Spacing
Where sa defines the starting angle, and npoints is the number of points (one less than the resultant total
number of points) to be generated at an angular displacement specified by angle in the direction indicated by
CLW or CCLW. (See Figure 4.3)
4.5.3. Parallelogram (PARLEL) Patterns
A parallelogram pattern is a grid of point locations defined by establishing lines parallel to a specified linear
pattern and projecting the points from the original pattern onto those lines. The definition order for the
points in a parallelogram pattern will be governed by the following rules:
1. The first linear pattern in the list defines a "column", the order of which is that of the linear pattern. 2. A parallelogram pattern will consist of at least one other column parallel to the first column. The
points in the second, fourth, and all even-numbered columns will be ordered in the opposite direction
from those in odd-numbered columns.
For example, in Figure 4.4 PAT5 contains points 1-7. Points 8-14 in the next row are ordered in the opposite
direction; points 15-21 are ordered in the same direction as points 1-7, etc. In this example the first column
consists of points 1-7, the second column consists of points 8-14, etc.
Figure 4.4. PARLEL PATERN 1
PAT6 = PATERN/ PARLEL, PAT5, VEC2, INCR, 2.5, 1.5, 1, 2
4.5.3.1. Two Previously Defined Linear Patterns
SPAT = PATERN/ PARLEL, spat1, spat2
spat1 and spat2 must contain a common point as either their first or last point for this definition.
Figure 4.5. PARLEL PATERN 2
PAT4 = PATERN/ PARLEL, PAT1, PAT2
$$ or
PAT4 = PATERN/ PARLEL, PAT1, VEC1, 5
$$ or
PAT4 = PATERN/ PARLEL, PAT1, VEC1, INCR, 5, AT, 4
4.5.3.2. A Linear Pattern, Vector and Number of Columns
SPAT = PATERN/ PARLEL, spat, svect, n
spat1 and spat2 must contain a common point as either their first or last point for this definition. (See
Figure 4.5)
4.5.3.3. A Linear Pattern, Vector, Increment, and Number of Columns
SPAT = PATERN/ PARLEL, spat, svect, INCR, i, AT, n
Where i specifies the increment in units and n specifies the number of times spat is to be repeated at the
specified interval and direction, not including the original pattern. (See Figure 4.5)
4.5.3.4. A Linear Pattern, Vector, and Increments
SPAT = PATERN/ PARLEL, spat, svect, INCR, i1, i2, ... in
Where i1, i2, ... in will be increments (in units) between columns along the direction specified by svect. (See
Figure 4.4)
4.5.4. Random (RANDOM) Patterns
A random pattern is a collection of point locations not necessarily contained on a line or an arc.
4.5.4.1. Previously Defined Points and Patterns
SPAT = PATERN/ RANDOM, spat1, spoint1, spoint2, spat2, spoint3, ...
Figure 4.6. RANDOM PATERN
PAT10 = PATERN/ RANDOM, PAT1, PT8, PT7, PT6, PT5, PT4, PT3$
PT2, PT1
4.6. Point-Point Motion Commands
A cutter movement to a. series of locations may be specified as follows:
GOTO/ spat
where spat is a previously defined pattern.
The resulting output will be a series of GOTO commands specifying movement of the cutter to each point
location defined in the pattern.
The motion between points will be the minimum possible move between points and will be parallel to the
XY plane unless the z-component of the adjacent points differs.
To increase the flexibility of this command the modifiers, OMIT, CONST, INVERS, RETAIN, AVOID, and
THRU are allowed. Their usage is described in Section 4.6.1 through Section 4.6.6.
4.6.1. INVERS Modifier
This modifier specifies that motion should occur to the point locations in a pattern in the reverse order of
their definition. That is, for a pattern containing N points motion would occur to the N, N-1, ..., 1 points.
4.6.2. OMIT Modifier
Points in a pattern may be omitted by specifying OMIT, N1, N2, N3, ..., N, where N1, N2, N3, ..., N
correspond to the points in the pattern according to their output order (affected by INVERS or CONST).
This modifier allows the specification of pattern elements which are not to be included in a specific point-
point motion sequence.
For example, GOTO/ PAT1, OMIT, 2, 3, 7, where PAT1 is illustrated in Figure 4.7, would cause the cutter
to move to points 1, 4, 5, 6 and 8.
Figure 4.7. Sample Pattern 2
4.6.3. RETAIN Modifier
This modifier allows the specification of certain elements of a pattern to be included in a point-point motion
sequence by specifying RETAIN, N1,.N2,N3, ..., N, where N1, N2, N3, ..., N refer to the output order of the
referenced pattern (affected by CONST or INVERS). For example, GOTO/ PAT1, RETAIN, 4, 6, 7, where
PAT1 is illustrated in Figure 4.7, would cause the cutter to move to points 4, 6, and 7.
4.6.4. AVOID Modifier
A vertical displacement (n) from the normal path between points may be maintained While moving the
cutter from Nth point to the (N1 + 1}th point in the referenced pattern, from the Nth point to the (N2 + 1)th
point, by specifying AVOID n, N1, N2, ..., N. The point references refer to the output order of the pattern
(affected by INVERS and CONST). For example, GOTO/ PAT1, AVOID, 3, 2, 4, would result in the cutter
movement illustrated in Figure68h. (This figure is missing in the original manual -- SED)
4.6.5. THRU Modifier
This modifier is used to specify a range of points for the OMIT, RETAIN, and AVOID modifiers.
For example, GOTO/ PAT1, RETAIN, 2, THRU, 6 would cause the cutter to move to the 2, 3, 4, 5, and 6
points of PAT1.
When using the THRU modifier, the range does not have to be specified in the order of movement. For
example, GOTO/ PAT1, RETAIN, 6, THRU, 2 would also cause the cutter to move to the 2, 3, 4, 5 and 6
points of PAT1.
4.6.6. CONST Modifier
The CONST modifier allows the programmer to specify the point numbers for the OMIT, RETAIN, or
AVOID modifiers according to the definition order instead of according to the output order.
The example in Figure 4.8 illustrates the use of this modifier. GOTO/ PAT1, INVERS, RETAIN, 2, THRU,
4, 6, 8 and GOTO/ PAT1, INVERS, CONST, RETAIN, 11, THRU, 9, 7, 5 will both cause the cutter to
move to the points numbered 11, 10, 9, 7, 5.
Figure 4.8. Sample Pattern 1
4.7. Point-Point Programming Considerations
INVERS, AVOID, and either RETAIN or OMIT may be combined in a single GOTO/ SPAT statement. The
following considerations further explain the effect of combining these modifiers.
4.7.1. Ordering of the Operations Performed on a Pattern
The order of operations (OMIT/RETAIN or AVOID) must be specified in the output sequence of the points.
For example, an AVOID is to occur between the fourth and fifth points of a pattern, the seventh point is to
be omitted, and another AVOID is to occur between the tenth and eleventh points. The modifiers may be
stated as follows:
GOTO/ SPAT, AVOID, 3, 4, OMIT, 7, AVOID, 3, 10
It is permissible to overlap a range of operations of one type with a single operation of another type. For
example, if the fourth through the tenth points and the twelfth through the fifteenth points were to be
retained and AVOID was to occur between the thirteenth and fourteenth points, the following statement
would be permissible:
GOTO/ SPAT, AVOID, 2, 13, RETAIN, 4, THRU, $
10, 12, THRU, 15
If an AVOID was to occur between the sixth and seventh points and the eighth and ninth points, however,
the following statement would be used:
GOTO/ SPAT, RETAIN, 4, THRU, 10, AVOID, 2. 5, $
6, 8, RETAIN, 12, THRU, 15
Chapter 5. Programming a Tool Path
The APT language can be used to direct a cutter along a predetermined path. This chapter introduces the
fundamental language concepts required to accomplish this task. Expansion of some of the more complex
concepts and definition of additional language features are made in Chapter 14. Guidelines and suggested
procedures are stated only in general, since experience is the only way good techniques and reliable methods
are formulated.
Experience in the numerical control industry has shown that the geometric problems involved in APT must
be solved using iterative techniques. Other mathematical approaches are specific in nature and fail to
achieve the necessary degree of generality. Even the more desirable iterative approach used in this processor
may fail in unforeseeable situations. In such circumstances minor part program modifications can be made
to achieve the required results.
5.1. Introduction
Even a brief description of how the tool motion is controlled depends upon an understanding of several
concepts. The individual notations are discussed in Section 5.1.1 through Section 5.1.3, and there
relationships are discussed in Section 5.1.3.4.
5.1.1. Description of Cutter
The cutter shape must be defined before any cutter motion can be specified. The format of the statement that
defines the cutter is:
CUTTER/ d, r, e, f, , , h
Note
The parameters are as shown in Figure 5.1. The parameters must all be positive