4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="Pcb">
6
<meta name="generator" content="makeinfo 4.6">
7
<meta http-equiv="Content-Style-Type" content="text/css">
8
<style type="text/css"><!--
9
pre.display { font-family:inherit }
10
pre.format { font-family:inherit }
11
pre.smalldisplay { font-family:inherit; font-size:smaller }
12
pre.smallformat { font-family:inherit; font-size:smaller }
13
pre.smallexample { font-size:smaller }
14
pre.smalllisp { font-size:smaller }
20
Node: <a name="Element%20File">Element File</a>,
21
Next: <a rel="next" accesskey="n" href="Font-File.html#Font%20File">Font File</a>,
22
Previous: <a rel="previous" accesskey="p" href="Layout-File.html#Layout%20File">Layout File</a>,
23
Up: <a rel="up" accesskey="u" href="File-Formats.html#File%20Formats">File Formats</a>
27
<h3 class="section">Element File Format</h3>
29
<p>Element files are used to describe one component which then may be used
30
several times within one or more layouts. You will normally split the
31
file into two parts, one for the pinout and one for the package description.
32
Using <code>m4</code> allows you to define pin names as macros in one file and
33
include a package description file which evaluates the macros. See
34
the resource <em>elementCommand</em> for more information. The pins (and pads)
35
must appear in sequential order in the element file (new in 1.5) so that
36
pin 1 must be the first PIN(...) in the file.
38
<p>Doing things this way makes it possible to use one package file for several
39
different circuits. See the sample files <code>dil*</code>.
41
<p>The lowest x and y coordinates of all sub-objects of an element are used
42
as an attachment point for the cross hair cursor of the main window.
44
<pre class="example"> File = {Element}...
45
Element = "Element(" Flags Description LayoutName Value \
46
TextX TextY direction scale TextFlags")"
47
"(" {ElementData}... [Mark] ")"
48
ElementData = {ElementLine | Pad | Pin | ElementArc }...
49
ElementArc = "ElementArc(" X Y Width Height
50
StartAngle DeltaAngle Thickness ")"
51
ElementLine = "ElementLine(" X1 Y1 X2 Y2 Thickness ")"
52
Mark = "Mark(" X Y ")"
53
Pad = "Pad(" X1 Y1 X2 Y2 Thickness Name PinNumber Flags ")"
54
Pin = "Pin(" X Y Thickness DrillingHole Name PinNumber Flags ")"
59
<br><dt><code>Element</code>
60
<dd>Objects of type element are determined by flags, some names, a canonical
61
and a layout name as well as a value. Additional fields are text position,
62
their direction counted from zero to three (n * 90 degrees counter-clockwise)
67
<br><dt><code>Flags</code>
68
<dd>The flag field determines the state of an element.
70
<pre class="display"> bit 4: the element name is hidden
71
bit 6: element has been selected
72
bit 7: element is located on the solder side
75
<br><dt><code>TextFlags</code>
76
<dd><dt><code>scale</code>
77
<dd><dt><code>direction</code>
78
<dd>See the description of text object earlier in this chapter.
80
<br><dt><code>ElementLine</code>
81
<dd>A line is defined by its start and end points and by its size, or width.
83
<br><dt><code>ElementArc</code>
84
<dd>Defines an arc by its center, width, height, start angle, its length in
85
degrees and its size. Remember the y axis on the screen grows downwards.
87
<br><dt><code>Mark</code>
88
<dd>is just a hint to make positioning easier. The cross hair will be positioned
89
here. Its center is passed as the two arguments.
91
<br><dt><code>Pad</code>
92
<dd>A pad is very similar to a line except it may not be disconnected from
93
its element and it has an associated name.
94
Is is defined by two end point position, size, name and by some flags.
95
<pre class="example"> bit 2: set if pad was found during a connection search
96
bit 5: display the pads name
97
bit 6: pad has been selected
98
bit 7: pad is located on the solder side
101
<br><dt><code>Pin</code>
102
<dd>A pin is very similar to a via except it may not be disconnected from
104
<pre class="example"> bit 0: always set
106
bit 2: set if pin was found during a connection search
107
bit 3: set if pin is only a mounting hole (no copper annulus)
108
bit 5: display the pins name
109
bit 6: pin has been selected
110
bit 8: pin is drawn as a square
111
bit 12: set if pin is drawn with an octagonal shape