Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > f2f28f61487f3042d93877451f0a311f > files > 69

geda-docs-1.8.2-4.mga5.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title></title>
  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>


<h1 class="sectionedit1763"><a name="geda_gaf_file_format_document" id="geda_gaf_file_format_document">gEDA/gaf File Format Document</a></h1>
<div class="level1">

<p>
by: Ales V. Hvezda, ahvezda@geda.seul.org
</p>

<p>
This document is released under <a href="http://www.gnu.org/copyleft/fdl.html" class="urlextern" title="http://www.gnu.org/copyleft/fdl.html"  rel="nofollow">GFDL</a>
</p>

<p>
December 31st, 2003
</p>

</div>
<!-- EDIT1763 SECTION "gEDA/gaf File Format Document" [1-187] -->
<h2 class="sectionedit1764"><a name="overview" id="overview">Overview</a></h2>
<div class="level2">

<p>
This file is the official documentation for the file formats in gEDA/gaf (gschem And Friends). The primary file format used in gEDA/gaf is the schematic/symbol format. Files which end with .sch or .sym are schematics or symbol files. Until there is another file type in gEDA/gaf, then this document will only cover the symbol/schematic file format.<br/>

This file format document is current as of gEDA/gaf version 20040111. This document covers file format version 1 and 2.<br/>

Note, this file format and any other file formats associated with gEDA are placed under the General Public License (<acronym title="GNU General Public License">GPL</acronym>) version 2.0. The gEDA/gaf symbol and schematic file format is Copyright (C) 1998-2004 Ales Hvezda.
</p>

</div>
<!-- EDIT1764 SECTION "Overview" [188-902] -->
<h2 class="sectionedit1765"><a name="coordinate_space" id="coordinate_space">Coordinate Space</a></h2>
<div class="level2">

<p>
All coordinates are in mils (1/1000 of an inch). This is an arbitrary decision. Remember in there is no concept of physical lengths/dimensions in schematics and symbols (for schematic capture only).<br/>

</p>
<ul>
<li class="level1"><div class="li"> Origin is in lower left hand corner.</div>
</li>
<li class="level1"><div class="li"> The size of the coordinate space is unlimited, but it is recommended that all objects stay within (120.0, 90.0) (x, y inches).</div>
</li>
<li class="level1"><div class="li"> It is generally advisable to have positive x and y coordinates, however, negative coordinates work too, but not recommended.</div>
</li>
</ul>

<p>
The following figure shows how the coordinate space is setup:
</p>
<div class="table sectionedit1766"><table class="inline">
	<tr class="row0">
		<td class="col0"><a href="media/geda/coordinatespace.jpg" class="media" target="_blank" title="geda:coordinatespace.jpg"><img src="media/geda/coordinatespace.jpg" class="mediaright" title=":geda:coordinatespace.jpg " alt=":geda:coordinatespace.jpg " /></a></td>
	</tr>
</table></div>
<!-- EDIT1766 TABLE [1498-1557] -->
<p>
X axis increases going to the right. Y axis increase going up. Coordinate system is landscape and corresponds to a sheet of paper turned on its side.
</p>

</div>
<!-- EDIT1765 SECTION "Coordinate Space" [903-1709] -->
<h2 class="sectionedit1767"><a name="filenames" id="filenames">Filenames</a></h2>
<div class="level2">

<p>
Symbols end in .sym. The only symbol filename convention that is used in gEDA/gaf is that if there are multiple instances of a symbol with the same name (like a 7400), then a -1, -2, -3, … -N suffix is added to the end of the filename. Example: 7400-1.sym, 7400-2.sym, 7400-3.sym…<br/>

Schematics end in .sch. There used to be a schematic filename convention (adding a -1 .. -N to the end of the basename), but this convention is now obsolete. Schematic filenames can be anything that makes sense to the creator.
</p>

</div>
<!-- EDIT1767 SECTION "Filenames" [1710-2246] -->
<h2 class="sectionedit1768"><a name="object_types" id="object_types">Object types</a></h2>
<div class="level2">

<p>
A schematic/symbol file for gEDA/gaf consists of:
</p>
<ul>
<li class="level1"><div class="li"> A version (v) as the first item in the file. This is required.</div>
</li>
<li class="level1"><div class="li"> Any number of objects and the correct data. Objects are specified by an “object type”</div>
</li>
<li class="level1"><div class="li"> Most objects are a single line, however text objects are two lines long.</div>
</li>
<li class="level1"><div class="li"> No blank lines at the end of the file (these are ignored by the tools)</div>
</li>
<li class="level1"><div class="li"> For all enumerated types in the gEDA/gaf file formats, the field takes on the numeric value.</div>
</li>
</ul>

<p>
The “object type” id is a single letter and this id must start in the first column. The object type id is case sensitive.<br/>

The schematic and symbol files share the same file layout. A symbol is nothing more than a collection of primitive objects (lines, boxes, circles, arcs, text, and pins). A schematic is a collection of symbols (components), nets, and buses.<br/>

The following sections describe the specifics of each recognized object type. Each section has the name of the object, which file type (sch/sym) the object can appear in, the format of the data, a description of each individual field, details and caveats of the fields, and finally an example with description.<br/>

For information on the color index (which is used in practically all objects), see the Color section.
</p>

</div>
<!-- EDIT1768 SECTION "Object types" [2247-3519] -->
<h3 class="sectionedit1769"><a name="version" id="version">version</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type version fileformat_version</code></strong>
</p>
<div class="table sectionedit1770"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">  # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">v</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">  1 </td><td class="col1">version</td><td class="col2">int</td><td class="col3">version of gEDA/gaf that wrote this file</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">  2 </td><td class="col1">fileformat_version</td><td class="col2">int</td><td class="col3">gEDA/gaf file format version number</td>
	</tr>
</table></div>
<!-- EDIT1770 TABLE [3618-3797] --><ul>
<li class="level1"><div class="li"> The type is a lower case “v” (as in Victor).</div>
</li>
<li class="level1"><div class="li"> This object must be in every file used or created by the gEDA/gaf tools.</div>
</li>
<li class="level1"><div class="li"> The format of the first version field is YYYYMMDD.</div>
</li>
<li class="level1"><div class="li"> The version number is not an arbitrary timestamp. Do not make up a version number and expect the tools to behave properly.</div>
</li>
<li class="level1"><div class="li"> The “version of gEDA/gaf that wrote this file” was used in all versions of gEDA/gaf up to 20030921 as the file formats version. This field should no longer be used to determine the file format. It is used for information purposes only now.</div>
</li>
<li class="level1"><div class="li"> Starting at and after gEDA/gaf version 20031004, the fileformat version field is used to determine the file format version. All file format code should key off of this field.</div>
</li>
<li class="level1"><div class="li"> fileformat version increases when the file format changes.</div>
</li>
<li class="level1"><div class="li"> The starting point for fileformat version was 1. The current fileformat is 2.</div>
</li>
<li class="level1"><div class="li"> fileformat version is just an integer with no minor number.</div>
</li>
<li class="level1"><div class="li"> Development versions include: 19990601, 19990610, 19990705, 19990829, 19990919, 19991011, 20000220, 20000704, 20001006, 20001217, 20010304, 20010708, 20010722, 20020209, 20020414, 20020527, 20020825, 20021103, 20030223, 20030525, 20030901, 20040111, 20040710, 20041228, 20050313, 20050820, 20060123, 20060824, 20060906, 20061020, 20070216, 20070705, 20070708, 20070818, 20071229, 20080110, 20080127, 20080706, 20081220, 20081221, 20090328, 20090829, 20090830, 20110116, 20110619, 20111231</div>
</li>
<li class="level1"><div class="li"> Stable versions include: 20070526, 20070626, 20070902, 20071231, 20080127, 20080929, 20081220, 20081231, 20091004, 20100214, 20110115</div>
</li>
<li class="level1"><div class="li"> <acronym title="Concurrent Versions System">CVS</acronym> or test versions (should not be used): 20030921, 20031004, 20031019, 20031231, 20050814</div>
</li>
<li class="level1"><div class="li"> Keep in mind that each of the above listed versions might have had file format variations. This document only covers the last version&#039;s file format.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">v 20040111 1</pre>

</div>
<!-- EDIT1769 SECTION "version" [3520-5657] -->
<h3 class="sectionedit1771"><a name="line" id="line">line</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x1 y1 x2 y2 color width capstyle dashstyle dashlength dashspace</code></strong>
</p>
<div class="table sectionedit1772"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">L</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of line</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Line cap style</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
	</tr>
</table></div>
<!-- EDIT1772 TABLE [5790-6239] --><ul>
<li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> END NONE = 0</div>
</li>
<li class="level2"><div class="li"> END SQUARE = 1</div>
</li>
<li class="level2"><div class="li"> END ROUND = 2</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> TYPE SOLID = 0</div>
</li>
<li class="level2"><div class="li"> TYPE DOTTED = 1</div>
</li>
<li class="level2"><div class="li"> TYPE DASHED = 2</div>
</li>
<li class="level2"><div class="li"> TYPE CENTER = 3</div>
</li>
<li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
</li>
<li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">L 23000 69000 28000 69000 3 40 0 1 -1 75</pre>

<p>
A line segment from (23000, 69000) to (28000, 69000) with color index 3, 40 mils thick, no cap, dotted line style, and with a spacing of 75 mils in between each dot.
</p>

</div>
<!-- EDIT1771 SECTION "line" [5658-6973] -->
<h3 class="sectionedit1773"><a name="picture" id="picture">picture</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x1 y1 width height angle mirrored embedded<br/>

filename<br/>

[encoded picture data<br/>

encoded picture end]</code></strong>
</p>
<div class="table sectionedit1774"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">G</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Lower left X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Lower left Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the picture</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">height</td><td class="col2">int/mils</td><td class="col3">Height of the picture</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the picture</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">mirrored</td><td class="col2">char</td><td class="col3">Mirrored or normal picture</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">embedded</td><td class="col2">char</td><td class="col3">Embedded or link to the picture file</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">filename</td><td class="col2">string</td><td class="col3">path and filename of a not embedded picture</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">encoded picture data</td><td class="col2">string</td><td class="col3">Serialized picture encoded using base64</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">encoded picture end</td><td class="col2">string</td><td class="col3">A line containing only a dot character</td>
	</tr>
</table></div>
<!-- EDIT1774 TABLE [7146-7749] --><ul>
<li class="level1"><div class="li"> This object is a picture object. The first line contains all the picture parameters, and the second line is the path and filename of the picture. The filename is not used if the picture is embedded.</div>
</li>
<li class="level1"><div class="li"> The angle of the picture can only take on one of the following values: 0, 90, 180, 270.</div>
</li>
<li class="level1"><div class="li"> The mirrored field is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> NOT MIRRORED = 0</div>
</li>
<li class="level2"><div class="li"> MIRRORED = 1</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The embedded field is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> NOT EMBEDDED = 0</div>
</li>
<li class="level2"><div class="li"> EMBEDDED = 1 (not yet supported)</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The encoded picture and encoded picture end fields are only in the file if the picture is embedded in the schematic:</div>
<ul>
<li class="level2"><div class="li"> encoded picture data: This is a multiple line field. The picture is serialized and then encoded using base64. This way the encoded data uses only printable characters. This field is the result of these two operations.</div>
</li>
<li class="level2"><div class="li"> encoded picture end : A line containing only a single dot &#039;.&#039; character marks the end of the encoded picture data.</div>
</li>
</ul>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">G 16900 35800 1400 2175 0 0 0
../bitmaps/logo.jpg</pre>

<p>
A picture object with the lower left corner at (16900, 35800). The width of the image is 1400 mils, and its height is 2175 mils. The picture rotation is 0 degrees and the picture is not mirrored, neither embedded.<br/>

The picture path and filename is showed in the second line.<br/>

Example:<br/>

</p>
<pre class="code">G 16900 35800 1400 2175 0 0 1
../bitmaps/logo.jpg
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
.</pre>

<p>
A picture object with the lower left corner at (16900, 35800). The width of the image is 1400 mils, and its height is 2175 mils.<br/>

