~ubuntu-branches/ubuntu/precise/pcb/precise

« back to all changes in this revision

Viewing changes to doc/pcb.html/Element-File.html

  • Committer: Bazaar Package Importer
  • Author(s): Hamish Moffatt
  • Date: 2005-02-20 13:14:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050220131400-pfz66g5vhx0azl8f
Tags: 1.99j+20050127-2
* Improved package description: (closes: #295405)
* Fixed dependency: tk84 -> tk8.4 (closes: #295404)
* Updated README.debian (closes: #269578)
* Applied patch to src/djopt.c to allow compilation with gcc-4.0
  (closes: #294319), thanks to Andreas Jochens for the patch.
* Prevent example files from being compressed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html lang="en">
 
2
<head>
 
3
<title>Pcb</title>
 
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 }
 
15
--></style>
 
16
</head>
 
17
<body>
 
18
<div class="node">
 
19
<p>
 
20
Node:&nbsp;<a name="Element%20File">Element File</a>,
 
21
Next:&nbsp;<a rel="next" accesskey="n" href="Font-File.html#Font%20File">Font File</a>,
 
22
Previous:&nbsp;<a rel="previous" accesskey="p" href="Layout-File.html#Layout%20File">Layout File</a>,
 
23
Up:&nbsp;<a rel="up" accesskey="u" href="File-Formats.html#File%20Formats">File Formats</a>
 
24
<hr><br>
 
25
</div>
 
26
 
 
27
<h3 class="section">Element File Format</h3>
 
28
 
 
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.
 
37
 
 
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>.
 
40
 
 
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.
 
43
 
 
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 ")"
 
55
     </pre>
 
56
 
 
57
     <dl>
 
58
 
 
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)
 
63
and element data.
 
64
 
 
65
          <dl>
 
66
 
 
67
          <br><dt><code>Flags</code>
 
68
          <dd>The flag field determines the state of an element. 
 
69
The bit values are:
 
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
 
73
               </pre>
 
74
 
 
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.
 
79
 
 
80
          <br><dt><code>ElementLine</code>
 
81
          <dd>A line is defined by its start and end points and by its size, or width.
 
82
 
 
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.
 
86
 
 
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.
 
90
 
 
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
 
99
               </pre>
 
100
 
 
101
          <br><dt><code>Pin</code>
 
102
          <dd>A pin is very similar to a via except it may not be disconnected from
 
103
its element.
 
104
          <pre class="example">                   bit 0:  always set
 
105
                   bit 1:  always clear
 
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
 
112
               </pre>
 
113
 
 
114
     </dl>
 
115
 
 
116
   </dl>
 
117
 
 
118
   </body></html>
 
119