CNC math

for machinists
and programmers

Welcome to the Documentation Page

This is where we'll cover some of the finer details about the calculators in the app. If you're looking for even more technical, developer-level documentation, head over to the repository on GitHub.

Implied Units

  • Angles are assumed to be in degrees (180). Optionally use radians by inlcuding rad with the input (ex. 3.14159rad).
  • Lengths are assumed to be in inches (ex. .23622). Optionally use millimeters by including mm with the input (ex. 6mm).
  • Feed greater than 0.2 is assumed to be inches per minute, otherwise, inches per revolution.
  • Speed greater than 500 is assumed to be rpm, otherwise, surface feet per minute.

Some of the input fields use implied units. A length input for example, is assumed to be given in inches. If you would like to input a length measured in millimeters, just include mm after the number (no space). Example: .23622 or 6mm. Regardless of which is given, the results of the calculation will be output in imperial units.


The logic for implied units is slightly more sophisticated when dealing with feed and speed inputs. Feed may be stated in inches per revolution or inches per minute. Speed may be stated in surface feet per minute or revolutions per mintue. The default unit for these fields is dynamic; the unit is assumed based on the magnitude of the input. It is assumed that when Speed = 1500 the unit is rpm, not surface feet. Similarly, feed of 8.4 is assumed to be inches per minute, not inches per rev.

The Unit Circle

Enter an angle and optionally, a scale factor (a unitless length). The unit circle's name implies that the radius of the circle is 1 unit, however, the length input scales the radius of the circle.


Note that when no scale factor is used, the cosine and sine components respectively show the fraction of the hypotnuse length that is projected onto the horizontal and vertical axes.


Related reading: wikipedia.org/wiki/Unit_circle.

Feed and Speed

The input boxes in this section use implied units. See the section above for details on data input.


The simplest calculation in this section requires an rpm input and a feed input. A calculation can be made with just these two values to express the feed in the "other" unit. If inches per minute is given, inches per rev is calculated and the other way around. Additional calculations will requirem more input. When surface speed (sfm) is given along with a feedrate for example, a diameter is also needed before the result will be displayed.

3 +1 Axis Positioning

This section applies to milling platforms equiped with a rotary table, sometimes called a "tombstone". Both A-axis (vertical machines) and B-axis (horizontal machines) rotary tables are in scope. The result of the calculation and the graphical output will be tailored for the configuration selected, but the underlying mathematics is the same for both cases.


It is imperative to understand the inputs and how to interpret the result:


Rotary Axis - this is where you select the machine's configuration. The calculation is done for either: a vertical mill outfit with an A-axis, or a horizontal mill outfit with a B-axis. Once the configuration is selected, the angular position of the axis is needed; that is the second input.


Location of Axis - there are two components to this input. We need to know where the center of rotation is located in the machine's working envelope. These two input values are components of a vector from machine-zero to the center of rotation.


Axis to Point - The two values needed here are components of a vector starting at the center of rotation and ending at some point of interest (a fixture, a part, a certain feature on a part, etc).


Result - The result is the vector from machine-zero to the point of interest, after the rotation has been applied.

Attributions

A special thanks to the folks running thenounproject.com and to the contributing artists: