User Tools

Site Tools


geda:file_format_spec

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geda:file_format_spec [2012/02/20 15:14]
127.0.0.1 external edit
geda:file_format_spec [2020/12/16 08:31] (current)
rlutz [version] try to make changes appear on page
Line 1: Line 1:
 +//​Translations of this page are also available in the following languages://​ [[file_format_spec.ru|Русский]].
 +
 ====== gEDA/gaf File Format Document ====== ====== gEDA/gaf File Format Document ======
 by: Ales V. Hvezda, ahvezda@geda.seul.org by: Ales V. Hvezda, ahvezda@geda.seul.org
Line 12: Line 14:
  
 ===== Coordinate Space ===== ===== Coordinate Space =====
-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).\\+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).
   * Origin is in lower left hand corner.   * Origin is in lower left hand corner.
   * The size of the coordinate space is unlimited, but it is recommended that all objects stay within (120.0, 90.0) (x, y inches).   * The size of the coordinate space is unlimited, but it is recommended that all objects stay within (120.0, 90.0) (x, y inches).
Line 67: Line 69:
   * The starting point for fileformat version was 1. The current fileformat is 2.   * The starting point for fileformat version was 1. The current fileformat is 2.
   * fileformat version is just an integer with no minor number.   * fileformat version is just an integer with no minor number.
-  * 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 +  * Development versions include ​(but are not limited to): 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  
-  * Stable versions include: 20070526, 20070626, 20070902, 20071231, 20080127, 20080929, 20081220, 20081231, 20091004, 20100214, 20110115+  * Stable versions include ​(but are not limited to): 20070526, 20070626, 20070902, 20071231, 20080127, 20080929, 20081220, 20081231, 20091004, 20100214, 20110115
   * CVS or test versions (should not be used): 20030921, 20031004, 20031019, 20031231, 20050814   * CVS or test versions (should not be used): 20030921, 20031004, 20031019, 20031231, 20050814
   * 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.   * 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.
  
-Example:\\+Example:
 <​code>​v 20040111 1</​code>​ <​code>​v 20040111 1</​code>​
  
Line 105: Line 107:
   * The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.   * The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.
  
-Example:\\+Example:
 <​code>​L 23000 69000 28000 69000 3 40 0 1 -1 75</​code>​ <​code>​L 23000 69000 28000 69000 3 40 0 1 -1 75</​code>​
  
Line 142: Line 144:
     * encoded picture end : A line containing only a single dot '​.'​ character marks the end of the encoded picture data.     * encoded picture end : A line containing only a single dot '​.'​ character marks the end of the encoded picture data.
  
-Example:\\+Example ​1:
 <​code>​G 16900 35800 1400 2175 0 0 0 <​code>​G 16900 35800 1400 2175 0 0 0
 ../​bitmaps/​logo.jpg</​code>​ ../​bitmaps/​logo.jpg</​code>​
  
 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.\\ 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.\\
-The picture path and filename is showed in the second line.\\ +The picture path and filename is showed in the second line. 
-Example:\\+ 
 +Example ​2:
 <​code>​G 16900 35800 1400 2175 0 0 1 <​code>​G 16900 35800 1400 2175 0 0 1
 ../​bitmaps/​logo.jpg ../​bitmaps/​logo.jpg
Line 207: Line 210:
   * Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.   * Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.
  
-Example:\\+Example:
 <​code>​B 33000 67300 2000 2000 3 60 0 2 75 50 0 -1 -1 -1 -1 -1</​code>​ <​code>​B 33000 67300 2000 2000 3 60 0 2 75 50 0 -1 -1 -1 -1 -1</​code>​
  
Line 254: Line 257:
   * Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.   * Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.
  
-Example:\\+Example:
 <​code>​V 38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50</​code>​ <​code>​V 38000 67000 900 3 0 0 2 75 50 2 10 20 30 90 50</​code>​
  
Line 293: Line 296:
   * The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.   * The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.
  
-Example:\\+Example:
 <​code>​A 30600 75000 2000 0 45 3 0 0 3 75 50</​code>​ <​code>​A 30600 75000 2000 0 45 3 0 0 3 75 50</​code>​
 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. 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.
Line 339: Line 342:
   * The alignment/​origin field controls the relative location of the origin.   * The alignment/​origin field controls the relative location of the origin.
   * The alignment field can take a value from 0 to 8. \\ The following diagram shows what the values for the alignment field mean:   * The alignment field can take a value from 0 to 8. \\ The following diagram shows what the values for the alignment field mean:
- ​{{:​geda:​fileformat_textgraphic.jpg}} ​+ ​{{:​geda:​fileformat_textgraphic.jpg}}
   * The num_lines field always starts at 1.\\ The num_lines field was added starting with file format version 1. Past versions (0 or earlier) only supported single line text objects.   * The num_lines field always starts at 1.\\ The num_lines field was added starting with file format version 1. Past versions (0 or earlier) only supported single line text objects.
   * The text strings of the string line(s) can have overbars if the text is embedded in two overbar markers **"​\_"​**. A single backslash needs to be written as **"​\\"​**.   * The text strings of the string line(s) can have overbars if the text is embedded in two overbar markers **"​\_"​**. A single backslash needs to be written as **"​\\"​**.
  
  
-Example 1:\\+Example 1:
 <​code>​T 16900 35800 3 10 1 0 0 0 1 <​code>​T 16900 35800 3 10 1 0 0 0 1
 Text string!</​code>​ Text string!</​code>​
  
