1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en"
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
7 <title>geda:file_format_spec
</title>
8 <meta name=
"generator" content=
"DokuWiki Release rc2007-05-24" />
9 <meta name=
"robots" content=
"index,follow" />
10 <meta name=
"date" content=
"2007-07-08T20:51:33-0400" />
11 <meta name=
"keywords" content=
"geda,file_format_spec" />
12 <link rel=
"search" type=
"application/opensearchdescription+xml" href=
"http://geda.seul.org/wiki/lib/exe/opensearch.php" title=
"geda Wiki" />
13 <link rel=
"start" href=
"http://geda.seul.org/wiki/" />
14 <link rel=
"contents" href=
"http://geda.seul.org/wiki/geda:file_format_spec?do=index" title=
"Index" />
15 <link rel=
"alternate" type=
"application/rss+xml" title=
"Recent Changes" href=
"http://geda.seul.org/wiki/feed.php" />
16 <link rel=
"alternate" type=
"application/rss+xml" title=
"Current Namespace" href=
"http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
17 <link rel=
"alternate" type=
"text/html" title=
"Plain HTML" href=
"http://geda.seul.org/wiki/_export/xhtml/geda:file_format_spec" />
18 <link rel=
"alternate" type=
"text/plain" title=
"Wiki Markup" href=
"http://geda.seul.org/wiki/_export/raw/geda:file_format_spec" />
19 <link rel=
"stylesheet" media=
"all" type=
"text/css" href=
"lib/exe/css" />
20 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"lib/exe/001css" />
21 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"lib/exe/002css" />
24 <div class=
"dokuwiki export">
26 <div class=
"tocheader toctoggle" id=
"toc__header">Table of Contents
</div>
27 <div id=
"toc__inside">
30 <li class=
"level1"><div class=
"li"><span class=
"li"><a href=
"#geda_gaf_file_format_document" class=
"toc">gEDA/gaf File Format Document
</a></span></div>
32 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#overview" class=
"toc">Overview
</a></span></div></li>
33 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#coordinate_space" class=
"toc">Coordinate Space
</a></span></div></li>
34 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#filenames" class=
"toc">Filenames
</a></span></div></li>
35 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#object_types" class=
"toc">Object types
</a></span></div>
37 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#version" class=
"toc">version
</a></span></div></li>
38 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#line" class=
"toc">line
</a></span></div></li>
39 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#picture" class=
"toc">picture
</a></span></div></li>
40 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#box" class=
"toc">box
</a></span></div></li>
41 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#circle" class=
"toc">circle
</a></span></div></li>
42 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#arc" class=
"toc">arc
</a></span></div></li>
43 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#text" class=
"toc">text
</a></span></div></li>
44 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#net" class=
"toc">net
</a></span></div></li>
45 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#bus" class=
"toc">bus
</a></span></div></li>
46 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#pin" class=
"toc">pin
</a></span></div></li>
47 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#component" class=
"toc">component
</a></span></div></li>
48 <li class=
"level3"><div class=
"li"><span class=
"li"><a href=
"#font" class=
"toc">font
</a></span></div></li>
51 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#colors" class=
"toc">Colors
</a></span></div></li>
52 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#attributes" class=
"toc">Attributes
</a></span></div></li>
53 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#embedded_components" class=
"toc">Embedded Components
</a></span></div></li>
54 <li class=
"level2"><div class=
"li"><span class=
"li"><a href=
"#document_revision_history" class=
"toc">Document Revision History
</a></span></div></li></ul>
61 <h1><a name=
"geda_gaf_file_format_document" id=
"geda_gaf_file_format_document">gEDA/gaf File Format Document
</a></h1>
65 by: Ales V. Hvezda, ahvezda@geda.seul.org
69 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>
77 <!-- SECTION "gEDA/gaf File Format Document" [1-187] -->
78 <h2><a name=
"overview" id=
"overview">Overview
</a></h2>
82 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/>
83 This file format document is current as of gEDA/gaf version
20040111. This document covers file format version
1.
<br/>
84 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.
88 <!-- SECTION "Overview" [188-896] -->
89 <h2><a name=
"coordinate_space" id=
"coordinate_space">Coordinate Space
</a></h2>
93 All coordinates are in mils (
1/
1000 or 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/>
97 <li class=
"level1"><div class=
"li"> Origin is in lower left hand corner.
</div>
99 <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>
101 <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>
106 The following figure shows how the coordinate space is setup:
108 <table class=
"inline">
110 <td><a href=
"_detail/geda_coordinatespace.html" class=
"media" title=
"geda:coordinatespace.jpg"><img src=
"_media/geda_coordinatespace.jpg" class=
"mediaright" title=
":geda:coordinatespace.jpg " alt=
":geda:coordinatespace.jpg " /></a></td>
115 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.
119 <!-- SECTION "Coordinate Space" [897-1703] -->
120 <h2><a name=
"filenames" id=
"filenames">Filenames
</a></h2>
124 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/>
125 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.
129 <!-- SECTION "Filenames" [1704-2240] -->
130 <h2><a name=
"object_types" id=
"object_types">Object types
</a></h2>
134 A schematic/symbol file for gEDA/gaf consists of:
137 <li class=
"level1"><div class=
"li"> A version (v) as the first item in the file. This is required.
</div>
139 <li class=
"level1"><div class=
"li"> Any number of objects and the correct data. Objects are specified by an “object type”
</div>
141 <li class=
"level1"><div class=
"li"> Most objects are a single line, however text objects are two lines long.
</div>
143 <li class=
"level1"><div class=
"li"> No blank lines at the end of the file (these are ignored by the tools)
</div>
145 <li class=
"level1"><div class=
"li"> For all enumerated types in the gEDA/gaf file formats, the field takes on the numeric value.
</div>
150 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/>
151 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/>
152 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/>
153 For information on the color index (which is used in practically all objects), see the Color section.
157 <!-- SECTION "Object types" [2241-3508] -->
158 <h3><a name=
"version" id=
"version">version
</a></h3>
162 Valid in: Schematic and Symbol files
<br/>
163 <strong><code>type version
</code></strong>
165 <table class=
"inline">
167 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
170 <td>type
</td><td>char
</td><td>v
</td>
173 <td>version
</td><td>int
</td><td>version of gEDA/gaf that wrote this file
</td>
176 <td>fileformat_version
</td><td>int
</td><td>gEDA/gaf file format version number
</td>
180 <li class=
"level1"><div class=
"li"> The type is a lower case “v” (as in Victor).
</div>
182 <li class=
"level1"><div class=
"li"> This object must be in every file used or created by the gEDA/gaf tools.
</div>
184 <li class=
"level1"><div class=
"li"> The format of the first version field is YYYYMMDD.
</div>
186 <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>
188 <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>
190 <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>
192 <li class=
"level1"><div class=
"li"> fileformat version increases when the file format changes.
</div>
194 <li class=
"level1"><div class=
"li"> The starting point for fileformat version is
1.
</div>
196 <li class=
"level1"><div class=
"li"> fileformat version is just an integer with no minor number.
</div>
198 <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</div>
200 <li class=
"level1"><div class=
"li"> Stable versions include:
20070526,
20070626</div>
202 <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>
204 <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’s file format.
</div>
212 <pre class=
"code">v
20040111 1</pre>
215 <!-- SECTION "version" [3509-5357] -->
216 <h3><a name=
"line" id=
"line">line
</a></h3>
220 Valid in: Schematic and Symbol files
<br/>
221 <strong><code>type x1 y1 x2 y2 color width capstyle dashstyle dashlength dashspace
</code></strong>
223 <table class=
"inline">
225 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
228 <td>type
</td><td>char
</td><td>L
</td>
231 <td>x1
</td><td>int/mils
</td><td>First X coordinate
</td>
234 <td>y1
</td><td>int/mils
</td><td>First Y coordinate
</td>
237 <td>x2
</td><td>int/mils
</td><td>Second X coordinate
</td>
240 <td>y2
</td><td>int/mils
</td><td>Second Y coordinate
</td>
243 <td>color
</td><td>int
</td><td>Color index
</td>
246 <td>width
</td><td>int/mils
</td><td>Width of line
</td>
249 <td>capstyle
</td><td>int
</td><td>Line cap style
</td>
252 <td>dashstyle
</td><td>int
</td><td>Type of dash style
</td>
255 <td>dashlength
</td><td>int
</td><td>Length of dash
</td>
258 <td>dashspace
</td><td>int
</td><td>Space inbetween dashes
</td>
262 <li class=
"level1"><div class=
"li"> The capstyle is an enumerated type:
</div>
264 <li class=
"level2"><div class=
"li"> END NONE =
0</div>
266 <li class=
"level2"><div class=
"li"> END SQUARE =
1</div>
268 <li class=
"level2"><div class=
"li"> END ROUND =
2</div>
272 <li class=
"level1"><div class=
"li"> The dashstyle is an enumerated type:
</div>
274 <li class=
"level2"><div class=
"li"> TYPE SOLID =
0</div>
276 <li class=
"level2"><div class=
"li"> TYPE DOTTED =
1</div>
278 <li class=
"level2"><div class=
"li"> TYPE DASHED =
2</div>
280 <li class=
"level2"><div class=
"li"> TYPE CENTER =
3</div>
282 <li class=
"level2"><div class=
"li"> TYPE PHANTOM =
4</div>
286 <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>
288 <li class=
"level1"><div class=
"li"> The dashspace paramater is not used for TYPE SOLID. This parameter should take on a value of -
1 in these case.
</div>
296 <pre class=
"code">L
23000 69000 28000 69000 3 40 0 1 -
1 75</pre>
299 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.
303 <!-- SECTION "line" [5358-6592] -->
304 <h3><a name=
"picture" id=
"picture">picture
</a></h3>
308 Valid in: Schematic and Symbol files
<br/>
309 <strong><code>type x1 y1 width height angle ratio mirrored embedded
<br/>
313 [encoded picture data
<br/>
315 encoded picture end]
</code></strong>
317 <table class=
"inline">
319 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
322 <td>type
</td><td>char
</td><td>G
</td>
325 <td>x
</td><td>int/mils
</td><td>Lower left X coordinate
</td>
328 <td>y
</td><td>int/mils
</td><td>Lower left Y coordinate
</td>
331 <td>width
</td><td>int/mils
</td><td>Width of the picture
</td>
334 <td>height
</td><td>int/mils
</td><td>Height of the picture
</td>
337 <td>angle
</td><td>int/degrees
</td><td>Angle of the picture
</td>
340 <td>mirrored
</td><td>char
</td><td>Mirrored or normal picture
</td>
343 <td>embedded
</td><td>char
</td><td>Embedded or link to the picture file
</td>
346 <td>filename
</td><td>string
</td><td>path and filename of a not embedded picture
</td>
349 <td>encoded picture data
</td><td>string
</td><td>Serialized picture encoded using base64
</td>
352 <td>encoded picture end
</td><td>string
</td><td>A line containing only a dot character
</td>
356 <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>
358 <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>
360 <li class=
"level1"><div class=
"li"> The mirrored field is an enumerated type:
</div>
362 <li class=
"level2"><div class=
"li"> NOT MIRRORED =
0</div>
364 <li class=
"level2"><div class=
"li"> MIRRORED =
1</div>
368 <li class=
"level1"><div class=
"li"> The embedded field is an enumerated type:
</div>
370 <li class=
"level2"><div class=
"li"> NOT EMBEDDED =
0</div>
372 <li class=
"level2"><div class=
"li"> EMBEDDED =
1 (not yet supported)
</div>
376 <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>
378 <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>
380 <li class=
"level2"><div class=
"li"> encoded picture end : A line containing only a single dot
'.
' character marks the end of the encoded picture data.
</div>
390 <pre class=
"code">G
16900 35800 1400 2175 0 6.435331e-01 0 0
391 ../bitmaps/logo.jpg
</pre>
394 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 (i.e.: the ratio is
0.6353). The picture rotation is
0 degrees and the picture is not mirrored, neither embedded.
<br/>
395 The picture path and filename is showed in the second line.
<br/>
399 <pre class=
"code">G
16900 35800 1400 2175 0 6.435331e-01 0 1
401 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
402 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
406 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 (i.e.: the ratio is
0.6353).
<br/>
407 The picture rotation is
0 degrees, it is not mirrored, and it is embedded.
<br/>
408 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/>
409 The encoded picture data is only an example (it is not real data). The last line containing a single dot
'.
' character marks the end of the encoded picture data.
413 <!-- SECTION "picture" [6593-9386] -->
414 <h3><a name=
"box" id=
"box">box
</a></h3>
418 Valid in: Schematic and Symbol files
<br/>
419 <strong><code>type x y width height color width capstyle dashtype dashlength dashspace
420 filltype fillwidth angle1 pitch1 angle2 pitch2
</code></strong>
422 <table class=
"inline">
424 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
427 <td>type
</td><td>char
</td><td>B
</td>
430 <td>x
</td><td>int/mils
</td><td>Lower left hand X coordinate
</td>
433 <td>y
</td><td>int/mils
</td><td>Lower left hand Y coordinate
</td>
436 <td>width
</td><td>int/mils
</td><td>Width of the box (x direction)
</td>
439 <td>height
</td><td>int/mils
</td><td>Height of the box (y direction)
</td>
442 <td>color
</td><td>int
</td><td>Color index
</td>
445 <td>width
</td><td>int/mils
</td><td>Width of lines
</td>
448 <td>capstyle
</td><td>int/mils
</td><td>Line cap style
</td>
451 <td>dashstyle
</td><td>int
</td><td>Type of dash style
</td>
454 <td>dashlength
</td><td>int/mils
</td><td>Length of dash
</td>
457 <td>dashspace
</td><td>int/mils
</td><td>Space inbetween dashes
</td>
460 <td>filltype
</td><td>int
</td><td>Type of fill
</td>
463 <td>fillwidth
</td><td>int/mils
</td><td>Width of the fill lines
</td>
466 <td>angle1
</td><td>int/degrees
</td><td>First angle of fill
</td>
469 <td>pitch1
</td><td>int/mils
</td><td>First pitch/spacing of fill
</td>
472 <td>angle2
</td><td>int/degrees
</td><td>Second angle of fill
</td>
475 <td>pitch2
</td><td>int/mils
</td><td>Second pitch/spacing of fill
</td>
479 <li class=
"level1"><div class=
"li"> The capstyle is an enumerated type:
</div>
481 <li class=
"level2"><div class=
"li"> END NONE =
0</div>
483 <li class=
"level2"><div class=
"li"> END SQUARE =
1</div>
485 <li class=
"level2"><div class=
"li"> END ROUND =
2</div>
489 <li class=
"level1"><div class=
"li"> The dashstyle is an enumerated type:
</div>
491 <li class=
"level2"><div class=
"li"> TYPE SOLID =
0</div>
493 <li class=
"level2"><div class=
"li"> TYPE DOTTED =
1</div>
495 <li class=
"level2"><div class=
"li"> TYPE DASHED =
2</div>
497 <li class=
"level2"><div class=
"li"> TYPE CENTER =
3</div>
499 <li class=
"level2"><div class=
"li"> TYPE PHANTOM =
4</div>
503 <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>
505 <li class=
"level1"><div class=
"li"> The dashspace paramater is not used for TYPE SOLID. This parameter should take on a value of -
1 in these case.
</div>
507 <li class=
"level1"><div class=
"li"> The filltype parameter is an enumerated type:
</div>
509 <li class=
"level2"><div class=
"li"> FILLING HOLLOW =
0</div>
511 <li class=
"level2"><div class=
"li"> FILLING FILL =
1</div>
513 <li class=
"level2"><div class=
"li"> FILLING MESH =
2</div>
515 <li class=
"level2"><div class=
"li"> FILLING HATCH =
3</div>
517 <li class=
"level2"><div class=
"li"> FILLING VOID =
4 unused
</div>
521 <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>
523 <li class=
"level1"><div class=
"li"> The fill type FILLING FILL is a solid color fill.
</div>
525 <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>
527 <li class=
"level1"><div class=
"li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.
</div>
535 <pre class=
"code">B
33000 67300 2000 2000 3 60 0 2 75 50 0 -
1 -
1 -
1 -
1 -
1</pre>
538 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.
542 <!-- SECTION "box" [9387-11593] -->
543 <h3><a name=
"circle" id=
"circle">circle
</a></h3>
547 Valid in: Schematic and Symbol files
<br/>
548 <strong><code>type x y radius color width capstyle dashtype dashlength dashspace
549 filltype fillwidth angle1 pitch1 angle2 pitch2
</code></strong>
551 <table class=
"inline">
553 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
556 <td>type
</td><td>char
</td><td>V
</td>
559 <td>x
</td><td>int/mils
</td><td>Center X coordinate
</td>
562 <td>y
</td><td>int/mils
</td><td>Center Y coordinate
</td>
565 <td>radius
</td><td>int/mils
</td><td>Radius of the circle
</td>
568 <td>color
</td><td>int
</td><td>Color index
</td>
571 <td>width
</td><td>int/mils
</td><td>Width of circle line
</td>
574 <td>capstyle
</td><td>int/mils
</td><td>0 unused
</td>
577 <td>dashstyle
</td><td>int
</td><td>Type of dash style
</td>
580 <td>dashlength
</td><td>int/mils
</td><td>Length of dash
</td>
583 <td>dashspace
</td><td>int/mils
</td><td>Space inbetween dashes
</td>
586 <td>filltype
</td><td>int
</td><td>Type of fill
</td>
589 <td>fillwidth
</td><td>int/mils
</td><td>Width of the fill lines
</td>
592 <td>angle1
</td><td>int/degrees
</td><td>First angle of fill
</td>
595 <td>pitch1
</td><td>int/mils
</td><td>First pitch/spacing of fill
</td>
598 <td>angle2
</td><td>int/degrees
</td><td>Second angle of fill
</td>
601 <td>pitch2
</td><td>int/mils
</td><td>Second pitch/spacing of fill
</td>
605 <li class=
"level1"><div class=
"li"> The dashstyle is an enumerated type:
</div>
607 <li class=
"level2"><div class=
"li"> TYPE SOLID =
0</div>
609 <li class=
"level2"><div class=
"li"> TYPE DOTTED =
1</div>
611 <li class=
"level2"><div class=
"li"> TYPE DASHED =
2</div>
613 <li class=
"level2"><div class=
"li"> TYPE CENTER =
3</div>
615 <li class=
"level2"><div class=
"li"> TYPE PHANTOM =
4</div>
619 <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>
621 <li class=
"level1"><div class=
"li"> The dashspace paramater is not used for TYPE SOLID. This parameter should take on a value of -
1 in these case.
</div>
623 <li class=
"level1"><div class=
"li"> The filltype parameter is an enumerated type:
</div>
625 <li class=
"level2"><div class=
"li"> FILLING HOLLOW =
0</div>
627 <li class=
"level2"><div class=
"li"> FILLING FILL =
1</div>
629 <li class=
"level2"><div class=
"li"> FILLING MESH =
2</div>
631 <li class=
"level2"><div class=
"li"> FILLING HATCH =
3</div>
633 <li class=
"level2"><div class=
"li"> FILLING VOID =
4 unused
</div>
637 <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>
639 <li class=
"level1"><div class=
"li"> The fill type FILLING FILL is a solid color fill.
</div>
641 <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>
643 <li class=
"level1"><div class=
"li"> Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.
</div>
651 <pre class=
"code">V
38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50</pre>
654 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.
658 <!-- SECTION "circle" [11594-13719] -->
659 <h3><a name=
"arc" id=
"arc">arc
</a></h3>
663 Valid in: Schematic and Symbol files
<br/>
664 <strong><code>type x y radius startangle sweepangle color width capstyle dashtype
665 dashlength dashspace
</code></strong>
667 <table class=
"inline">
669 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
672 <td>type
</td><td>char
</td><td>A
</td>
675 <td>x
</td><td>int/mils
</td><td>Center X coordinate
</td>
678 <td>y
</td><td>int/mils
</td><td>Center Y coordinate
</td>
681 <td>radius
</td><td>int/mils
</td><td>Radius of the arc
</td>
684 <td>startangle
</td><td>int/degrees
</td><td>Starting angle of the arc
</td>
687 <td>sweepangle
</td><td>int/degrees
</td><td>Amount the arc sweeps
</td>
690 <td>color
</td><td>int
</td><td>Color index
</td>
693 <td>width
</td><td>int/mils
</td><td>Width of circle line
</td>
696 <td>capstyle
</td><td>int
</td><td>Cap style
</td>
699 <td>dashstyle
</td><td>int
</td><td>Type of dash style
</td>
702 <td>dashlength
</td><td>int/mils
</td><td>Length of dash
</td>
705 <td>dashspace
</td><td>int/mils
</td><td>Space inbetween dashes
</td>
709 <li class=
"level1"><div class=
"li"> The startangle can be negative, but not recommended.
</div>
711 <li class=
"level1"><div class=
"li"> The sweepangle can be negative, but not recommended.
</div>
713 <li class=
"level1"><div class=
"li"> The capstyle is an enumerated type:
</div>
715 <li class=
"level2"><div class=
"li"> END NONE =
0</div>
717 <li class=
"level2"><div class=
"li"> END SQUARE =
1</div>
719 <li class=
"level2"><div class=
"li"> END ROUND =
2</div>
723 <li class=
"level1"><div class=
"li"> The dashstyle is an enumerated type:
</div>
725 <li class=
"level2"><div class=
"li"> TYPE SOLID =
0</div>
727 <li class=
"level2"><div class=
"li"> TYPE DOTTED =
1</div>
729 <li class=
"level2"><div class=
"li"> TYPE DASHED =
2</div>
731 <li class=
"level2"><div class=
"li"> TYPE CENTER =
3</div>
733 <li class=
"level2"><div class=
"li"> TYPE PHANTOM =
4</div>
737 <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>
739 <li class=
"level1"><div class=
"li"> The dashspace paramater is not used for TYPE SOLID. This parameter should take on a value of -
1 in these case.
</div>
747 <pre class=
"code">A
30600 75000 2000 0 45 3 0 0 3 75 50</pre>
750 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.
754 <!-- SECTION "arc" [13720-15235] -->
755 <h3><a name=
"text" id=
"text">text
</a></h3>
759 Valid in: Schematic and Symbol files
<br/>
760 <strong><code>type x y color size visibility show_name_value angle alignment num_lines
<br/>
770 string line N
</code></strong>
772 <table class=
"inline">
774 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
777 <td>type
</td><td>char
</td><td>T
</td>
780 <td>x
</td><td>int/mils
</td><td>First X coordinate
</td>
783 <td>y
</td><td>int/mils
</td><td>First Y coordinate
</td>
786 <td>color
</td><td>int
</td><td>Color index
</td>
789 <td>size
</td><td>int/points
</td><td>Size of text
</td>
792 <td>visibility
</td><td>int
</td><td>Visibility of text
</td>
795 <td>show_name_value
</td><td>int
</td><td>Attribute visibility control
</td>
798 <td>angle
</td><td>int/degrees
</td><td>Angle of the text
</td>
801 <td>alignment
</td><td>int
</td><td>Alignment/origin of the text
</td>
804 <td>num_lines
</td><td>int
</td><td>Number of lines of text (
1 based)
</td>
807 <td>string line
1 … N
</td><td>string
</td><td>The text strings, on a seperate line
</td>
811 <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>
813 <li class=
"level1"><div class=
"li"> There must be exactly num lines of text following the T
… string.
</div>
815 <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>
817 <li class=
"level1"><div class=
"li"> The minimum size is
2 points (
1/
72 of an inch).
</div>
819 <li class=
"level1"><div class=
"li"> There is no maximum size.
</div>
821 <li class=
"level1"><div class=
"li"> The coordinate pair is the origin of the text item.
</div>
823 <li class=
"level1"><div class=
"li"> The visibility field is an enumerated type:
</div>
825 <li class=
"level2"><div class=
"li"> INVISIBLE =
0</div>
827 <li class=
"level2"><div class=
"li"> VISIBLE =
1</div>
831 <li class=
"level1"><div class=
"li"> The show_name_value is an enumerated type:
</div>
833 <li class=
"level2"><div class=
"li"> SHOW NAME VALUE =
0 (show both name and value of an attribute)
</div>
835 <li class=
"level2"><div class=
"li"> SHOW VALUE =
1 (show only the value of an attribute)
</div>
837 <li class=
"level2"><div class=
"li"> SHOW NAME =
2 (show only the name of an attribute)
</div>
841 <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>
843 <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>
845 <li class=
"level1"><div class=
"li"> The alignment/origin field controls the relative location of the origin.
</div>
847 <li class=
"level1"><div class=
"li"> The alignment field can take a value from
0 to
8.
</div>
849 <li class=
"level1"><div class=
"li"> The num_lines field always starts at
1.
</div>
851 <li class=
"level1"><div class=
"li"> The num_lines field was added starting with file format version
1. Past versions (
0 or earlier) only supported single line text objects.
<br/>
852 The following diagram shows what the values for the alignment field mean:
</div>
855 <table class=
"inline">
857 <td> <a href=
"_detail/geda_fileformat_textgraphic.html" class=
"media" title=
"geda:fileformat_textgraphic.jpg"><img src=
"_media/geda_fileformat_textgraphic.jpg" class=
"media" title=
"fileformat_textgraphic.jpg" alt=
"fileformat_textgraphic.jpg" /></a> </td>
865 <pre class=
"code">T
16900 35800 3 10 1 0 0 0 1
869 A text object with the origin at (
16900,
35800), color index
3,
10 points in size, visible, attribute ags not valid (not an attribute), origin at lower left, string: Text string!
876 <pre class=
"code">T
16900 35800 3 10 1 0 0 0 5
881 Text string line
5</pre>
884 This is a similar text object as the above example, however here there are five lines of text.
888 <!-- SECTION "text" [15236-17889] -->
889 <h3><a name=
"net" id=
"net">net
</a></h3>
893 Valid in: Schematic files ONLY
<br/>
894 <strong><code>type x1 y1 x2 y2 color
</code></strong>
896 <table class=
"inline">
898 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
901 <td>type
</td><td>char
</td><td>N
</td>
904 <td>x1
</td><td>int/mils
</td><td>First X coordinate
</td>
907 <td>y1
</td><td>int/mils
</td><td>First Y coordinate
</td>
910 <td>x2
</td><td>int/mils
</td><td>Second X coordinate
</td>
913 <td>y2
</td><td>int/mils
</td><td>Second Y coordinate
</td>
916 <td>color
</td><td>int
</td><td>Color index
</td>
920 <li class=
"level1"><div class=
"li"> Nets can only appear in schematic files.
</div>
922 <li class=
"level1"><div class=
"li"> You cannot have a zero length net (the tools will throw them away).
</div>
930 <pre class=
"code">N
12700 29400 32900 29400 4</pre>
933 A net segment from (
12700,
29400) to (
32900,
29400) with color index
4.
937 <!-- SECTION "net" [17890-18415] -->
938 <h3><a name=
"bus" id=
"bus">bus
</a></h3>
942 Valid in: Schematic files ONLY
<br/>
943 <strong><code>type x1 y1 x2 y2 color ripperdir
</code></strong>
945 <table class=
"inline">
947 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
950 <td>type
</td><td>char
</td><td>U
</td>
953 <td>x1
</td><td>int/mils
</td><td>First X coordinate
</td>
956 <td>y1
</td><td>int/mils
</td><td>First Y coordinate
</td>
959 <td>x2
</td><td>int/mils
</td><td>Second X coordinate
</td>
962 <td>y2
</td><td>int/mils
</td><td>Second Y coordinate
</td>
965 <td>color
</td><td>int
</td><td>Color index
</td>
968 <td>ripperdir
</td><td>int
</td><td>Direction of bus rippers
</td>
972 <li class=
"level1"><div class=
"li"> The ripperdir field for an brand new bus is
0.
</div>
974 <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>
976 <li class=
"level1"><div class=
"li"> Buses can only appear in schematic files.
</div>
978 <li class=
"level1"><div class=
"li"> You cannot have a zero length bus (the tools will throw them away).
</div>
986 <pre class=
"code">U
27300 37400 27300 35300 3 0</pre>
989 A bus segment from (
27300,
37400) to (
27300,
35300) with color index
3 and no nets have been connected to this bus segment.
993 <!-- SECTION "bus" [18416-19347] -->
994 <h3><a name=
"pin" id=
"pin">pin
</a></h3>
998 Valid in: Symbol files ONLY
<br/>
999 <strong><code>type x1 y1 x2 y2 color pintype whichend
</code></strong>
1001 <table class=
"inline">
1003 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
1006 <td>type
</td><td>char
</td><td>P
</td>
1009 <td>x1
</td><td>int/mils
</td><td>First X coordinate
</td>
1012 <td>y1
</td><td>int/mils
</td><td>First Y coordinate
</td>
1015 <td>x2
</td><td>int/mils
</td><td>Second X coordinate
</td>
1018 <td>y2
</td><td>int/mils
</td><td>Second Y coordinate
</td>
1021 <td>color
</td><td>int
</td><td>Color index
</td>
1024 <td>pintype
</td><td>int
</td><td>Type of pin
</td>
1027 <td>whichend
</td><td>int
</td><td>Specifies the active end
</td>
1031 <li class=
"level1"><div class=
"li"> The pintype is an enumerated type:
</div>
1033 <li class=
"level2"><div class=
"li"> NORMAL
<acronym title=
"Personal Identification Number">PIN
</acronym> =
0</div>
1035 <li class=
"level2"><div class=
"li"> BUS
<acronym title=
"Personal Identification Number">PIN
</acronym> =
1 unused
</div>
1039 <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>
1041 <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>
1043 <li class=
"level1"><div class=
"li"> Pins can only appear in symbol files.
</div>
1045 <li class=
"level1"><div class=
"li"> You cannot have a zero length pen (the tools will throw them away).
</div>
1053 <pre class=
"code">P
0 200 200 200 1 0 0</pre>
1056 A pin from (
0,
200) to (
200,
200) with color index
1, a regular pin, and the first point being the active connection end.
1060 <!-- SECTION "pin" [19348-20344] -->
1061 <h3><a name=
"component" id=
"component">component
</a></h3>
1062 <div class=
"level3">
1065 Valid in: Schematic files ONLY
<br/>
1066 <strong><code>type x y selectable angle mirror basename
</code></strong>
1068 <table class=
"inline">
1070 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
1073 <td>type
</td><td>char
</td><td>C
</td>
1076 <td>x
</td><td>int/mils
</td><td>Origin X coordinate
</td>
1079 <td>y
</td><td>int/mils
</td><td>Origin Y coordinate
</td>
1082 <td>selectable
</td><td>int
</td><td>Selectable flag
</td>
1085 <td>angle
</td><td>int/degrees
</td><td>Angle of the component
</td>
1088 <td>mirror
</td><td>int
</td><td>Mirror around Y axis
</td>
1091 <td>basename
</td><td>string
</td><td>The filename of the component
</td>
1096 The selectable field is either
1 for selectable or
0 if not selectable.
1099 <li class=
"level1"><div class=
"li"> The angle field can only take on the following values:
0,
90,
180,
270.
</div>
1101 <li class=
"level1"><div class=
"li"> The angle field can only be positive.
</div>
1103 <li class=
"level1"><div class=
"li"> The mirror flag is
0 if the component is not mirrored (around the Y axis).
</div>
1105 <li class=
"level1"><div class=
"li"> The mirror flag is
1 if the component is mirrored (around the Y axis).
</div>
1107 <li class=
"level1"><div class=
"li"> The just basename is the filename of the component. This filename is not the full path.
</div>
1115 <pre class=
"code">C
18600 19900 1 0 0 7400-
1.sym
</pre>
1118 A component who’s origin is at (
18600,
19900), is selectable, not rotated, not mirrored, and the basename of the component is
7400-
1.sym.
1122 <!-- SECTION "component" [20345-21348] -->
1123 <h3><a name=
"font" id=
"font">font
</a></h3>
1124 <div class=
"level3">
1127 Valid in: Special font files ONLY
<br/>
1128 <strong><code>type character width flag
</code></strong>
1130 <table class=
"inline">
1132 <th>Field
</th><th>Type/unit
</th><th>Description
</th>
1135 <td>type
</td><td>char
</td><td>F
</td>
1138 <td>character
</td><td>char
</td><td>The character being defined
</td>
1141 <td>width
</td><td>int/mils
</td><td>Width of the character (mils)
</td>
1144 <td>flag
</td><td>int
</td><td>Special space flag
</td>
1148 <li class=
"level1"><div class=
"li"> This is a special tag and should ONLY show up in font definition files.
</div>
1150 <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>
1158 <pre class=
"code">F
11 1</pre>
1161 The above font definition is for the space character.
1165 <!-- SECTION "font" [21349-21869] -->
1166 <h2><a name=
"colors" id=
"colors">Colors
</a></h2>
1167 <div class=
"level2">
1170 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:
1172 <table class=
"inline">
1174 <th>Index
</th><th>Object type
</th>
1177 <td>0</td><td>BACKGROUND_COLOR
</td>
1180 <td>1</td><td><acronym title=
"Personal Identification Number">PIN
</acronym>_COLOR
</td>
1183 <td>2</td><td>NET_ENDPOINT_COLOR
</td>
1186 <td>3</td><td>GRAPHIC_COLOR
</td>
1189 <td>4</td><td>NET_COLOR
</td>
1192 <td>5</td><td>ATTRIBUTE_COLOR
</td>
1195 <td>6</td><td>LOGIC_BUBBLE_COLOR
</td>
1198 <td>7</td><td>GRID_COLOR
</td>
1201 <td>8</td><td>DETACHED_ATTRIBUTE_COLOR
</td>
1204 <td>9</td><td>TEXT_COLOR
</td>
1207 <td>10</td><td>BUS_COLOR
</td>
1210 <td>11</td><td>SELECT_COLOR
</td>
1213 <td>12</td><td>BOUNDINGBOX_COLOR
</td>
1216 <td>13</td><td>ZOOM_BOX_COLOR
</td>
1219 <td>14</td><td>STROKE_COLOR
</td>
1222 <td>15</td><td>LOCK_COLOR
</td>
1225 <td>16</td><td>OUTPUT_BACKGROUND_COLOR
</td>
1230 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.
1234 <!-- SECTION "Colors" [21870-22741] -->
1235 <h2><a name=
"attributes" id=
"attributes">Attributes
</a></h2>
1236 <div class=
"level2">
1239 Attributes are enclosed in braces {} and can only be text. Attributes are text items which take on the form name=value. If it doesn’t have name=value, it’s not an attribute. Attributes are attached to the previous object. Here’s an example:
1241 <pre class=
"code">P
988 500 1300 500 1
1243 T
1000 570 5 8 1 1 0
1245 T
1000 550 5 8 1 1 0
1250 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/>
1251 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/>
1252 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.
1256 <!-- SECTION "Attributes" [22742-23729] -->
1257 <h2><a name=
"embedded_components" id=
"embedded_components">Embedded Components
</a></h2>
1258 <div class=
"level2">
1261 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:
1263 <pre class=
"code">C
18600 21500 1 0 0 EMBEDDED555-
1.sym
1266 ... Embedded primitive objects
1271 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.
1275 <!-- SECTION "Embedded Components" [23730-24489] -->
1276 <h2><a name=
"document_revision_history" id=
"document_revision_history">Document Revision History
</a></h2>
1277 <div class=
"level2">
1278 <table class=
"inline">
1280 <td>November
30th,
2002</td><td>Created fleformats.tex from fleformats.html.
</td>
1283 <td>December
1st,
2002</td><td>Continued work on this document.
</td>
1286 <td>October
4th,
2003</td><td>Added new file format version flag info.
</td>
1289 <td>October
19th,
2003</td><td>Added num lines text field.
</td>
1294 <!-- SECTION "Document Revision History" [24490-] --></div>