File: README.notes

package info (click to toggle)
xcircuit 2.0a6-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,960 kB
  • ctags: 3,202
  • sloc: ansic: 30,529; makefile: 51; sh: 2
file content (223 lines) | stat: -rw-r--r-- 12,199 bytes parent folder | download
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
XCircuit v2.0a3 (alpha)
-----------------------------------------------------------------------------

An X11 drawing program [especially for circuit schematics]
Copyright (c) 1998 Tim Edwards
August 1993 -- July 1997
-----------------------------------------------------------------------------

This README file contains additional notes about the program which may or may
not be of interest to anyone.
-----------------------------------------------------------------------------

Rationale:

   This program was written with a number of things in mind.  The major
point in writing it was that I found all of the drawing programs freely
distributed at the usual X11 ftp sources (ftp.uu.net, export.lcs.mit.edu,
etc.), which includes xpic and xfig, and even some other programs like
idraw and commercial programs like framemaker, were lacking in some manner.
Some of them, like xpic, are missing fundamental parts, while others, like
xfig and framemaker, have a cumbersome user interface and require
inordinately large amounts of time to create simple pictures.  The really
powerful programs like Adobe Illustrator are, naturally, expensive.
There has been a long-standing tradition of making MacDraw lookalikes which
I find particularly disturbing, since a number of features of that GUI are
fundamentally screwed up, including the dependence on a black-and-white color
scheme for things such as grid lines and edit points which can make the screen
cluttered and difficult to work with.  I have chosen to freely ignore all such
standards in cases where they seem to hinder rather than help the user.
   Disclaimer:  The above comments refer to versions of the abovementioned
programs available as of 1993 and do not necessarily reflect the programs'
current status.  Particularly the latest (from 1995 or so) version of xfig 
is quite good, though it continues to have a "MacDraw" feel to it.

   The properties of xcircuit are as follows:

A) Structural backbone
   1) There are five drawing elements which are considered "primary".  
      These are as follows:  

      a) polygon (multiple lines which may or may not be closed and filled)
      b) arc (ellipse segment which may be closed and/or filled as above)
      c) label (any text)
      d) curve (based on the PostScript "curveto" algorithm)
      e) object instance (see below)

   2) There are two drawing elements which are considered "secondary", which
      is to say, contain instances of primary elements.  These are:

      a) path (a connected series of polygons, arcs, and/or curves)
      b) object (something containing polygons, arcs, labels, 
		 curves, paths, and instances of other objects)

      Each object is instanced by a primary element called the "object
      instance", a self-contained unit which allows an object to be scaled, 
      rotated, and translated within another object.  Since objects contain
      object instances and object instances point to objects, there is a
      two-step recursion which is central to the concept of xcircuit.

   3) There is one primary object instance called the TopObject, which is
      the program window, and its associated object, which is whatever
      appears on the screen.  TopObject is a pointer, so that any object
      in memory may be the top object, allowing a push/pop edit stack.
      All other objects are organized in an array of pointers called the
      Library.  The Library is filled on startup with the contents of a
      Library file, and is expanded whenever a new object is created.
      
      Actually, there are many different TopObjects, called "pages",
      which can be switched between at will by typing the number of
      the page, 1 through 9 and 0 for page 10, or through the "Page"
      menu command, which allows access to as many pages as are
      defined.  The "load" and "save" commands act only on the
      present page (unless multiple pages are loaded at a time), as
      do all the drawing commands.

   4) All elements allocate memory as they are created and release the
      memory as they are destroyed, so the only limit on the number of
      elements in a drawing is the memory of the workstation.

B) Input/Output

   1) All input and output is in PostScript, albeit a version of PostScript
      with extremely restricted syntax:  xcircuit is in no sense a PS
      interpreter!  The primary element types are defined as procedures
      in the PostScript prologue;  all secondary elements are defined as
      "def" structures in PostScript, the only restriction being that no
      definition can be called before it is defined.

   2) Text is vector-drawn, in order to best match the flexibility of
      PostScript, which unlike X11 allows text to be scaled to any size
      and rotated to any orientation.  The limitation is that different
      font types (other than some characters from the "Symbol" font)
      cannot be differentiated on the drawing window.  The quality of
      the text on the screen is relatively poor;  however, the end
      product of xcircuit is the PostScript file, which does not suffer
      from those limitations.  Spacing of the text is accurate under
      all scalings except for user-defined fonts, for which spacing
      information is not available.

   3) X11 does not have any capability for generalized curves (splines).
      Therefore, splines are constructed by an N-segment approximation
      which internally looks like a polygon.  The PostScript output is a 
      smooth curve instead of the approximation.

   4) X11 does not have any capability for generalized ellipses (ellipses
      under any rotation).  Similarly to the splines, arcs are constructed
      by an N-segment approximation.

   5) Implementing all arcs and curves as N-segment approximation allows
      the possibility of general paths, or sequences of polygons, arc
      sections, and curves which form a path that can be bordered, closed
      and/or filled like an individual arc, curve, or polygon.

   6) Other than the qualitative appearance of the text, the screen output
      of xcircuit is meant to be the closest possible match to the
      rendering of the PostScript output.  A PostScript hack allows
      stipple pattern fills to be effectively "transparent" (something
      that PostScript does not do naturally).  However, the effect is
      *extremely* device-dependent because it overrides the printer's
      halftoning operators.  One effect of this is that halftoning
      will look abnormally large when viewed at screen resolutions,
      e.g., with GhostScript.