The picture rotation is 0 degrees, it is not mirrored, and it is embedded.<br/>

The picture path and filename is showed in the second line. Since this is an embedded picture, the filename and path are not used.<br/>

The encoded picture data is only an example (it is not real data). The last line containing a single dot &#039;.&#039; character marks the end of the encoded picture data.
</p>

</div>
<!-- EDIT1773 SECTION "picture" [6974-9750] -->
<h3 class="sectionedit1775"><a name="box" id="box">box</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x y width height color width capstyle dashstyle dashlength dashspace
filltype fillwidth angle1 pitch1 angle2 pitch2</code></strong>
</p>
<div class="table sectionedit1776"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">B</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Lower left hand X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Lower left hand Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the box (x direction)</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">height</td><td class="col2">int/mils</td><td class="col3">Height of the box (y direction)</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of lines</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">capstyle</td><td class="col2">int/mils</td><td class="col3">Line cap style</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
	</tr>
	<tr class="row12">
		<td class="col0 rightalign">  11 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
	</tr>
	<tr class="row13">
		<td class="col0 rightalign">  12 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
	</tr>
	<tr class="row14">
		<td class="col0 rightalign">  13 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
	</tr>
	<tr class="row15">
		<td class="col0 rightalign">  14 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
	</tr>
	<tr class="row16">
		<td class="col0 rightalign">  15 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
	</tr>
	<tr class="row17">
		<td class="col0 rightalign">  16 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
	</tr>
</table></div>
<!-- EDIT1776 TABLE [9934-10722] --><ul>
<li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> END NONE = 0</div>
</li>
<li class="level2"><div class="li"> END SQUARE = 1</div>
</li>
<li class="level2"><div class="li"> END ROUND = 2</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> TYPE SOLID = 0</div>
</li>
<li class="level2"><div class="li"> TYPE DOTTED = 1</div>
</li>
<li class="level2"><div class="li"> TYPE DASHED = 2</div>
</li>
<li class="level2"><div class="li"> TYPE CENTER = 3</div>
</li>
<li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
</li>
<li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
</li>
<li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
</li>
<li class="level2"><div class="li"> FILLING FILL = 1</div>
</li>
<li class="level2"><div class="li"> FILLING MESH = 2</div>
</li>
<li class="level2"><div class="li"> FILLING HATCH = 3</div>
</li>
<li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
</li>
<li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
</li>
<li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
</li>
<li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">B 33000 67300 2000 2000 3 60 0 2 75 50 0 -1 -1 -1 -1 -1</pre>

<p>
A box with the lower left hand corner at (33000, 67300) and a width and height of (2000, 2000), color index 3, line width of 60 mils, no cap, dashed line type, dash length of 75 mils, dash spacing of 50 mils, no fill, rest parameters unset.
</p>

</div>
<!-- EDIT1775 SECTION "box" [9751-12065] -->
<h3 class="sectionedit1777"><a name="circle" id="circle">circle</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x y radius color width capstyle dashstyle dashlength dashspace
filltype fillwidth angle1 pitch1 angle2 pitch2</code></strong>
</p>
<div class="table sectionedit1778"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">V</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Center X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Center Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">radius</td><td class="col2">int/mils</td><td class="col3">Radius of the circle</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of circle line</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">capstyle</td><td class="col2">int/mils</td><td class="col3">0 unused</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
	</tr>
	<tr class="row12">
		<td class="col0 rightalign">  11 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
	</tr>
	<tr class="row13">
		<td class="col0 rightalign">  12 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
	</tr>
	<tr class="row14">
		<td class="col0 rightalign">  13 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
	</tr>
	<tr class="row15">
		<td class="col0 rightalign">  14 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
	</tr>
	<tr class="row16">
		<td class="col0 rightalign">  15 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
	</tr>
</table></div>
<!-- EDIT1778 TABLE [12246-12951] --><ul>
<li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> TYPE SOLID = 0</div>
</li>
<li class="level2"><div class="li"> TYPE DOTTED = 1</div>
</li>
<li class="level2"><div class="li"> TYPE DASHED = 2</div>
</li>
<li class="level2"><div class="li"> TYPE CENTER = 3</div>
</li>
<li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
</li>
<li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
</li>
<li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
</li>
<li class="level2"><div class="li"> FILLING FILL = 1</div>
</li>
<li class="level2"><div class="li"> FILLING MESH = 2</div>
</li>
<li class="level2"><div class="li"> FILLING HATCH = 3</div>
</li>
<li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
</li>
<li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
</li>
<li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
</li>
<li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">V 38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50</pre>

<p>
A circle with the center at (38000, 67000) and a radius of 900 mils, color index 3, line width of 0 mils (smallest size), no cap, dashed line type, dash length of 75 mils, dash spacing of 50 mils, mesh fill, 10 mils thick mesh lines, first mesh line: 20 degrees, with a spacing of 30 mils, second mesh line: 90 degrees, with a spacing of 50 mils.
</p>

</div>
<!-- EDIT1777 SECTION "circle" [12066-14293] -->
<h3 class="sectionedit1779"><a name="arc" id="arc">arc</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x y radius startangle sweepangle color width capstyle dashstyle
dashlength dashspace</code></strong>
</p>
<div class="table sectionedit1780"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">A</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Center X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Center Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">radius</td><td class="col2">int/mils</td><td class="col3">Radius of the arc</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">startangle</td><td class="col2">int/degrees</td><td class="col3">Starting angle of the arc</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">sweepangle</td><td class="col2">int/degrees</td><td class="col3">Amount the arc sweeps</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of circle line</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Cap style</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
	</tr>
	<tr class="row12">
		<td class="col0 rightalign">  11 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
	</tr>
</table></div>
<!-- EDIT1780 TABLE [14446-14969] --><ul>
<li class="level1"><div class="li"> The startangle can be negative, but not recommended.</div>
</li>
<li class="level1"><div class="li"> The sweepangle can be negative, but not recommended.</div>
</li>
<li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> END NONE = 0</div>
</li>
<li class="level2"><div class="li"> END SQUARE = 1</div>
</li>
<li class="level2"><div class="li"> END ROUND = 2</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> TYPE SOLID = 0</div>
</li>
<li class="level2"><div class="li"> TYPE DOTTED = 1</div>
</li>
<li class="level2"><div class="li"> TYPE DASHED = 2</div>
</li>
<li class="level2"><div class="li"> TYPE CENTER = 3</div>
</li>
<li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
</li>
<li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">A 30600 75000 2000 0 45 3 0 0 3 75 50</pre>

