Skip to content

Drilling

Marius Stanciu edited this page Oct 29, 2026 · 2 revisions

The Drilling plugin creates a CNC job (G-code) from an Excellon object. The job drills the holes of the tools that you select. It can also drill slots as a row of holes. Use it for PCB holes and for any Excellon drill file.

Where to find it

  • Plugin Toolbar: click Drilling.
  • Plugins menu: select Drilling (shortcut Alt+D).
  • The plugin panel opens in a new tab of the side panel. The tab shows the plugin name.

The plugin creates a CNCJob object. See CNCJob Object for what you can do with it.

Screenshot placeholder: images/Drilling-1.png - The full Drilling panel in Beginner mode. Show the Source Object combo, the Tools Table, the Parameters for Tool frame and the Generate CNCJob object button.

Quick start

  1. Load an Excellon file. See Importing Files.
  2. Open the plugin with Alt+D or the Drilling button.
  3. Select the Excellon object in Source Object.
  4. Click the rows of the Tools Table that you want to drill. Click the # header to select all tools.
  5. Set Cut Z to a negative value. This is the depth of the holes.
  6. Set Travel Z, Feedrate Z and Spindle speed for your machine.
  7. Select the Preprocessor for your machine.
  8. Click Generate CNCJob object.
  9. Check the result on the canvas. Save the G-code as described in Exporting Files.

Parameters

Values are in mm, or inch in an inch project. Default values come from defaults.py. A dash (—) means that the value has no stored default.

Beginner and Advanced mode: Use the Beginner / Advanced button next to the title. Beginner mode hides the parameters marked "Advanced" below. In Beginner mode the job ignores most of these options, even when they are set: Multi-Depth, Dwell, Dwell at bottom, Peck drilling, Spot drilling, Drill slots, the job transform, Add objects, the hole areas and the exclusion areas. The job still uses the hidden values of Offset Z, Start Z, End move X,Y, Spindle direction, Fast Plunge and Fast Retract. See Beginner and Advanced mode.

Source Object

Parameter Description Default
Source Object The Excellon object to drill. Only Excellon objects are listed. —
Add objects (Advanced) A list of other Excellon objects. They are drilled in the same job. Their tools are merged with the tools of the source object by diameter. Click an object to add it or to remove it. The objects themselves do not change. None selected

Screenshot placeholder: images/Drilling-2.png - The Source Object section with the Add objects list (Advanced mode).

Tools Table

The table shows one row for each tool. The last 2 rows show the totals of drill holes and slots.

Column or control Description Default
# The tool number. With a toolchange, this number is the T number in the G-code (T1, T2 ... Tn). Tools are selected for G-code generation by their rows. From the file
Diameter The tool diameter. It is the cut width in the material. From the file
Drills The number of drill holes for this tool. From the file
Slots The number of slots for this tool. A slot is drilled only when Drill slots is on. From the file
Tool order The order in which the selected tools are drilled. Default: the order from the file. Forward: from small to big diameter. Reverse: from big to small diameter. Default (tools_drill_tool_order)
Search DB (Advanced) Searches the Tools Database for tools with a close diameter. It replaces the tools of the table with the DB tools. See Tools Database. —

Select a row to show and edit its parameters. With several rows selected, the form shows the first selected tool. Use Apply parameters to all tools (Advanced) to copy the current form to all tools.

Screenshot placeholder: images/Drilling-3.png - The Tools Table with 3 tools, the total rows and the Tool order combo.

Parameters for Tool

These values belong to the selected tool. Each tool keeps its own values.