C) User Interface

   1) The mouse button system and the object library are based on the
      Caltech circuit-simulation program "log" (either "analog" or "diglog").
      As is usual for most applications, mouse button 1 is used to select
      things or cycle between selections, button 2 usually terminates a
      command, and button 3 will abort a command.  In addition, button 1
      has a function called "grab", which occurs after the button has
      been continually pressed for a short length of time (about 1/5 second).
      As the name implies, "grab" grabs hold of an element which can then
      be moved around the screen.

      Because this program is tailored to circuit drawing, the most common
      functions are drawing lines and moving object instances.  Therefore,
      these two functions are made directly available from the mouse
      button 1 (ater a "tap" or a "grab", respectively).  The next most
      common function is selection of elements singly or in groups.
      Button 2 can be used to select an item if tapped, and if pressed
      and held down, a box will be drawn and everything inside that box
      selected when the button is released.  All other commands are 
      available from the pulldown menus and/or from the keyboard as
      single-key macros.  Keyboard macros are quicker, since they act
      on the present cursor position, whereas menu commands require an
      extra step.
      
      The libraries are intended to provide a convenient way to store and
      retrieve elements of a picture which will be used more than once.
      For the application of circuit drawing, a built-in library provides
      basic objects such as transistors, amplifiers, resistors, capacitors,
      arrows, circles, power and ground symbols, and the like.  This file
      ("builtins.lps") is loaded on startup;  the program first looks in
      the current directory, and then searches in a given global directory
      (something like ~cad/lib/xcircuit/) if it could not find it initially.
      Thus each user can add to or modify the file of builtins to reflect
      personal taste.  Since the PostScript output contains all object
      definitions, these changes to the built-in functions are inherently
      transferrable.  The program checks objects with the same name for
      equivalence of their contents, and changes names as necessary to
      avoid conflicts.

      An additional library, the user library, contains all of the
      objects which are created (using the "make object" command)
      during a session or objects which are loaded from a file but
      do not belong to the built-in library.  The user library can
      be saved by itself and reloaded later either into the user
      library or into the built-in library.  This is the way to
      create a personalized built-in library set.

      The special file "builtins.lps" can be edited to include lines
      such as the following:
	% filename loadlibrary
      The loadlibrary command will automatically include another
      library file.  This method makes it convenient to divide up
      libraries into separate files according to (for instance)
      function (digital, analog, clip art, etc.), and use the
      loadlibrary commands to choose which ones will be loaded
      on startup.  Caveat:  If the order of loading is such that
      an object contains an instance of another object which has
      not yet been loaded, xcircuit will complain.

      By default, libraries have the extension ".lps".  As they
      contain only macros, they cannot be displayed with any
      PostScript interpreter.  The "loadlibrary" command is
      hidden behind a PostScript comment (%) character, and so
      is not recognized by general-purpose PS interpreters.

   2) Xcircuit has an absolute sense of zooming and snap-to grid.  Objects
      scale absolutely;  line widths and text sizes will increase/decrease
      proportionally with the zoom, as well as dot/dash spacing and all
      other features.  Xcircuit does have a minimum integer grid in
      coordinate space, which translates to 0.005 inches at an output scale
      of 1.  The maximum zoom scale gives a screen size translating to
      about 100 by 100 inches at an output scale of 1.  The effective
      scale can be varied by changing the output scale (reached from the
      "File/Write" menu selection) in order to fit a drawing to a page or
      to get a grid matched to a specific dimension.  A separate scale
      parameter changes the scale of the reported position relative to
      the output scale (as it will appear on a printed page).

      The snap-to grid is an all-important feature for circuit drawing,
      wherein it is critical that wires line up properly with one another.
      In xcircuit, there is no way to get off the snap-to grid except by
      turning the snap function off and physically pushing elements off
      the grid.  In any case, objects can always be returned to the snap
      grid with the "snap" function (key 'S').

-----------------------------------------------------------------------------

Using Xcircuit:  See the manpage, "xcircuit.man"

-----------------------------------------------------------------------------

Online tutorial: See
     "http://olympus.ece.jhu.edu/~tim/programs/xcircuit/tutorial.html"

-----------------------------------------------------------------------------

Things to do: See the file "Manifest"
	  
-----------------------------------------------------------------------------