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