Basic Math For CNC
Basic Math For CNC
Basic Math For CNC
1 Brief description
Objective of the module:
Working through this module you learn the mathematical approach necessary for the programming
and for the calculation of missing contour points.
In this module contour points will be calculated using the Pythagorean theorem and trigonometrical
functions (sine, cosine and tangent).
Content:
Types of angles
Trigonometrical functions
Example calculations
Types of
angles
The Pythago-
rean theorem
Trigonometri-
cal functions
Example
calculations
Basic mathematical
principles:
END
Notes
Notes
2.1 Basic principles of coordinate evaluation
For part programming the respective endpoint of the contour element must
be known.
In most cases these contour points can be taken directly from the drawing
provided dimensioning is NC-suitable. In some cases, however, the an
evaluation of coordinates may be necessary. For these calculations a ba-
sic knowledge of the types of angles, trigonometrical functions and the Py-
thagorean theorem is required.
In the case of oblique work piece contours angles with a definite relation-
ship to one another result between the contour sections. Depending on
their relative position a differentiation is made between complementary an-
gles, step angles and side angles.
The various sides of the right angled triangle are named specifically:
The longest line opposite the right angle is called the hypotenuse.
The two other lines, which form the right angle, are called cathetus.
The side opposite an angle is called the opposite side.
The bounding side of the angle is called the adjacent side.
In case of a right angled triangle the missing length of a side can be calcu-
lated if the length of the other two sides is known. For this the Pythagorean
theorem is used.
Pythagorean theorem:
c²= a² + b²
5x5=25
c
a 3x3=9
16+9=25
4x4=16
c = a2 b2
b = c2 a2
c2 b2
By suitable rearrangement of
the equations the respective a =
sides can be calculated.
Notes
The trigonometrical ratios describe the relationships between the angles
and the sides in a right angled triangle. With the aid of these trigonometri-
cal functions it is possible to calculate both angles and sides in a right an-
gled triangle. For this one side and an angle or two sides must be known.
The selection of the suitable trigonometrical function, i. e. the sine, cosine
or tangent, depends on which sides and angles are known and which side
or angle is to be found.
2. Hypotenuse (H)
3
α
By the use of the various trigonometrical functions all sides and angles can
be calculated.
Sine function
OS OS
sin α H OS sin α * H
H sin
Cosine function
AS AS
cos H AS cos *H
H cos
Tangent function
OS OS
tan AS OS tan * AS
AS tan
P1 M1 P2 P3 P4 M2
X 25 35 40 30
Z -20 -20
The values for the spaces shown with a dark background are dimen-
sions that can be taken directly from the drawing.
Notes
5.2 Solution for the example calculation
P1 M1 P2 P3 P4 M2
X 25 35 27,929 37,071 40 30
Since the two sides are equal, all values can be found using the Pythago-
rean theorem.
xp2 5 5² / 2 3,5355
zp2 xp2 3,5355
zp4 zp2 * ( 1) 3,5355
xp3 zp4 3,5355