| FreePCB User Guide | Version 1.2

PREV | Table of Contents | NEXT

8. File Formats

8.1 Project File

The project file (*.fpc) is an ASCII text file containing all of the information for a single project. It is composed of multiple sections, where each section starts with a name surrounded by square brackets, such as "[options]". Within each section, there are multiple items where each item starts with a colon-delimited keyword, such as "units:" There will usually be one or more parameters following each keyword. There may also be items nested below other items. This relationship is shown by indenting the lines for the nested items.

The parameters that follow a keyword are strings delimited by whitespace. In order to allow whitespace within a parameter, such as a space within a filename, the first parameter following a keyword may be surrounded by double-quotes (e.g. "test file"), and whitespace between the quotes will not be considered a delimiter. Subsequent parameters cannot contain embedded whitespace.

Many of the parameters represent dimensions, such as line lengths or widths. By default, dimensions are expressed in nanometers. A suffix may be added to a dimension to indicate other units, such as "100MM" or "23.5MIL". For footprints, there is an item called "units:" which changes the default units for all of the footprint parameters, so that suffixes are not required.

Here is a list of all of the sections and items that may appear in a project file. For each item, the keyword is shown, followed by a list of parameters where the description of each parameter is surrounded by "<>".

[options]

project_name: <the name of the project, usually the same as the project file name without the ".fpc" extension>

full_library_folder: <the absolute path to the default library folder for the project>

CAM_folder: <the absolute path to the folder for CAM files , or "" if not yet defined>

autosave_interval: <the interval between autosaves in msec, or "0" if autosave disabled>

units: <the currently-selected units for the project, either "MM" or "MIL">

visible_grid_spacing: <the currently-selected visible grid spacing, in nanometers>

visible_grid_item: <the first item in the menu of visible grids>

visible_grid_item: <the next item in the menu of visible grids>

...

visible_grid_item: <the last item in the menu of visible grids>

placement_grid_spacing: <the currently-selected placement grid spacing, in nanometers>

placement_grid_item: <the first item in the menu of placement grids>

placement_grid_item: <the next item in the menu of placement grids>

...

placement_grid_item: <the last item in the menu of placement grids>

routing_grid_spacing: <the currently-selected routing grid spacing, in nanometers>

routing_grid_item: <the first item in the menu of routing grids>

routing_grid_item: <the next item in the menu of routing grids>

...

routing_grid_item: <the last item in the menu of routing grids>

snap_angle: <the currently-selected snap angle in degrees>

fp_visible_grid_spacing: <the currently-selected visible grid spacing for the Footprint Editor, in nanometers>

fp_visible_grid_item: <the first item in the menu of visible grids for the Footprint Editor>

fp_visible_grid_item: <the next item in the menu of visible grids for the Footprint Editor>

...

fp_visible_grid_item: <the last item in the menu of visible grids for the Footprint Editor>

fp_placement_grid_spacing: <the currently-selected placement grid spacing for the Footprint Editor, in nanometers>

fp_placement_grid_item: <the first item in the menu of placement grids for the Footprint Editor>

fp_placement_grid_item: <the next item in the menu of placement grids for the Footprint Editor>

...

fp_placement_grid_item: <the last item in the menu of placement grids for the Footprint Editor>

fp_snap_angle: <the currently-selected snap angle for the Footprint Editor, in degrees>

fill_clearance: <for Gerber files, the copper-copper clearance for copper areas>

mask_clearance: <for Gerber files, the solder-mask clearance>

thermal_width: <for Gerber files, the width of the cross-hairs for thermal reliefs>

min_silkscreen_width: <for Gerber files, the minimum width of silk-screen lines>

board_outline_width: <for Gerber files, the width of board-outline lines>

hole_clearance: <for Gerber files, clearance from holes to copper areas>

pilot_diameter: <for Gerber files, the pilot hole diameter>

annular_ring_for_pins: <for Gerber files, the width of annular rings for through-hole pins>

annular_ring_for_vias: <for Gerber files, the width of annular rings for vias>

cam_flags: <bitwise ORed flags for CAM options>

cam_layers: <bitwise ORed flags for CAM files to generate>

cam_drill_file: <flag to make a drill file>

cam_units: <units to use for CAM parameters in dialog>

drc_check_unrouted: <flag to treat unrouted connections as DRC errors>

drc_trace_width: <minimum trace width for DRC>

drc_pad_pad: <minimum pad-pad clearance for DRC>

drc_pad_trace: <minimum pad-trace clearance for DRC>

drc_trace_trace: <minimum trace-trace clearance for DRC>

drc_hole_copper: <minimum hole-copper clearance for DRC>

drc_annular_ring_pins: <minimum annular ring width for pins for DRC>

drc_annular_ring_vias: <minimum annular ring width for vias for DRC>

drc_board_edge_copper: <minimum copper-board_edge clearance for DRC>

drc_board_edge_hole: <minimum hole-board_edge clearance for DRC>

drc_hole_hole: <minimum hole-hole clearance for DRC>