<p>
An arc with the center at (30600, 75000) and a radius of 2000 mils, a starting angle of 0, sweeping 45 degrees, color index 3, line width of 0 mils (smallest size), no cap, center line type, dash length of 75 mils, dash spacing of 50 mils.
</p>

</div>
<!-- EDIT1779 SECTION "arc" [14294-15888] -->
<h3 class="sectionedit1781"><a name="text_and_attributes" id="text_and_attributes">text and attributes</a></h3>
<div class="level3">

<p>
Depending on context, text objects can play different roles. Outside any environment, they represent informative lines of text. When enclosed by curly braces, they are interpreted as attributes. See the <a href="geda-file_format_spec.html#attributes" class="wikilink1" title="geda-file_format_spec.html">attributes section</a>.
</p>

<p>
Valid in: Schematic and Symbol files<br/>

<strong><code>type x y color size visibility show_name_value angle alignment num_lines<br/>

string line 1<br/>

string line 2<br/>

string line 3<br/>

…<br/>

string line N</code></strong>
</p>
<div class="table sectionedit1782"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">T</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">size</td><td class="col2">int/points</td><td class="col3">Size of text</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">visibility</td><td class="col2">int</td><td class="col3">Visibility of text</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">show_name_value</td><td class="col2">int</td><td class="col3">Attribute visibility control</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the text</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">alignment</td><td class="col2">int</td><td class="col3">Alignment/origin of the text</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">num_lines</td><td class="col2">int</td><td class="col3">Number of lines of text (1 based)</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">string line 1 … N</td><td class="col2">string</td><td class="col3">The text strings, on a separate line</td>
	</tr>
</table></div>
<!-- EDIT1782 TABLE [16371-16890] --><ul>
<li class="level1"><div class="li"> This object is a multi line object. The first line contains all the text parameters and the subsequent lines are the text strings.</div>
</li>
<li class="level1"><div class="li"> There must be exactly num lines of text following the T … string.</div>
</li>
<li class="level1"><div class="li"> The maximum length of any single text string is 1024, however there is no limit to the number of text string lines.</div>
</li>
<li class="level1"><div class="li"> The minimum size is 2 points (1/72 of an inch).</div>
</li>
<li class="level1"><div class="li"> There is no maximum size.</div>
</li>
<li class="level1"><div class="li"> The coordinate pair is the origin of the text item.</div>
</li>
<li class="level1"><div class="li"> The visibility field is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> INVISIBLE = 0</div>
</li>
<li class="level2"><div class="li"> VISIBLE = 1</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The show_name_value is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> SHOW NAME VALUE = 0 (show both name and value of an attribute)</div>
</li>
<li class="level2"><div class="li"> SHOW VALUE = 1 (show only the value of an attribute)</div>
</li>
<li class="level2"><div class="li"> SHOW NAME = 2 (show only the name of an attribute)</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The show_name_value field is only valid if the string is an attribute (string has to be in the form: name=value to be considered an attribute).</div>
</li>
<li class="level1"><div class="li"> The angle of the text can only take on one of the following values: 0, 90, 180, 270. A value of 270 will always generate upright text.</div>
</li>
<li class="level1"><div class="li"> The alignment/origin field controls the relative location of the origin.</div>
</li>
<li class="level1"><div class="li"> The alignment field can take a value from 0 to 8. <br/>
The following diagram shows what the values for the alignment field mean:</div>
</li>
</ul>

<p>
 <a href="media/geda/fileformat_textgraphic.jpg" class="media" target="_blank" title="geda:fileformat_textgraphic.jpg"><img src="media/geda/fileformat_textgraphic.jpg" class="media" alt="" /></a>
</p>
<ul>
<li class="level1"><div class="li"> The num_lines field always starts at 1.<br/>
The num_lines field was added starting with file format version 1. Past versions (0 or earlier) only supported single line text objects.</div>
</li>
<li class="level1"><div class="li"> The text strings of the string line(s) can have overbars if the text is embedded in two overbar markers <strong>“\_”</strong>. A single backslash needs to be written as <strong>“\\”</strong>.</div>
</li>
</ul>

<p>
Example 1:<br/>

</p>
<pre class="code">T 16900 35800 3 10 1 0 0 0 1
Text string!</pre>

<p>
A text object with the origin at (16900, 35800), color index 3, 10 points in size, visible, attribute 
flags not valid (not an attribute), origin at lower left, not rotated, string: Text string!
</p>

<p>
Example 2:<br/>

</p>
<pre class="code">T 16900 35800 3 10 1 0 0 0 5
Text string line 1
Text string line 2
Text string line 3
Text string line 4
Text string line 5</pre>

<p>
This is a similar text object as the above example, however here there are five lines of text.
</p>

<p>
Example 3:<br/>

</p>
<pre class="code">T 10000 20000 3 10 1 1 8 90 1
pinlabel=R/\_W\_</pre>

<p>
A text object with the origin at (10000, 20000), color index 3, 10 points in size, visible, only the value of the attribute is visible, text origin at upper right, the text is rotated by 90 degree, the string: “R/W” has an overbar over the “W”.
</p>

</div>
<!-- EDIT1781 SECTION "text and attributes" [15889-19395] -->
<h3 class="sectionedit1783"><a name="net" id="net">net</a></h3>
<div class="level3">

<p>
Valid in: Schematic files ONLY<br/>

<strong><code>type x1 y1 x2 y2 color</code></strong>
</p>
<div class="table sectionedit1784"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">N</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
</table></div>
<!-- EDIT1784 TABLE [19475-19717] --><ul>
<li class="level1"><div class="li"> Nets can only appear in schematic files.</div>
</li>
<li class="level1"><div class="li"> You cannot have a zero length net (the tools will throw them away).</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">N 12700 29400 32900 29400 4</pre>