Parameter Description Default
Cut Z The drill depth. Use a negative value. It is measured below the copper surface. -1.7 (tools_drill_cutz)
Multi-Depth (Advanced) Cut the hole in several passes. Each pass goes down by Depth per pass. The job repeats the passes until Cut Z is reached. Off (tools_drill_multidepth)
Depth per pass (Advanced) The depth of each pass. Use a positive value. Shown with Multi-Depth. 0.7 (tools_drill_depthperpass)
Travel Z The height of the tool when it moves between holes. Use a value above zero. 2 (tools_drill_travelz)
Feedrate Z The speed of the vertical move down into the material, in units per minute (G01). This is the plunge feedrate. 300 (tools_drill_feedrate_z)
Feedrate Rapids The speed of the rapid move (G00), in units per minute. It is shown only for the Marlin preprocessor. 1500 (tools_drill_feedrate_rapid)
Spindle speed The spindle speed in RPM. The value is optional. Use 0 to keep the speed from the machine. 0 (tools_drill_spindlespeed)
Min Power Laser preprocessors only. The laser power while it travels. Above 0, the laser stays on between cuts at this power. Keep 0 to turn the laser off between cuts. 0.0 (tools_drill_min_power)
Turn ON Code Laser preprocessors only. The G-code that turns the laser on. Choices: M03 (spindle or laser on, clockwise) and M04 (on, counter-clockwise). M03 (stored as M3, tools_drill_laser_on)
Dwell (Advanced) Pause the spindle before the cut to let it reach its speed. Enter the time in Dwell time. Off (tools_drill_dwell)
Dwell time (Advanced) The pause time in time units (seconds). Shown with Dwell. 1 (tools_drill_dwelltime)
Offset Z (Advanced) Compensates Cut Z for drill bits with a pointed tip. Larger bits must drill deeper to make the exit hole the right size. 0.0 (tools_drill_offset)
Drill slots (Advanced) Drill the slots of the tool with a row of holes. Without this option, the slots are not drilled. A warning shows this. Off (tools_drill_drill_slots)
Overlap (Advanced) The overlap of the drill holes along a slot, in percent of the tool diameter. Shown with Drill slots. 0.0 % (tools_drill_drill_overlap)
Last drill (Advanced) If the slot length is not an exact multiple of the overlap, add a drill hole at the end point of the slot. Shown with Drill slots. On (tools_drill_last_drill)
Dwell at bottom (Advanced) Pause at the bottom of each hole for the Dwell time. The pause is done even when Dwell is off. Laser preprocessors ignore this option. Off (tools_drill_dwell_bottom)
Peck drilling (Advanced) Drill each hole in steps. After each step the tool goes up to Travel Z to clear the chips. Then it goes down fast to the Peck retract height and feeds on. Peck replaces Multi-Depth. Laser preprocessors ignore this option. Off (tools_drill_peck)
Peck depth (Advanced) The depth of each peck step. Use a positive value. Shown with Peck drilling. 0.5 (tools_drill_peck_depth)
Peck retract (Advanced) The clearance above the previous depth. The tool goes down fast to this height after the full retract, and then feeds on. Shown with Peck drilling. 0.2 (tools_drill_peck_retract)
Spindle direction (Advanced) The direction of the spindle. CW (clockwise) or CCW (counter-clockwise). Laser preprocessors ignore this option. CW (tools_drill_spindledir)
Fast Plunge (Advanced) The vertical move from the toolchange height to Travel Z is done with G0 (the fastest speed). The move is done at the toolchange X,Y position. Off (tools_drill_f_plunge)
Fast Retract (Advanced) Exit strategy. When off, the tool leaves the hole slowly with Feedrate Z up to zero depth and then moves fast to Travel Z. When on, the tool moves from Cut Z to Travel Z in one fast move (G0). Off (tools_drill_f_retract)
Apply parameters to all tools (Advanced) Copies the values of the current form to all tools in the Tools Table. —

Screenshot placeholder: images/Drilling-4.png - The Parameters for Tool frame in Advanced mode with the Drill slots, Peck drilling and Fast Retract options visible.

Common Parameters

These values apply to the whole job.

