RAYPCB · ENGINEERING REFERENCE
NC drill files: coordinates need context
Resolve units, decimal interpretation, tool diameters, plating and hole spans. Decode a coordinate token locally and prepare the questions that prevent ambiguous drilling data.
Original engineering guidance · References checked September 28, 2026
What does an NC drill file describe?
An NC drill file communicates drilling information such as tool selections and hole locations to a manufacturing workflow. Its meaning depends on units, coordinate interpretation, origin and feature definitions. The data must agree with the PCB artwork and drawing. A filename ending in DRL or TXT is a clue about its role, not proof of the exact syntax, encoding or intended hole population.
Separate three questions: where is the feature, what finished hole is required, and how will the manufacturer produce it? Coordinate data addresses part of the first question. Plating, tolerance and layer-span requirements address the second. Production tool selection and compensation belong to the agreed manufacturing process. Confusing these questions can cause a nominal number to be treated as the wrong kind of requirement.
This page owns drill-data interpretation. For physical drilling methods, use the PCB drilling process guide. For the complete release archive, return to PCB file formats and manufacturing handoff.
Read the declarations before interpreting coordinates
| Information | Why it is needed | What to do if unclear |
|---|---|---|
| Units | Defines the physical scale | Obtain the exporter setting and verify a known dimension |
| Decimal representation | Places the decimal in coordinate tokens | Confirm explicit decimals or the declared digit format |
| Omitted-zero convention | Reconstructs absent leading or trailing digits | Do not infer from one plausible hole position |
| Origin and axes | Aligns drills with artwork | Overlay several features across the board |
| Coordinate mode | Distinguishes absolute positions from incremental movement | Use a reader that supports the declared program |
| Tool table | Associates tool identifiers with defined diameters | Keep the table and related reports with the release |
| Hole population | Establishes plating and layer span | Reconcile with the drawing and source design |
Some transfer conventions reduce ambiguity by using explicit decimal coordinates and a defined subset of commands. Ucamco's XNC format information describes one such exchange approach. Do not assume every file called “Excellon” or “NC drill” follows the same subset or the same interpretation rules.
Why omitted zeros can move a hole dramatically
Suppose the declared coordinate format has two integer digits and four fractional digits. The full-width token has six digits. With leading zeros omitted, token 1234 expands to 001234 and represents 0.1234 in the declared units. With trailing zeros omitted, it expands to 123400 and represents 12.34. The visible digits are identical, but the interpreted positions differ by a factor of one hundred.
This is an arithmetic illustration, not a suggested drilling coordinate or file repair. The correct convention must come from the exporter or authoritative format record. One coordinate that looks plausible cannot settle the interpretation. Check multiple positions and a known dimension in a full viewer, including the relationship to the copper and profile.
Explicit decimal coordinates are read literally under their declared units. A token 1.2500 inches represents 31.75 mm because one inch is exactly 25.4 mm. That conversion does not identify an origin or determine whether a program uses absolute or incremental positioning. Scale and position are related but distinct parts of the data interpretation.
Decode one coordinate under an explicit assumption
Enter a token without its X or Y prefix, choose units, declare the integer and fractional widths, and select the literal zero convention. The tool shows the expanded digits and the decoded value in millimeters. Signed coordinates are supported; malformed input and values that exceed the declared digit width are rejected.
NC Drill Coordinate Decoder
This is deliberately a one-token decoder. It does not read a drilling program, infer the correct convention, apply an origin, accumulate incremental moves, execute routing commands or interpret tool changes. A successful calculation means the entered token can be interpreted under your chosen assumptions. It does not mean those assumptions are correct for the original file.
The hole-classification field keeps unresolved PTH or NPTH intent visible but does not change the coordinate arithmetic. Save the source of your format assumption in the reference field. If you do not know it, use the illustrative mode to learn the behavior and ask the release owner for the actual setting before applying a result to manufacturing.
Tool identifiers and diameters require context
A tool identifier connects locations with a declared tool entry. Keep its diameter and units unambiguous, and retain a report when it helps reconcile counts and populations. Do not merge files solely because they use the same tool number: identifiers can be local to each file, so T01 in one population need not describe the same diameter as T01 in another.
Likewise, do not assume a nominal drill entry is the final acceptance diameter of a plated hole. Finished hole requirements, plating and process compensation must be agreed with the manufacturer. State the finished requirement and its tolerance on the appropriate drawing. The fabricator can then review a production method without being forced to infer intent from a list of tools.
When a tool table appears inconsistent with the drawing, report the discrepancy explicitly. Avoid silently changing a diameter in the NC file while leaving the source design and report untouched. A corrected release should keep the design, machine-readable data and written requirements coherent. Manual local repairs are difficult to reproduce in the next revision.
PTH, NPTH and layer span are separate classifications
Plated through holes and non-plated holes can have similar or identical diameters. Diameter does not determine plating. A hole used for mechanical mounting may still have a particular copper or plating requirement, while a via belongs to an electrical interconnection structure. Use the released design and drawing to assign those functions.
Layer span adds another dimension. Through holes, blind connections and buried connections have different relationships to the stackup and manufacturing sequence. Preserve the appropriate drill-pair or span information, and identify any special construction in the fabrication notes. Combining populations into one unexplained file can erase information required to plan the build.
Slots, counterbores, countersinks and controlled-depth features need explicit definitions too. A slot centerline alone does not describe every finished requirement. State width, end geometry, plating, depth or tolerance as applicable, and agree the accepted transfer representation. An unsupported combination should go to engineering review rather than being reduced to a generic round-hole description.
Diagnose scale and registration with several features
Start by checking a known board dimension in the imported artwork and drilling data. Then compare holes with their intended lands at different regions. A constant translation may indicate an origin mismatch; a consistent scale discrepancy may indicate units or decimal interpretation. A rotated or reflected set needs a different investigation. These are diagnostic clues, not conclusive diagnoses by themselves.
Choose reference features that are widely separated and easy to identify. A single hole near the origin can appear correct even when other positions are wrong. Include a feature near the far edge and one away from the same axis. Check the profile as well, so a misleading copper-only comparison does not conceal an outline problem.

