PCD Coordinate & G-Code Generator
Hole Pattern
G-Code Parameters (Fanuc)
Live Pattern Preview
Understanding Pitch Circle Diameter (PCD) Coordinates
A Pitch Circle Diameter (PCD), also referred to as a bolt circle, represents the imaginary circle passing through the exact centers of a circular pattern of holes (like on a pipe flange, wheel hub, or coupling). To machine these patterns on standard 3-axis CNC vertical milling machines, programmers must convert the polar coordinates (radius and angle) into Cartesian coordinates (X and Y offsets from the center coordinate system G54).
The core trigonometry equations used to compute each hole coordinate are:
X_i = X_center + (PCD / 2) * cos(theta_i)Y_i = Y_center + (PCD / 2) * sin(theta_i)
Where PCD / 2 represents the radius of the bolt circle, and theta_i is the absolute angular position of the hole i, calculated dynamically depending on the start angle and number of divisions.
How to Use the PCD Coordinates Calculator
- Center X & Y Coordinate: Enter the coordinate offsets of the circle's center relative to your part origin (G54 G90 coordinate). By default, these are set to 0.
- Pitch Circle Diameter (PCD): Enter the total diameter of the bolt circle in millimeters.
- Number of Holes: Enter how many holes are in the circular array. The calculator handles patterns ranging from 2 up to 128 divisions.
- Start Angle: Specify the angle of the first hole relative to the standard 3 o'clock position (positive X-axis). A start angle of 90 degrees starts the first hole at the 12 o'clock position (positive Y-axis).
- Click Calculate: Instantly view the structured table containing the relative G-code coordinates, absolute coordinates, and step-by-step offsets.
Shop Floor G-Code Integration
After calculating the Cartesian coordinates, you can transfer these values directly into standard drilling canned cycles. For example, in a Fanuc or Haas G-code system, you can set the canned cycle (such as G81 for basic drilling, or G83 for peck drilling) and specify the X and Y coordinates for each hole division sequential block, canceling with G80 at the end of the sequence.
PCD Coordinates Frequently Asked Questions (FAQ)
Q: What is a start angle and how does it affect Cartesian layout?
A: The start angle defines the rotational position of the first hole. In trigonometry, 0° is on the positive X-axis (east), 90° is on the positive Y-axis (north), 180° is on the negative X-axis (west), and 270° is on the negative Y-axis (south).
Q: Why is my first hole coordinates not perfectly integer?
A: Due to trigonometric sine and cosine functions, values are rounded to the nearest ten-thousandth of a millimeter (four decimal places 0.0001 mm) which is standard resolution for precision CNC encoders.
Q: How do I handle unevenly spaced holes on a bolt circle?
A: This calculator is designed for symmetrical spacing (equal angle index divisions). For asymmetric layout patterns, individual coordinates must be calculated step-by-step using separate polar-to-Cartesian trigonometry.
Want to master bolt circle layout, polar coordinate commands (G15/G16), and coordinate rotation systems?
Read the Ultimate PCD Calculator Guide (5,000+ Words) →