<p>
A net segment from (12700, 29400) to (32900, 29400) with color index 4.
</p>

</div>
<!-- EDIT1783 SECTION "net" [19396-19962] -->
<h3 class="sectionedit1785"><a name="bus" id="bus">bus</a></h3>
<div class="level3">

<p>
Valid in: Schematic files ONLY<br/>

<strong><code>type x1 y1 x2 y2 color ripperdir</code></strong>
</p>
<div class="table sectionedit1786"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">U</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">ripperdir</td><td class="col2">int</td><td class="col3">Direction of bus rippers</td>
	</tr>
</table></div>
<!-- EDIT1786 TABLE [20052-20341] --><ul>
<li class="level1"><div class="li"> The ripperdir field for an brand new bus is 0.</div>
</li>
<li class="level1"><div class="li"> The ripperdir field takes on a value of 1 or -1 when a net is connected to the bus for the first time. This value indicates the direction of the ripper symbol. The ripper direction is set to the same value for the entire life of the bus object.</div>
</li>
<li class="level1"><div class="li"> Buses can only appear in schematic files.</div>
</li>
<li class="level1"><div class="li"> You cannot have a zero length bus (the tools will throw them away).</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">U 27300 37400 27300 35300 3 0</pre>

<p>
A bus segment from (27300, 37400) to (27300, 35300) with color index 3 and no nets have been connected to this bus segment.
</p>

</div>
<!-- EDIT1785 SECTION "bus" [19963-20941] -->
<h3 class="sectionedit1787"><a name="pin" id="pin">pin</a></h3>
<div class="level3">

<p>
Valid in: Symbol files ONLY<br/>

<strong><code>type x1 y1 x2 y2 color pintype whichend</code></strong>
</p>
<div class="table sectionedit1788"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">P</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x1</td><td class="col2">int/mils</td><td class="col3">First X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y1</td><td class="col2">int/mils</td><td class="col3">First Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">x2</td><td class="col2">int/mils</td><td class="col3">Second X coordinate</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">y2</td><td class="col2">int/mils</td><td class="col3">Second Y coordinate</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">pintype</td><td class="col2">int</td><td class="col3">Type of pin</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">whichend</td><td class="col2">int</td><td class="col3">Specifies the active end</td>
	</tr>
</table></div>
<!-- EDIT1788 TABLE [21035-21355] --><ul>
<li class="level1"><div class="li"> The pintype is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> NORMAL <acronym title="Personal Identification Number">PIN</acronym> = 0</div>
</li>
<li class="level2"><div class="li"> BUS <acronym title="Personal Identification Number">PIN</acronym> = 1 unused</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The whichend specifies which end point of the pin is the active connection port. Only this end point can have other pins or nets connected to it.</div>
</li>
<li class="level1"><div class="li"> To make the first end point active, whichend should be 0, else to specify the other end, whichend should be 1.</div>
</li>
<li class="level1"><div class="li"> Pins can only appear in symbol files.</div>
</li>
<li class="level1"><div class="li"> Zero length pins are allowed</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">P 0 200 200 200 1 0 0</pre>

<p>
A pin from (0, 200) to (200, 200) with color index 1, a regular pin, and the first point being the active connection end.
</p>

</div>
<!-- EDIT1787 SECTION "pin" [20942-21952] -->
<h3 class="sectionedit1789"><a name="component" id="component">component</a></h3>
<div class="level3">

<p>
Valid in: Schematic files ONLY<br/>

<strong><code>type x y selectable angle mirror basename</code></strong>
</p>
<div class="table sectionedit1790"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">C</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">x</td><td class="col2">int/mils</td><td class="col3">Origin X coordinate</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">y</td><td class="col2">int/mils</td><td class="col3">Origin Y coordinate</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">selectable</td><td class="col2">int</td><td class="col3">Selectable flag</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">angle</td><td class="col2">int/degrees</td><td class="col3">Angle of the component</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">mirror</td><td class="col2">int</td><td class="col3">Mirror around Y axis</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">basename</td><td class="col2">string</td><td class="col3">The filename of the component</td>
	</tr>
</table></div>
<!-- EDIT1790 TABLE [22057-22371] -->
<p>
The selectable field is either 1 for selectable or 0 if not selectable.
</p>
<ul>
<li class="level1"><div class="li"> The angle field can only take on the following values: 0, 90, 180, 270.</div>
</li>
<li class="level1"><div class="li"> The angle field can only be positive.</div>
</li>
<li class="level1"><div class="li"> The mirror flag is 0 if the component is not mirrored (around the Y axis).</div>
</li>
<li class="level1"><div class="li"> The mirror flag is 1 if the component is mirrored (around the Y axis).</div>
</li>
<li class="level1"><div class="li"> The just basename is the filename of the component. This filename is not the full path.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">C 18600 19900 1 0 0 7400-1.sym</pre>

<p>
A component who&#039;s origin is at (18600,19900), is selectable, not rotated, not mirrored, and the basename of the component is 7400-1.sym.
</p>

</div>
<!-- EDIT1789 SECTION "component" [21953-23004] -->
<h3 class="sectionedit1791"><a name="path" id="path">path</a></h3>
<div class="level3">

<p>
Valid in: Schematic and Symbol files<br/>

Valid since: Fileformat version 2 (release 1.5.1)<br/>

<strong><code>type color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 numlines<br/>

path data line 1<br/>

path data line 2<br/>

path data line 3<br/>

…<br/>

