.KICAD_MOD File Format – Zones and groups

KiCad footprint

Introduction

A zone is an area bounded by a polygon: copper that KiCad fills around a net, or a rule area that forbids things inside it. A group ties items together. Both occur in footprint files and in board files with the same syntax. This page covers what the KiCad 10.0 and 9.0 programs write and the older forms the 10.0 reader accepts. Square brackets mark optional parts, lengths are in millimetres and angles in degrees. Zone coordinates are board coordinates, also inside a footprint.

Zone syntax

(zone
  [(net "NAME")]
  [(locked yes)]
  (layer "NAME") | (layers "NAME" …)
  (uuid "…")
  [(name "…")]
  (hatch none|edge|full PITCH)
  [(priority N)]
  [(attr (teardrop (type padvia|track_end)))]
  (connect_pads [yes|no|thru_hole_only] (clearance C))
  (min_thickness T)
  [(keepout …) (placement …)]
  (fill …)
  [(property (layer "NAME") (hatch_position (xy X Y))) …]
  (polygon (pts …)) …
  (filled_polygon (layer "NAME") [(island yes)] (pts …)) …)
  • net is written only for a copper zone that is not a rule area. A footprint saved to a library has none.
  • hatch sets how the outline is drawn on screen: not hatched, hatched at the edge, or hatched all over, with the given spacing.
  • Zones with a higher priority are filled first; the default is 0.
  • connect_pads says how pads of the same net join the copper: no word for thermal reliefs, yes for solid, no for not at all, thru_hole_only for thermal reliefs on through-hole pads only. clearance is the distance kept from other copper.
  • attr marks a zone made by the teardrop tool, for a pad or via, or for the end of a track. Such zones are written without uuid and name.
  • property holds settings for one layer; the only one is the position that anchors a hatched fill. KiCad 9.0 has no such item.
  • The first polygon is the outline and any later ones are holes. Points may include arc segments, as for polygon shapes. In a footprint, a zone with no outline points is dropped.
  • A rule area, or a zone with no copper layer, is given no net.
  • Each filled_polygon is one piece of computed copper on one layer. island marks a piece with no connection to the net.

Fill settings

(fill [yes]
  [(mode hatch)]
  (thermal_gap G) (thermal_bridge_width W)
  [(smoothing chamfer|fillet) [(radius R)]]
  (island_removal_mode N) [(island_area_min A)]
  [(hatch_thickness T) (hatch_gap G) (hatch_orientation A)
   [(hatch_smoothing_level N) (hatch_smoothing_value V)]
   (hatch_border_algorithm hatch_thickness|min_thickness)
   (hatch_min_hole_area R)])
  • yes means the zone has been filled. Without mode the fill is solid; mode polygon says the same.
  • The thermal items size the spokes that connect pads. Teardrop zones omit them.
  • smoothing and radius round or cut the outline corners; they are ignored on rule areas. The reader also accepts (smoothing none).
  • island_removal_mode: 0 always remove unconnected pieces (the default), 1 never, 2 remove those smaller than island_area_min, an area in square millimetres.
  • The hatch_… items apply to a hatched fill: line width, gap, angle, smoothing level and amount, which width the hatch border follows, and the smallest hole kept, as a ratio.

Rule areas

(keepout (tracks allowed|not_allowed) (vias …) (pads …)
         (copperpour …) (footprints …))
(placement (enabled yes|no)
  [(sheetname "…") | (component_class "…") | (group "…")])
  • A keepout or placement list makes the zone a rule area. If pads or footprints is missing it counts as allowed.
  • placement (version 20241009) names the source of footprints for multichannel placement: a schematic sheet, a component class or a group. The group source is new in KiCad 10.0.

Older zone forms

  • (net CODE) with a separate (net_name "…"), before version 20251028. If the two disagree, the name decides.
  • tstamp for uuid, and a bare locked word for (locked yes).
  • filled_areas_thickness, which KiCad 9.0 always writes as no. In files older than version 20250210, unless it is no, the stored fill was drawn with an outline of width min_thickness, and the reader grows the polygons by half that width, with a warning.
  • In fill, (mode segment) is turned into a polygon fill, and (arc_segments N) is ignored.
  • (fill_segments (pts (xy X Y) (xy X Y)) …) stored a fill as lines; it is converted with a warning.
  • filled_polygon may lack layer, and island may be a bare word or list without a value.
  • Teardrop zones in files older than version 20230517 mark the board as using the old teardrop style.

Groups

(group "NAME"
  (uuid "…")
  [(locked yes)]
  [(lib_id "LIBRARY:NAME")]
  (members "UUID" …))
  • Members are the uuid values of other items, written sorted. A group with no members is not written.
  • lib_id links the group to a design block (version 20250513); in it {slash} is read as /.
  • Groups are resolved after the whole file has been read, so they may name items that come later. A footprint's group can only take the footprint's own items. Board groups that contain themselves through other groups are broken apart.
  • Older forms: (id …) instead of uuid (versions 20200811 to before 20231215) and a bare locked after the name. Groups date from version 20200811.

Divergence from spec

The KiCad developer documentation describes zones as written by KiCad 6.0. It does not cover placement rule areas, per-layer properties, the later hatched fill settings or design block links on groups, and it still lists net_name and filled_areas_thickness, which KiCad 10.0 does not write.

Links

Developers

Reference