drc_copper_copper: <minimum copper_area-copper_area clearance for DRC>

default_trace_width: <default trace width for project>

default_via_pad_width: <default via pad width for project>

default_via_hole_width: <default via hole diameter for project>

n_width_menu: <number of trace width menu items>

width_menu_item: <index of first item> <trace width> <via pad width> <via hole diameter>

width_menu_item: <index of this item> <trace width> <via pad width> <via hole diameter>

...

width_menu_item: <index of last item> <trace width> <via pad width> <via hole diameter>

n_copper_layers: <number of copper layers in project>

layer_info: <name of first layer> <index into layer array> <color: red> <color: green> <color: blue> <flag if visible>

layer_info: <name of next layer> <index into layer array> <color: red> <color: green> <color: blue> <flag if visible>

...

layer_info: <name of last layer> <index into layer array> <color: red> <color: green> <color: blue> <flag if visible>

[footprints]

name: <name of footprint>

author: <name of author>

source: <description of source>

units: <units: "NM", "MM" or "MIL">

sel_rect: <for selection rectangle: left> <bottom> <right> <top>

ref_text: <for reference text: height> <left> <bottom> <angle> <line width>

text: <text string> <height> <x> <y> <angle> <line width> <flag if mirrored> <layer>

...

outline_polyline: <line width> <starting x> <starting y>

next_corner: <next x> <next y> <side style>

next_corner: <next x> <next y> <side style>

...

close_polyline: <if closed polyline, last side style>

n_pins: <number of pins>

pin: <pin name> <hole_diameter> <x> <y> <angle>

top_pad: <shape> <width> <length/2> <length/2> <corner radius>

inner_pad: <shape> <width> <length/2> <length/2> <corner radius>

bottom_pad: <shape> <width> <length/2> <length/2> <corner radius>

pin: <pin name> <hole_diameter> <x> <y> <angle>

top_pad: <shape> <width> <length/2> <length/2> <corner radius>

inner_pad: <shape> <width> <length/2> <length/2> <corner radius>

bottom_pad: <shape> <width> <length/2> <length/2> <corner radius>

...

pin: <pin name> <hole_diameter> <x> <y> <angle>

top_pad: <shape> <width> <length/2> <length/2> <corner radius>

inner_pad: <shape> <width> <length/2> <length/2> <corner radius>

bottom_pad: <shape> <width> <length/2> <length/2> <corner radius>

[board]

outline: <number of corners in board outline>

corner: <index> <x> <y> <style of next side>

corner: <index> <x> <y> <style of next side>

...

corner: <index> <x> <y> <style of next side>

[solder_mask_cutouts]

sm_cutout: <number of corners in solder mask cutout>

corner: <index> <x> <y> <style of next side>

corner: <index> <x> <y> <style of next side>

...

corner: <index> <x> <y> <style of next side>

[parts]

part: <reference designator>

ref_text: <height> <line width> <angle> <x> <y>

package: <package identifier from netlist file, or "">

shape: <footprint name>

pos: <position: x> <y> <side> <angle> <flag if glued>

[nets]

net: <name of net> <# pins> <# connections> <# copper areas> <default trace width> <default via pad width> <default via hole diameter>

pin: <index of first pin in net> <name, such "U1.5">

pin: <index of next pin in net> <name, such "U1.5">

...

pin: <index of last pin in net> <name, such "U1.5">

connect: <index of this connection> <index of start pin> <index of end pin> <# segments> <flag if locked>

vtx: <first trace vertex: index> <x> <y> <if first or last vertex, pad layer> <flag to force via> <via pad width> <via hole diameter>

seg: <first trace segment: index> <layer> <width> <via width> <via hole diameter>

vtx: <next trace vertex: index> <x> <y> <if first or last vertex, pad layer> <flag to force via> <via pad width> <via hole diameter>

seg: <next trace segment: index> <layer> <width> <via width> <via hole diameter>

...

seg: <last trace segment: index> <layer> <width> <via width> <via hole diameter>

vtx: <last trace vertex: index> <x> <y> <if first or last vertex, pad layer> <flag to force via> <via pad width> <via hole diameter>

area: <index of this copper area> <# corners> <layer> <hatch style>

corner: <index of first corner> <x> <y> <style of next side> <flag if last corner of this contour>

corner: <index of next corner> <x> <y> <style of next side> <flag if last corner of this contour>

...

corner: <index of last corner> <x> <y> <style of next side> <flag if last corner of this contour>

8.2 Library Files

A library file (*.fpl) is an ASCII text file containing one or more footprints. The format for this file is exactly the same as the [footprints] section of the project file, described above.

8.3 Configuration File

The configuration file (default.cfg) is an ASCII text file containing the default parameters that are used for new projects. It is located in the same folder as the executable "freepcb.exe". It uses exactly the same format as the [options] section of the project file, as described above, with 2 extra items:

parent_folder: <the absolute or relative path to the default parent folder for new projects>

library_folder: <the absolute or relative path to the default library folder for new projects>

PREV | Table of Contents | NEXT