path data line N</code></strong>
</p>
<div class="table sectionedit1792"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">H</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">color</td><td class="col2">int</td><td class="col3">Color index</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of line</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">capstyle</td><td class="col2">int</td><td class="col3">Line cap style</td>
	</tr>
	<tr class="row5">
		<td class="col0 rightalign">   4 </td><td class="col1">dashstyle</td><td class="col2">int</td><td class="col3">Type of dash style</td>
	</tr>
	<tr class="row6">
		<td class="col0 rightalign">   5 </td><td class="col1">dashlength</td><td class="col2">int/mils</td><td class="col3">Length of dash</td>
	</tr>
	<tr class="row7">
		<td class="col0 rightalign">   6 </td><td class="col1">dashspace</td><td class="col2">int/mils</td><td class="col3">Space inbetween dashes</td>
	</tr>
	<tr class="row8">
		<td class="col0 rightalign">   7 </td><td class="col1">filltype</td><td class="col2">int</td><td class="col3">Type of fill</td>
	</tr>
	<tr class="row9">
		<td class="col0 rightalign">   8 </td><td class="col1">fillwidth</td><td class="col2">int/mils</td><td class="col3">Width of the fill lines</td>
	</tr>
	<tr class="row10">
		<td class="col0 rightalign">   9 </td><td class="col1">angle1</td><td class="col2">int/degrees</td><td class="col3">First angle of fill</td>
	</tr>
	<tr class="row11">
		<td class="col0 rightalign">  10 </td><td class="col1">pitch1</td><td class="col2">int/mils</td><td class="col3">First pitch/spacing of fill</td>
	</tr>
	<tr class="row12">
		<td class="col0 rightalign">  11 </td><td class="col1">angle2</td><td class="col2">int/degrees</td><td class="col3">Second angle of fill</td>
	</tr>
	<tr class="row13">
		<td class="col0 rightalign">  12 </td><td class="col1">pitch2</td><td class="col2">int/mils</td><td class="col3">Second pitch/spacing of fill</td>
	</tr>
	<tr class="row14">
		<td class="col0 rightalign">  13 </td><td class="col1">num_lines</td><td class="col2">int</td><td class="col3">Number of lines of path data (1 based)</td>
	</tr>
	<tr class="row15">
		<td class="col0 rightalign">  14 </td><td class="col1">path data line 1 … N</td><td class="col2">path data</td><td class="col3">The path data, on separate lines</td>
	</tr>
</table></div>
<!-- EDIT1792 TABLE [23315-24026] --><ul>
<li class="level1"><div class="li"> The capstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> END NONE = 0</div>
</li>
<li class="level2"><div class="li"> END SQUARE = 1</div>
</li>
<li class="level2"><div class="li"> END ROUND = 2</div>
</li>
</ul>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> The dashstyle is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> TYPE SOLID = 0</div>
</li>
<li class="level2"><div class="li"> TYPE DOTTED = 1</div>
</li>
<li class="level2"><div class="li"> TYPE DASHED = 2</div>
</li>
<li class="level2"><div class="li"> TYPE CENTER = 3</div>
</li>
<li class="level2"><div class="li"> TYPE PHANTOM = 4</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.</div>
</li>
<li class="level1"><div class="li"> The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.</div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> The filltype parameter is an enumerated type:</div>
<ul>
<li class="level2"><div class="li"> FILLING HOLLOW = 0</div>
</li>
<li class="level2"><div class="li"> FILLING FILL = 1</div>
</li>
<li class="level2"><div class="li"> FILLING MESH = 2</div>
</li>
<li class="level2"><div class="li"> FILLING HATCH = 3</div>
</li>
<li class="level2"><div class="li"> FILLING VOID = 4 unused</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.</div>
</li>
<li class="level1"><div class="li"> The fill type FILLING FILL is a solid color fill.</div>
</li>
<li class="level1"><div class="li"> The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.</div>
</li>
<li class="level1"><div class="li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.</div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> The format of path data is deliberately similar to that of <a href="http://www.w3.org/TR/SVG/paths.html" class="urlextern" title="http://www.w3.org/TR/SVG/paths.html"  rel="nofollow">paths in the W3C SVG standard</a>.</div>
</li>
<li class="level1"><div class="li"> The subset of the <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax emitted by gEDA is documented below in section <a href="geda-file_format_spec.html#path_data" class="wikilink1" title="geda-file_format_spec.html">Path Data</a>.</div>
</li>
<li class="level1"><div class="li"> As an implementation detail; libgeda takes code from librsvg, an <acronym title="Scalable Vector Graphics">SVG</acronym> parsing library. As a result, the majority of <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax is read correctly, however this is always normalised to absolute move, line, Bézier curve and close-path commands internally (and is saved as such).</div>
</li>
<li class="level1"><div class="li"> Coordinates along the path are specified in the standard gschem coordinate space.</div>
</li>
</ul>

<p>
Example:
</p>
<pre class="code">H 3 10 0 0 -1 -1 0 -1 -1 -1 -1 -1 5
M 410,240
L 501,200
L 455,295
L 435,265
z</pre>

<p>
A path starting at (410,240) with lines drawn from there, and joining points (501,200), (455,295), (435,265), closing back to its origin. It has color index 3, is 10 mils thick, no cap, solid style. There are 5 lines of path data.
</p>

</div>
<!-- EDIT1791 SECTION "path" [23005-26021] -->
<h3 class="sectionedit1793"><a name="font" id="font">font</a></h3>
<div class="level3">

<p>
Valid in: Special font files ONLY<br/>

<strong><code>type character width flag</code></strong>
</p>
<div class="table sectionedit1794"><table class="inline">
	<tr class="row0">
		<th class="col0">Pos.</th><th class="col1">Field</th><th class="col2">Type/unit</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0 rightalign">   # </td><td class="col1">type</td><td class="col2">char</td><td class="col3">F</td>
	</tr>
	<tr class="row2">
		<td class="col0 rightalign">   1 </td><td class="col1">character</td><td class="col2">char</td><td class="col3">The character being defined</td>
	</tr>
	<tr class="row3">
		<td class="col0 rightalign">   2 </td><td class="col1">width</td><td class="col2">int/mils</td><td class="col3">Width of the character (mils)</td>
	</tr>
	<tr class="row4">
		<td class="col0 rightalign">   3 </td><td class="col1">flag</td><td class="col2">int</td><td class="col3">Special space flag</td>
	</tr>
</table></div>
<!-- EDIT1794 TABLE [26108-26302] --><ul>
<li class="level1"><div class="li"> This is a special tag and should ONLY show up in font definition files.</div>
</li>
<li class="level1"><div class="li"> If the font character being defined is the space character (32) then flag should be 1, otherwise 0.</div>
</li>
</ul>

<p>
Example:<br/>

</p>
<pre class="code">F 11 1</pre>

<p>
The above font definition is for the space character.
</p>