Parameter Description Default
Tool change Z Adds the tool-change sequence to the G-code. The machine pauses for the tool change. The change is done at Toolchange X-Y and Tool change Z. Off (tools_drill_toolchange)
Tool change Z (height) The Z height for the tool change. 15 (tools_drill_toolchangez)
Toolchange X-Y The X,Y position of the tool change. Format: x, y. Shown with Tool change Z. 0.0, 0.0 (tools_drill_toolchangexy)
Start Z (Advanced) The height of the tool just after the start of the job. Leave the field empty if you do not need this. Empty (tools_drill_startz)
End move Z The height of the tool after the last move of the job. 15 (tools_drill_endz)
End move X,Y (Advanced) The X,Y position of the last move, in the format (x,y). If the field is empty, the job makes no X,Y move at the end. Empty (tools_drill_endxy)
Probe Z depth The maximum depth the probe may go, as a negative value. Shown only for a probe preprocessor (its name contains toolchange_probe). -0.02 (tools_drill_z_p_depth)
Probe plate thickness The thickness of the touch plate on top of the material. After probing, the tool tip is set to this height, so Z = 0 stays at the top of the material. Shown only for a probe preprocessor. 0 (tools_drill_probe_plate)
Feedrate Probe The feedrate while the probe probes. Shown only for a probe preprocessor. 75 (tools_drill_feedrate_probe)
Preprocessor The preprocessor file that sets the G-code output for Excellon objects. See Preprocessors. default (tools_drill_ppname_e)
Spot drilling (Advanced) Adds a first pass over all selected holes with a spot drill. The spot drill is an extra tool with its own number. It needs Tool change Z. Without it, the spot pass is not made. Laser preprocessors ignore this option. Peck, Multi-Depth and the dwell at the bottom do not apply to the spot pass. Off (tools_drill_spot)
Spot drill dia (Advanced) The diameter of the spot drill. Shown with Spot drilling. 1.0 (tools_drill_spot_dia)
Spot Cut Z (Advanced) The depth of the spot holes. Use a negative value. Shown with Spot drilling. -0.3 (tools_drill_spot_cutz)
Spot Feedrate Z (Advanced) The Z feedrate of the spot holes. Shown with Spot drilling. 300 (tools_drill_spot_feedrate_z)
Add exclusion areas (Advanced) Adds exclusion areas. In these areas, the tool may not travel. Shows the exclusion table and its controls. Off (tools_drill_area_exclusion)
Strategy (Advanced) What the tool does at an exclusion area. Over: the tool rises to Over Z and moves over the area. Around: the tool goes around the area. Over (tools_drill_area_strategy)
Over Z (Advanced) The height the tool rises to, to avoid an exclusion area when Strategy is Over. 1.0 (tools_drill_area_overz)
Add Area (Advanced) Draws an exclusion area on the canvas. Use the shape selector next to it. —
Square / Polygon (Advanced) The shape of the area that you draw. Shown with Add Area, Add Hole Area. Polygon (tools_drill_area_shape)
Delete All (Advanced) Deletes all exclusion areas. —
Delete Selected (Advanced) Deletes the exclusion areas that are selected in the table. —
Job offset X,Y (Advanced) Moves all drill points of the job by this X,Y distance. The move is done after the mirror and before the array. Empty means no move. The Excellon object does not change. Empty (tools_drill_job_offset_xy)
Job mirror (Advanced) Mirrors all drill points of the job. No: no mirror. X: the Y values flip (mirror on the X axis). Y: the X values flip (mirror on the Y axis). XY: both. The mirror is done first. No (tools_drill_mirror)
Mirror point X,Y (Advanced) The point where the mirror axes cross. Empty: the center of the bounding box of the selected holes. Empty (tools_drill_mirror_point)
Array columns (Advanced) The number of copies along X. 1 means no array. 1 (tools_drill_array_columns)
Array rows (Advanced) The number of copies along Y. 1 means no array. 1 (tools_drill_array_rows)
Array pitch X,Y (Advanced) The distance between the copies along X and along Y. The array is made last, after the mirror and the offset. Empty (tools_drill_array_pitch)
Holes (Advanced) All: drill all holes. Inside area: drill only the holes inside the hole areas that you draw. The areas are used before the mirror, the offset and the array. All (tools_drill_holes_selection)
Add Hole Area (Advanced) Draws an area on the canvas. With Holes: Inside area, only the holes inside the areas are drilled. These areas are not exclusion areas. —
No hole areas / Clear Hole Areas (Advanced) Shows the number of hole areas. Clear Hole Areas deletes them. —
Generate CNCJob object Creates the CNCJob object for the selected tools. Select at least one tool first. —
Reset Tool Sets the parameters of every tool back to the defaults of the object. —

Screenshot placeholder: images/Drilling-5.png - The Common Parameters frame with the exclusion area table and the job transform options (Advanced mode).

Advanced

How the job is built

  1. The plugin takes the selected tools. It sorts them by the Tool order combo.
  2. It makes the drill points of each tool. Slots are converted to drill points only when Drill slots is on.
  3. With Holes: Inside area, only the points inside the hole areas are kept.
  4. The job transform is applied: mirror, then offset, then array.
  5. The plugin checks the exclusion areas. If a drill point is inside an exclusion area, the job stops with the message "Drill points inside the exclusion zones."
  6. The CNCJob object is created.

Checks before the job is made

  • Travel Z must be above zero. Otherwise the job stops.
  • Feedrate Z must be above zero. Otherwise the job stops.
  • If a tool has slots and Drill slots is off, a warning tells you how many slots are not drilled.
  • If tools have the same diameter but different parameters, a warning lists them.
  • Without a toolchange, the first tool's Cut Z, Feedrate Z and Spindle speed are used for all tools.
  • With Spot drilling, the spot pass is left out when Tool change Z is off. A warning shows this.
  • A laser preprocessor does not run the checks for Travel Z and Feedrate Z.

Peck drilling and Multi-Depth

  • Peck and Multi-Depth do not run together. When Peck drilling is on, the peck steps replace the Multi-Depth steps. A warning shows this.
  • The depth list for a peck job goes down by Peck depth until it reaches Cut Z. The last step is always at Cut Z.

Laser preprocessors

  • A laser preprocessor has a name that contains "laser". The form then shows Min Power and Turn ON Code.
  • For a laser preprocessor whose name contains "laser_z", Travel Z is named Focus Z, and Feedrate Z is shown.
  • Options that do not apply to a laser are hidden: Peck drilling, Dwell at bottom, Spindle direction, Multi-Depth and Cut Z.

Probe preprocessors

A preprocessor whose name contains "toolchange_probe" shows the probe fields: Probe Z depth, Probe plate thickness and Feedrate Probe.

Limits

  • The Excellon file must have at least one drill. Otherwise the job stops.
  • Select at least one tool that has drill points. Otherwise the job stops.
  • Holes: Inside area needs at least one hole area. Otherwise the job stops.

See also

Clone this wiki locally