Skip to content

Subtract

Marius Stanciu edited this page Oct 29, 2026 · 1 revision

The Subtract tool combines the area of one or more objects (the Subtractors) with a Target object. It can remove, keep or XOR that area. The result is a new object. Use it to cut a board outline out of a copper layer, or to clear a pad area from a fill.

Where to find it

  • Menu: Plugins > Subtract.
  • Keyboard: Alt+W.
  • The panel opens in a tab next to Project and Properties. The tab shows the plugin name.

Quick start

  1. Load the target object and the subtractor object or objects.
  2. Press Alt+W to open the tool.
  3. In Target, select the Type (Gerber, Geometry or Excellon). Select the target in the Object combo box.
  4. In Subtractors, check the objects whose area you want to use.
  5. Keep Operation at Subtract.
  6. Check the Output name. The default is the target name with the suffix _sub.
  7. Click Preview to see the subtractor area on the canvas. Optional.
  8. Click Subtract. The result is a new object.

Screenshot placeholder: images/Subtract-1.png — the Subtract panel with the Target, Subtractors and Parameters sections, and a preview of the subtractor area on the canvas.

Parameters

Target

Parameter Description Default
Type (Gerber / Geometry / Excellon) The kind of the target object. It filters the Object combo box. Gerber
Object (combo box) The target object. The result is a new object. The target is not changed unless Keep target is off. —
Apertures / Tools (list) The apertures of a Gerber target, or the tools of an Excellon or Multi-geometry target, that are changed. Checked items are used. Unchecked items are copied unchanged. Shown in Advanced mode only. All checked

Subtractors

Parameter Description Default
Subtractors list The objects whose area is used. Check one or more objects. The target cannot be a subtractor. —
Apertures / Tools of the highlighted subtractor (list) Chooses the apertures or tools that give the area of the highlighted subtractor. Shown in Advanced mode only. All checked

Parameters

Parameter Description Default
Operation (Subtract / Intersect / XOR) Sets the operation. See the list below. Subtract
Margin Grows the subtractor area by this distance before it is used. In mm (or inch in an inch project). Range 0 to 10000. Shown in Advanced mode only. Lines of a Geometry subtractor give an area only when the margin is above 0. 0.0
Close paths (checkbox) Geometry target only. Unites the polygons and closes the cut paths. Shown in Advanced mode only. On
Output name The name of the new object. If the name exists, a number is added. You can type a name. Changing the target resets the name to the target name with the suffix. Target name + _sub
Keep target (checkbox) On: the target stays. Off: the target is deleted and the result takes its name. Undo brings the target back. On
Delete subtractors (checkbox) On: deletes the subtractor objects after a successful operation. Undo brings them back. Off

Operation (combo values):

  • Subtract: Removes the subtractor area from the target.
  • Intersect: Keeps only the part of the target inside the subtractor area.
  • XOR: Keeps the parts that are in only one of the two areas. Not available for an Excellon target. If you choose an Excellon target while XOR is set, the tool changes the operation to Subtract.

Buttons

Button Description Default
Preview Draws the subtractor area, with the margin, on the canvas. The next run, Reset Tool or closing the tool clears the preview. —
Subtract Runs the operation. The button text changes to Intersect or XOR when you choose those operations. The result is a new object. —
Reset Tool Resets the tool parameters. —

Advanced

  • Level. The button at the top of the tool switches between Beginner and Advanced. Beginner hides the list of apertures or tools, Margin and Close paths. Advanced shows them.
  • Tool selection. In Advanced mode, the checked apertures or tools are used. Unchecked items are copied unchanged into the result. For a subtractor, the highlighted item in the list controls its own apertures or tools.
  • Preview. The preview shows the subtractor area with the margin applied.
  • Target type. The Type box sets the target kind. The Geometry target has Close paths. The Excellon target has no XOR.
  • Undo. Undo brings back a target that was removed by Keep target off, and subtractors removed by Delete subtractors.
  • Preferences. The defaults come from tools_sub_close_paths, tools_sub_keep_target, tools_sub_delete_subtractors, tools_sub_operation, tools_sub_margin and tools_sub_suffix.
  • Tcl. The command subtract_objects (alias subtract) runs this tool. See Tcl Command Reference.

See also

Clone this wiki locally