</div>
<!-- EDIT1793 SECTION "font" [26022-26572] -->
<h2 class="sectionedit1795"><a name="colors" id="colors">Colors</a></h2>
<div class="level2">

<p>
In the gEDA/gaf schematic and symbol file format colors are specified via an integer index. The relationship between integer and color is based on object type. Each object type typically has one or more colors. Here is a table of color index to object type:
</p>
<div class="table sectionedit1796"><table class="inline">
	<tr class="row0">
		<th class="col0">Index</th><th class="col1">Object type</th>
	</tr>
	<tr class="row1">
		<td class="col0">0</td><td class="col1">BACKGROUND_COLOR</td>
	</tr>
	<tr class="row2">
		<td class="col0">1</td><td class="col1"><acronym title="Personal Identification Number">PIN</acronym>_COLOR</td>
	</tr>
	<tr class="row3">
		<td class="col0">2</td><td class="col1">NET_ENDPOINT_COLOR</td>
	</tr>
	<tr class="row4">
		<td class="col0">3</td><td class="col1">GRAPHIC_COLOR</td>
	</tr>
	<tr class="row5">
		<td class="col0">4</td><td class="col1">NET_COLOR</td>
	</tr>
	<tr class="row6">
		<td class="col0">5</td><td class="col1">ATTRIBUTE_COLOR</td>
	</tr>
	<tr class="row7">
		<td class="col0">6</td><td class="col1">LOGIC_BUBBLE_COLOR</td>
	</tr>
	<tr class="row8">
		<td class="col0">7</td><td class="col1">DOTS_GRID_COLOR</td>
	</tr>
	<tr class="row9">
		<td class="col0">8</td><td class="col1">DETACHED_ATTRIBUTE_COLOR</td>
	</tr>
	<tr class="row10">
		<td class="col0">9</td><td class="col1">TEXT_COLOR</td>
	</tr>
	<tr class="row11">
		<td class="col0">10</td><td class="col1">BUS_COLOR</td>
	</tr>
	<tr class="row12">
		<td class="col0">11</td><td class="col1">SELECT_COLOR</td>
	</tr>
	<tr class="row13">
		<td class="col0">12</td><td class="col1">BOUNDINGBOX_COLOR</td>
	</tr>
	<tr class="row14">
		<td class="col0">13</td><td class="col1">ZOOM_BOX_COLOR</td>
	</tr>
	<tr class="row15">
		<td class="col0">14</td><td class="col1">STROKE_COLOR</td>
	</tr>
	<tr class="row16">
		<td class="col0">15</td><td class="col1">LOCK_COLOR</td>
	</tr>
	<tr class="row17">
		<td class="col0">16</td><td class="col1">OUTPUT_BACKGROUND_COLOR</td>
	</tr>
	<tr class="row18">
		<td class="col0">17</td><td class="col1">FREESTYLE1_COLOR</td>
	</tr>
	<tr class="row19">
		<td class="col0">18</td><td class="col1">FREESTYLE2_COLOR</td>
	</tr>
	<tr class="row20">
		<td class="col0">19</td><td class="col1">FREESTYLE3_COLOR</td>
	</tr>
	<tr class="row21">
		<td class="col0">20</td><td class="col1">FREESTYLE4_COLOR</td>
	</tr>
	<tr class="row22">
		<td class="col0">21</td><td class="col1">JUNCTION_COLOR</td>
	</tr>
	<tr class="row23">
		<td class="col0">22</td><td class="col1">MESH_GRID_MAJOR_COLOR</td>
	</tr>
	<tr class="row24">
		<td class="col0">23</td><td class="col1">MESH_GRID_MINOR_COLOR</td>
	</tr>
</table></div>
<!-- EDIT1796 TABLE [26851-27368] -->
<p>
The actual color associated with the color index is defined on a per tool bases. Objects are typically assigned their corresponding color index, but it is permissible (sometimes) to assign other color index values to different object types.
</p>

</div>
<!-- EDIT1795 SECTION "Colors" [26573-27611] -->
<h2 class="sectionedit1797"><a name="attributes" id="attributes">Attributes</a></h2>
<div class="level2">

<p>
Attributes are enclosed in braces {} and can only be text. Attributes are text items which take on the form name=value. If it doesn&#039;t have name=value, it&#039;s not an attribute. Attributes are attached to the previous object. Here&#039;s an example:
</p>
<pre class="code">P 988 500 1300 500 1
{
T 1000 570 5 8 1 1 0
pinseq=3
T 1000 550 5 8 1 1 0
pinnumber=3
}</pre>

<p>
The object is a pin which has an attribute pinnumber=3 and pinseq=3 (name=value). You can have multiple text objects (both the T … and text string are required) in between the braces {}. As of 20021103, you can only attached text items as attributes. Attaching other object types as attributes is unsupported.<br/>

You can also have “toplevel” attributes. These attributes are not attached to any object, but instead are just text objects that take on the form name=value.<br/>

These attributes are useful when you need to convey some info about a schematic page or symbol and need the netlister to have access to this info.
</p>

</div>
<!-- EDIT1797 SECTION "Attributes" [27612-28599] -->
<h2 class="sectionedit1798"><a name="embedded_components" id="embedded_components">Embedded Components</a></h2>
<div class="level2">

<p>
Embedded components are components which have all of their definition stored within the schematic file. When a users place a component onto a schematic page, they have the option of making the component embedded. Other than storing all the symbol information inside of the schematic, an embedded component is just any other component. Embedded components are defined as:
</p>
<pre class="code">C 18600 21500 1 0 0 EMBEDDED555-1.sym
[
...
... Embedded primitive objects
...
]</pre>

<p>
In the example above, <strong>555-1.sym</strong> is the component. The EMBEDDED tag and the [ ] are the distinguishing characteristics of embedded components. <strong>componentname.sym</strong> must exist in one of the specified component-libraries if you want to unembed the component.
</p>

</div>
<!-- EDIT1798 SECTION "Embedded Components" [28600-29364] -->
<h2 class="sectionedit1799"><a name="path_data" id="path_data">Path data</a></h2>
<div class="level2">

