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 …)) …)netis written only for a copper zone that is not a rule area. A footprint saved to a library has none.hatchsets 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
priorityare filled first; the default is 0. connect_padssays how pads of the same net join the copper: no word for thermal reliefs,yesfor solid,nofor not at all,thru_hole_onlyfor thermal reliefs on through-hole pads only.clearanceis the distance kept from other copper.attrmarks a zone made by the teardrop tool, for a pad or via, or for the end of a track. Such zones are written withoutuuidandname.propertyholds settings for one layer; the only one is the position that anchors a hatched fill. KiCad 9.0 has no such item.- The first
polygonis 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_polygonis one piece of computed copper on one layer.islandmarks 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)])yesmeans the zone has been filled. Withoutmodethe fill is solid;mode polygonsays the same.- The thermal items size the spokes that connect pads. Teardrop zones omit them.
smoothingandradiusround 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 thanisland_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
keepoutorplacementlist makes the zone a rule area. Ifpadsorfootprintsis missing it counts asallowed. 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.tstampforuuid, and a barelockedword for(locked yes).filled_areas_thickness, which KiCad 9.0 always writes asno. In files older than version 20250210, unless it isno, the stored fill was drawn with an outline of widthmin_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_polygonmay lacklayer, andislandmay 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
uuidvalues of other items, written sorted. A group with no members is not written. lib_idlinks 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 ofuuid(versions 20200811 to before 20231215) and a barelockedafter 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
- KiCad source code – reader and writer in
pcbnew/pcb_io/kicad_sexpr(C++, GPL)
Reference
- Board file format – KiCad developer documentation, zones and groups