If only some features disagree, examine file populations and revision consistency. A stale slot file can coexist with a current round-hole file. A changed connector can reveal an old drill export while unchanged mounting holes still align. Record the exact files and affected locations before regenerating the release.
Example: two files share T01 but not the same hole
An illustrative release contains separate plated and non-plated drill files. Each begins with a T01 entry, but the declared diameters differ. A person combining the files by copying coordinate lines under one tool table can unintentionally apply the wrong tool definition to one population. The repeated identifier is not the defect; the undocumented merge is.
Keep populations separate when that is the agreed handoff, or use a controlled export that preserves the required distinctions. Reconcile the resulting hole counts, diameters, spans and locations with the drawing. A report should help the receiving engineer understand the job, not create a second conflicting source of truth.
This example is a reasoning aid rather than a customer case. It demonstrates why reviewing syntax in isolation is insufficient. The relationship among tool definitions, coordinate locations and physical requirements determines whether the data communicates the intended board.
Send drill questions with the surrounding evidence
Include the original data, board revision, exporter version, expected units, known dimension and the relevant drawing. Describe whether the concern is scale, offset, a missing population or an unclear finished requirement. A precise observation helps the receiving team reproduce the issue without guessing at private design intent.
For application-specific export steps, continue to the Altium release guide or KiCad fabrication guide. For complete design feasibility, use PCB DFM review. The coordinate decoder is optional and never a condition for submitting an enquiry.

NC drill file questions
Is a drill map the same as an NC drill file?
Not necessarily. A map or drawing can show locations and symbols for human interpretation. Machine-readable drilling data supplies information in an agreed syntax for the receiving workflow. Both can be useful, but identify their roles and ensure that they describe the same revision.
Can the decoder identify my file's format automatically?
No. You declare the units and coordinate convention. The decoder performs bounded arithmetic on one token and reports its assumptions. It does not inspect a file header or decide which interpretation matches the design. Resolve unknown declarations with the exporter and a full CAM review.
Should I change the drill origin to fix a misaligned viewer image?
First identify why the data is misaligned. Check exporter settings, units, decimal interpretation, revision and the viewer import configuration. A manual shift can hide the symptom while leaving other files or features inconsistent. Regenerate and review a coherent release when a source setting is corrected.
Bring the files and the release requirements together
Send the board revision, construction, quantity and the file or engineering question you need reviewed. Identify unresolved requirements so the response can address them.
Send requirements for reviewOptional: attach the downloaded worksheet manually. This guidance does not certify a design, approve a shipment or replace the applicable authorized standards.