<p>
The gEDA/gaf path data format has been deliberately specified to match a subset of <a href="http://www.w3.org/TR/SVG/paths.html" class="urlextern" title="http://www.w3.org/TR/SVG/paths.html"  rel="nofollow">that in the W3C SVG standard.</a>.
</p>
<ul>
<li class="level1"><div class="li"> As an implementation detail; libgeda takes code from librsvg, an <acronym title="Scalable Vector Graphics">SVG</acronym> parsing library. As a result, the majority of <acronym title="Scalable Vector Graphics">SVG</acronym> path syntax is read correctly, however this is always normalised to absolute move, line, Bézier curve and close-path commands internally (and is saved as such).</div>
</li>
<li class="level1"><div class="li"> Coordinates along the path are specified in the standard gschem coordinate space.</div>
</li>
</ul>
<ul>
<li class="level1"><div class="li"> Those path commands which gEDA emits, and will guarantee to parse, are listed in the table below:<br/>
</div>
</li>
</ul>

<p>
(Text taken from the above <acronym title="Scalable Vector Graphics">SVG</acronym> specification).
</p>
<ul>
<li class="level1"><div class="li"> In the table below, the following notation is used:</div>
<ul>
<li class="level2"><div class="li"> (): grouping of parameters</div>
</li>
<li class="level2"><div class="li"> +: 1 or more of the given parameter(s) is required</div>
</li>
</ul>
</li>
</ul>
<div class="table sectionedit1800"><table class="inline">
	<tr class="row0">
		<th class="col0">Command</th><th class="col1">Name</th><th class="col2">Parameters</th><th class="col3">Description</th>
	</tr>
	<tr class="row1">
		<td class="col0">M (absolute)</td><td class="col1">moveto</td><td class="col2">(x,y)+</td><td class="col3">Start a new sub-path at the given (x,y) coordinate. M (uppercase) indicates that absolute coordinates will follow; m (lowercase) indicates that relative coordinates will follow. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands.</td>
	</tr>
	<tr class="row2">
		<td class="col0">L (absolute)</td><td class="col1">lineto</td><td class="col2">(x,y)+</td><td class="col3">Draw a line from the current point to the given (x,y) coordinate which becomes the new current point. L (uppercase) indicates that absolute coordinates will follow; l (lowercase) indicates that relative coordinates will follow. A number of coordinates pairs may be specified to draw a polyline. At the end of the command, the new current point is set to the final set of coordinates provided.</td>
	</tr>
	<tr class="row3">
		<td class="col0">C (absolute)</td><td class="col1">curveto</td><td class="col2">(x1,y1 x2,y2 x,y)+</td><td class="col3">Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve. C (uppercase) indicates that absolute coordinates will follow; c (lowercase) indicates that relative coordinates will follow. Multiple sets of coordinates may be specified to draw a polybézier. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybézier.</td>
	</tr>
	<tr class="row4">
		<td class="col0">Z or z</td><td class="col1">closepath</td><td class="col2">(none)</td><td class="col3">Close the current subpath by drawing a straight line from the current point to current subpath&#039;s initial point.</td>
	</tr>
</table></div>
<!-- EDIT1800 TABLE [30214-31793] --><ul>
<li class="level1"><div class="li"> gEDA&#039;s output currently emits only the absolute coordinate versions of the above commands.</div>
</li>
<li class="level1"><div class="li"> gEDA&#039;s output currently emits the commands, M, L, C before every set of coordinates, even where they could be omitted according to the <acronym title="Scalable Vector Graphics">SVG</acronym> specification.</div>
</li>
<li class="level1"><div class="li"> gEDA&#039;s output places commas between x,y coordinates. These may be replaced with whitespace according to the <acronym title="Scalable Vector Graphics">SVG</acronym> specification.</div>
</li>
<li class="level1"><div class="li"> gEDA&#039;s does not currently support more than one sub-path.</div>
</li>
<li class="level1"><div class="li"> gEDA currently emits one path data line per command + coordinate set.</div>
</li>
</ul>

<p>
As example, lets draw the outline of an AND gate. The path data is:
</p>
<pre class="code">M 100,100 L 500,100 C 700,100 800,275 800,400
C 800,525 700,700 500,700 L 100,700 z</pre>

<p>
And a complete schematic:
</p>
<pre class="code">v 20080706 1
H 3 0 0 0 -1 -1 0 2 20 100 -1 -1 6
M 100,100
L 500,100
C 700,100 800,275 800,400
C 800,525 700,700 500,700
L 100,700
z</pre>

<p>
The resulting path (with control points drawn on to illustrate their positions) is shown here:
</p>

<p>
<a href="media/geda/path_example_and_gate-smaller.png" class="media" target="_blank" title="geda:path_example_and_gate-smaller.png"><img src="media/geda/path_example_and_gate-smaller.png" class="media" title="" alt="" /></a>
</p>

</div>
<!-- EDIT1799 SECTION "Path data" [29365-32796] -->
<h2 class="sectionedit1801"><a name="document_revision_history" id="document_revision_history">Document Revision History</a></h2>
<div class="level2">
<div class="table sectionedit1802"><table class="inline">
	<tr class="row0">
		<td class="col0">November 30th, 2002</td><td class="col1">Created fleformats.tex from fleformats.html.</td>
	</tr>
	<tr class="row1">
		<td class="col0">December 1st, 2002</td><td class="col1">Continued work on this document.</td>
	</tr>
	<tr class="row2">
		<td class="col0">October 4th, 2003</td><td class="col1">Added new file format version flag info.</td>
	</tr>
	<tr class="row3">
		<td class="col0">October 19th, 2003</td><td class="col1">Added num lines text field.</td>
	</tr>
	<tr class="row4">
		<td class="col0">November 2nd, 2008</td><td class="col1">Added path object, bumping file format version to 2</td>
	</tr>
	<tr class="row5">
		<td class="col0">May 26th, 2011</td><td class="col1">Added a column for the position of parameters in the tables</td>
	</tr>
</table></div>
<!-- EDIT1802 TABLE [32835-33215] -->
</div>
<!-- EDIT1801 SECTION "Document Revision History" [32797-] --></body>
</html>