-A text object with the origin at (16900, 35800), color index 3, 10 points in size, visible, attribute ​+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! flags not valid (not an attribute), origin at lower left, not rotated, string: Text string!
  
-Example 2:\\+Example 2:
 <​code>​T 16900 35800 3 10 1 0 0 0 5 <​code>​T 16900 35800 3 10 1 0 0 0 5
 Text string line 1 Text string line 1
Line 361: Line 364:
 This is a similar text object as the above example, however here there are five lines of text. This is a similar text object as the above example, however here there are five lines of text.
  
-Example 3:\\+Example 3:
 <​code>​T 10000 20000 3 10 1 1 8 90 1 <​code>​T 10000 20000 3 10 1 1 8 90 1
 pinlabel=R/​\_W\_</​code>​ pinlabel=R/​\_W\_</​code>​
Line 382: Line 385:
   * You cannot have a zero length net (the tools will throw them away).   * You cannot have a zero length net (the tools will throw them away).
  
-Example:\\+Example:
 <​code>​N 12700 29400 32900 29400 4</​code>​ <​code>​N 12700 29400 32900 29400 4</​code>​
  
Line 405: Line 408:
   * You cannot have a zero length bus (the tools will throw them away).   * You cannot have a zero length bus (the tools will throw them away).
  
-Example:\\+Example:
 <​code>​U 27300 37400 27300 35300 3 0</​code>​ <​code>​U 27300 37400 27300 35300 3 0</​code>​
  
Line 432: Line 435:
   * Zero length pins are allowed   * Zero length pins are allowed
  
-Example:\\+Example:
 <​code>​P 0 200 200 200 1 0 0</​code>​ <​code>​P 0 200 200 200 1 0 0</​code>​
  
Line 450: Line 453:
 |   6 |basename|string|The filename of the component| |   6 |basename|string|The filename of the component|
  
-The selectable field is either 1 for selectable or 0 if not selectable.+  * The selectable field is either 1 for selectable or 0 if not selectable.
   * The angle field can only take on the following values: 0, 90, 180, 270.   * The angle field can only take on the following values: 0, 90, 180, 270.
   * The angle field can only be positive.   * The angle field can only be positive.
Line 457: Line 460:
   * The just basename is the filename of the component. This filename is not the full path.   * The just basename is the filename of the component. This filename is not the full path.
  
-Example:\\+Example:
 <​code>​C 18600 19900 1 0 0 7400-1.sym</​code>​ <​code>​C 18600 19900 1 0 0 7400-1.sym</​code>​
  
Line 543: Line 546:
   * If the font character being defined is the space character (32) then flag should be 1, otherwise 0.   * If the font character being defined is the space character (32) then flag should be 1, otherwise 0.
  
-Example:\\+Example:
 <​code>​F 11 1</​code>​ <​code>​F 11 1</​code>​
  
Line 574: Line 577:
 |19|FREESTYLE3_COLOR| |19|FREESTYLE3_COLOR|
 |20|FREESTYLE4_COLOR| |20|FREESTYLE4_COLOR|
 +
 +Some additional colors are used internally but not permitted as object colors:
 +
 +^Index^Object type^
 |21|JUNCTION_COLOR| |21|JUNCTION_COLOR|
 |22|MESH_GRID_MAJOR_COLOR| |22|MESH_GRID_MAJOR_COLOR|
 |23|MESH_GRID_MINOR_COLOR| |23|MESH_GRID_MINOR_COLOR|
 +|24|ORIGIN_COLOR|
 +|25|PLACE_ORIGIN_COLOR|
  
 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. 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.
Line 582: Line 591:
 ===== Attributes ===== ===== Attributes =====
 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: 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:
-<​code>​P ​988 500 1300 500 1+<​code>​ 
 +300 700 0 700 1 0 1
 { {
-1000 570 5 8 1 1 0 +200 750 5 8 1 1 0 6 1 
-pinseq=3 +pinnumber=1 
-1000 550 5 8 1 0 +200 650 5 8 1 0 8 1 
-pinnumber=3 +pinseq=1 
-}</​code>​+} 
 +</​code>​
  
 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.\\ 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.\\
Line 615: Line 626:
   * As an implementation detail; libgeda takes code from librsvg, an SVG parsing library. As a result, the majority of SVG 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).   * As an implementation detail; libgeda takes code from librsvg, an SVG parsing library. As a result, the majority of SVG 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).
   * Coordinates along the path are specified in the standard gschem coordinate space.   * Coordinates along the path are specified in the standard gschem coordinate space.
- +  ​* Those path commands which gEDA emits, and will guarantee to parse, are listed in the table below:\\ (Text taken from the above SVG specification).
-  ​* Those path commands which gEDA emits, and will guarantee to parse, are listed in the table below:\\ +
-(Text taken from the above SVG specification). +
   * In the table below, the following notation is used:   * In the table below, the following notation is used:
     * (): grouping of parameters     * (): grouping of parameters
Line 662: Line 670:
 |November 2nd, 2008|Added path object, bumping file format version to 2| |November 2nd, 2008|Added path object, bumping file format version to 2|
 |May 26th, 2011|Added a column for the position of parameters in the tables| |May 26th, 2011|Added a column for the position of parameters in the tables|
 +
geda/file_format_spec.1329768895.txt.gz · Last modified: 2013/11/01 01:06 (external edit)