Dec 122017
 
EEDraw is a simple parametric drawing program, specifically designed for EE (Electrical Engineering) type of drawing. The program fully allows new parametric types through library mechanisms, and in fact all the EE types a
File EEDRAW.ZIP from The Programmer’s Corner in
Category Science and Education
EEDraw is a simple parametric drawing program, specifically designed for EE (Electrical Engineering) type of drawing. The program fully allows new parametric types through library mechanisms, and in fact all the EE types a
File Name File Size Zip Size Zip Type
82720-1.EED 6551 1931 deflated
82720-2.EED 5112 1481 deflated
EED-PS.CFG 159 127 deflated
EED-PS.EXE 58506 30996 deflated
EEDEPSON.CFG 159 127 deflated
EEDEPSON.EXE 71022 36555 deflated
EEDRAW.BND 958 558 deflated
EEDRAW.CFG 991 582 deflated
EEDRAW.DOC 25383 9230 deflated
EEDRAW.EXE 146748 71797 deflated
EPROM.LIB 4430 618 deflated
GENERAL.LIB 2474 622 deflated
INTEL.LIB 1723 632 deflated
LINEAR.LIB 1091 440 deflated
RAM.LIB 560 283 deflated
TALKBELL.EED 8965 2537 deflated
TEST-ALL.EED 5747 1795 deflated
TTL1LS.LIB 17075 3395 deflated
TTL2LS.LIB 20044 3011 deflated
TTL3LS.LIB 11027 1578 deflated
TTL4LS.LIB 10374 1514 deflated

Download File EEDRAW.ZIP Here

Contents of the EEDRAW.DOC file


EEDRAW - Electrical Engineering Drawings
----------------------------------------

BECAUSE EEDRAW/EED-PS/EEDEPSON ARE LICENSED FREE OF CHARGE, I PROVIDE
ABSOLUTELY NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING, I GERSHON ELBER PROVIDE EEDRAW/
EED-PS/EEDEPSON PROGRAMS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
YOU. SHOULD THE EEDRAW/EED-PS/EEDEPSON PROGRAMS PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL GERSHON ELBER,
BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES,
OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR A FAILURE
OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY GERSHON ELBER)
THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES,
OR FOR ANY CLAIM BY ANY OTHER PARTY.

1. INTRODUCTION
---------------

EEDraw is a simple parametric drawing program, specifically designed for
EE (Electrical Engineering) type of drawing. The program fully allow new
parametric types, through library mechanisms, and in fact all the EE types
are defined this way. This library mechanism is extremely useful in defining
new types and can be used for other applications other than EE.

The following graphic devices are supported for display: Hercules, VGA, EGA.
The following printing devices are supported (via the printing drivers):
EPSON compatible printers (8 pins), PostScript printers.

Usage: EEDraw [-z] [FileName[.EED]]

Options: [-z] Print version number and usage.

2. INSTALATION
--------------

For correct execution of the main program (EEDraw), the following files must
exist in one of the path directories:

1. EEDraw.exe
2. EEDraw.cfg
3. EEDraw.bnd
4. *.lib

For correct execution of the printer drivers (EED-PS, EED-Epsn), the following
files must exists in one of the path directories (see also Appendix B):

1. EED-PS.exe1. EED-Epsn.exe
2. EED-PS.cfg2. EED-Epsn.cfg
3. *.lib3. *.lib

The library files (*.lib) are the same for the printer drivers and eedraw
itself and should exist probably only once.
See SETUP below shows how to change the setup of this programs.
The default values should be enough to start and learn this program.

3. SETUP
--------

EEDraw set up is done through two files: EEDraw.cfg and EEDraw.bnd.

EEDraw.cfg
----------

This files contain global parameters that should be selected and set only
once, in final installation stage. Empty lines or anything after a semicolon
(';') is ignored. Parameters that can be set are:
1. AutoPan - Boolean flag. If TRUE, any operation involves in the drawing
space (such as move, copy or draw) will auto-pan if cursor exists screen.
If FALSE, Panning option must be used manually to perform this operation.
This Boolean flag can be set from the Status main menu.
For example:
AutoPanTRUE
2. ATKeyboard - Boolean flag. If TRUE, it is assumed AT style keyboard bios
calls (also known as Enhanced keyboard - if you have F11/F12 on your
keyboard, good chance you can set this to TRUE). This will enable using
more complex scan codes, not supported by regular keyboard (such as
F11/F12). Note however it may HANG your system if it is not so.
For example:
ATKeyboardFALSE
3. HVLines - Boolean flag. If TRUE, lines are coerced to be vertical/horizontal
only. This Boolean flag can be set from the Status main menu.
For example
HVLinesTRUE
4. SnapDistance- Integer value. Sets the distance in drawing space of points
to be snapped. You probably do not want to change this, especially not in
the middle of a drawing. This Integer value can be set from Status main
menu.
For example:
SnapDistance16
5. Mouse - Boolean flag. Inform the system if a Mouse exists or not.
If this is commented out, auto detection will be used.
For example:
MouseTRUE
6. GraphDriver - Set what type of display device to use. The following values
are valid (same as TC 2.0 graphics.h file if that helps):
0 - Auto detect (default, so you can delete this one...)
3 - EGA
4 - EGA64
5 - EGAMONO
7 - Hercules.
9 - VGA
For example:
GraphDriver0
7. Libraries - String value. A list of libraries (neither file type, nor full
path is required - only the name) to automatically load on restart,
separated with commas (','). Libraries can also be loaded using the libs
main menu, and/or will be automatically loaded when a data files needs them.
For example:
Libraries"TTL4LS,EPROM,GENERAL,LINEAR"


If this configuration file is not found in any of the path directories,
a message is printed to the screen, and internal defaults will be used
instead. This is NOT recommended - fix that as soon as you can, as the
internal defaults are not guaranteed to be anything specific.

EEDraw.bnd
----------

This file allow you to bind any of the program internal functions (as can be
selected from any of the menus) to a specific key. Note some keys are
hard-bound and can not be used to rebind function (such as arrow keys - see
Functionality below). The format of the file is following.
Empty lines, or lines begin with a semicolon (';') are ignored.
Every line consists of three items: "FunctionName KeyName ScanCode"
seperated by white spaces. FunctionName are the fixed names this program
supports (see blow). KeyName is the name of the key ("AltK" for example) this
FunctionName will be bound to. Up to 4 characters are allowed for KeyName, and
this name will appear in the main menu which contains this function. ScanCode
is the scan code of the bounded key. If the key is regular ascii code, this
ascii code is the scan code. If it is extended code (such as F? keys are), add
256 to this value. All numbers should be in decimal.
Currently available FunctionName(s) and their associated main menu (see
Functionality section below for their description):

File menu:
LoadEEDFile
SaveEEDFile
SaveEEDAsOld
SaveEEDAsNew
ClearAll
Directory
ChangeDir
ShellToDos
ExitEEdraw

Display menu:
Panning
ZoomOut
ZoomIn
ZoomReset
RedrawAll

Libs menu:
LoadLibrary
FreeLibrary
ViewLibrary
DirLibrary

Draw menu:
DrawLine
DrawBus
DrawConnect
DrawText
DrawLibItem

Modify menu:
ModifyMove
ModifyCopy
EditLibItem
ModifyDelete
ModifyUnDel

Status menu:
MemoryStatus
SetDrawText
SetHVLines
SetSnapFactor
SetZoomFactor
SetAutoPan

Other (not in any menu):
SameAgain

4. Functionality
----------------

This section describes the currently available function set, and main modes.
Although most of the keys can be bind to any function as described in the
Setup section (EEDraw.bnd description), some of them are hard-bound and could
not be used:
A. All the numeric keypad (arrow keys, home, PhUp, End, PgDn). These keys
are used to move to cursor (even if mouse exists).
B. All the numeric keys but 0 (used by shift-arrows).
C. Enter (or Return) key. this is the SELECT key.
D. Space bar. This is the ABORT key.

The arrow keys are used to move the cursor (co-exist with mouse), and if
shifted, move cursor faster. In addition to the cursor movement, two
important keys are defined as well:
A. SELECT key, hard-bound to the Enter (or Return), and left button on mouse,
if such exists.
B. ABORT key, hard-bound to the Space bar, and right button on mouse if such
exists.

All the functions described below uses these hard-bound keys.

Few type of interactors are defined to query the user:
A. Yes/No question - prompt the question, with Yes and No buttons. The SELECT
key will select the answer. ABORT key is ignored.
B. Continue question - prompt a message, and wait for SELECT on the continue
button. ABORT key is ignored.
C. String question - prompt a message, and waits for string input. This
facilitates a full line editor as follows (independent of key bindings):
* Right and Left arrows will move right and left.
* Insert toggles Insert/Overwrite modes (toggles cursor shape).
* Delete deletes current character.
* Backspace deletes character to the back.
* Home and End will move to beginning/end of string respectively.
* Esc clears the current string.
* Return will terminate editing.
D. List question - prompt with a list of items (files names for example).
An item will be picked by the SELECT key if applicative (when viewing
a directory nothing needs to be picked). ABORT key will usually abort
the operation, but may have some special operation as well or may be
ignored.
E. Menu(s) question. Two types of menus are used - top down from the main menu,
and pop up on special occasions. Menus behave very much like List questions.
SELECT key selects menu item while ABORT key usually abort the menu with no
selection at all.

A. File menu:
LoadEEDFile - Prompt for a file name (List question), and read it
from the current directory, if SELECT key, abort if ABORT key.
Note file type must be '.eed'.
SaveEEDFile - Save currently edited file. This routine can be used
only after a new file was saved at list once, or it was loaded.
In both cases, it will be saved on the same name, after
renaming old one to have '.bak' extension.
Ask for verification (Yes/No question).
SaveEEDAsOld - Same as SaveEEDFile, but prompt with list of all '.eed'
files in current directory, and saved by the name selected if
SELECT key, or abort if ABORT key.
SaveEEDAsNew - Same as SaveEEDFile, but prompt for a new file using
String question.
ClearAll - Clear all current data. Note libraries are not freed -
use FreeLibrary to do that.
Ask for verification (Yes/No question).
Directory - Display content of current directory as in List question.
SELECT key is ignored. Use ABORT key to exit this mode.
Unlike LoadEEDFile, all files are displayed.
ChangeDir - Prompt with String question for a new directory. Old
directory is provided to begin with.
ShellToDos - "Fork" (I wish this was true...) to the DOS O.S. . Type
'exit' at the DOS prompt to return to EEDraw.
ExitEEdraw - Exit the Program.
Ask for verification (Yes/No question).


Display menu:
Panning - Allows panning in the drawing space. Prompt for two points:
reference point and translated point and move such that the
reference point is at the translated point. This can be used
for fine panning even when AutoPan (see SETUP, EEDraw.cfg file)
is enabled. Use SELECT to pick the points, ABORT to abort this
mode.
ZoomOut - Zoo out (center of screen remains at center) by factor of 2.
Note that if you zoom out from regular zoom factor, text will
disappear as it can not be shrinked. You can enable text from
the Status menu manually.
ZoomIn - Zoo in (center of screen remains at center) by factor of 2.
ZoomReset - Reset Zoom value to the regular zoom factor and center the
Drawing space.
RedrawAll - Redraw all screen.

Libs menu:
LoadLibrary - Prompt for a file name (List question), and read it
from the current directory, if SELECT key, abort if ABORT key.
Note file type must be '.lib'.
FreeLibrary - Prompt with all loaded libraries with List question,
and free the selected one if SELECT key, abort if ABORT.
ViewLibrary - Prompt with all loaded libraries with List question,
If a library has been selected via SELECT key, prompt with
all parts defined in this library again with a List question.
Selection of a part with SELECT key will display it. ABORT will
go back to library List question, which can be aborted again
via the ABORT key.
DirLibrary - Display content of current directory library files
(those with '.lib' extension) as in List question.
both SELECT key and ABORT key can be used to exit this mode.

Draw menu:
DrawLine - Enter drawing mode. If HVLines is set (see SETUP, EEDraw.cfg
section), only horizontal/vertical lines are allowed.
In this mode, pressing SELECT key will insert a new point
in the created polyline and pressing ABORT will delete the
last entered point.
If however, there are no points at all in the current polyline,
ABORT key will abort this mode.
Also, pressing SELECT twice (at the SAME place as the last
point entered) will complete the drawn polyline.
DrawBus - Same as DrawLine, but draw thicker lines.
DrawConnect - Draw a connection junction, if SELECT key is pressed,
or abort if ABORT key is pressed.
DrawText - Prompt for a string with String question, and then position
the text horizontally or vertically. If the positioning is
terminated with ABORT it is ignored, SELECT will update.
DrawLibItem - Prompt for a part name with String question. If this is
not the first invocation to this mode, last part will be
used as default string (remember you can always use Esc to
clear to a fresh line). If part is found (name is exactly the
same asshown in the ViewLibrary function above), a pop up
menu will allow to rotate it 90 degree CW or CCW or mirror it.
Successive SELECT will transform the library item to the
desired orientation, while ABORT will abort this DrawLibItem
mode. SELECT PlaceIt (top menu entry) will allow to position
the part in the exact place.
The user is also prompt for Chip (i.e. 74LS00) and Part (IC7)
names if they are required/allowed (see Appendix on library
file definition) for this part. These are positioned similar
to the way DrawText position its text, except that Chip name
is already known and can not be modified.

Modify menu:
This menu is heavily based on Picking objects. a single object is
picked if the cursor is on an object. The cursor is considered on an
object if one of the following:
A. Line and Bus items: the cursor is on one of the Line/Bus end points
(any point that was set by SELECT when it was created, including
internal points).
B. Connect item: the cursor is on the Connect center.
C. Text item: the cursor is inside the smallest axes parallel bounding
box holding this text.
D. Library item: the cursor is on any polyline end point (including
internal points).

The picked object will blink. SELECT key will select it, ABORT key
will cause the next object, if such exists at this position, to blink
until one is selected via the SELECT key, or no more objects can be
picked.

If no object at all is found at the cursor point, the point is used
as first corner of a box to pick a set of objects - a second SELECT
key will pick the second corner of the box, ABORT key will abort this
mode. All objects intersect with the defined box, will be considered
picked, with no more verification.

ModifyMove - Pick object(s), and move it(them) to a new position.
Once the object(s) is(are) picked, SELECT key will set
its(their) newposition, ABORT will leave it unchanged.
ModifyCopy - Pick object(s), and copy it(them) to a new position.
Once the object(s) is(are) picked, SELECT key will place
it(them) in new position, ABORT will abort the copy operation.
EditLibItem - if the picked object(s) is a single library item, allows
editing one of the following (via a pop up menu):
A. Reposition Chip name (if this chip is allowed to have one).
B. Reposition Part name (if this chip is allowed to have one).
C. Modify the Part name (if this chip is allowed to have one).
Picking one of the above via SELECT will allow text
positioning or text editing (via String question). ABORT will
abort this EditLibItem mode.
ModifyDelete - Delete the picked object(s). The deleted object(s) is
(are) saved in a special 10 places deep stack, and deleted
items can be undeleted using the ModifyUnDel function.
Each of the 10 placed stack can hold any result of a pick
no matter how many objects are inside.

This Delete/Undelete mechanism can be used to cut and paste
even between different files - this stack is never cleared.
ModifyUnDel - Undelete the last delete operation (see ModifyDelete),
from the delete stack (LIFO).


Status menu:
MemoryStatus - prompt with a continue question, on the current free
memory. Getting close to zero is unsafe!
SetDrawText - By default if zooming out from the default zoom value,
no text is displayed (the text should be shrinked but is
probably unreadable in this raster system). You can toggle
viewing text in this zoom out state using this flag.
Uses Yes/No question.
SetHVLines - Allow drawing of diagonal lines as well if set to FALSE.
Uses Yes/No question.
SetSnapFactor - Set the invisible grid the cursor position is
snapped to. You probably do not want to change this,
especially not in the middle of file editing.
Uses String question, and display current Snap factor to
begin with.
GetZoomFactor - Allow you to see the current zoom factor
SetAutoPan - allow to set the AutoPan variable - If TRUE moving the
cursor out of the screen boundaries during drawing
(such as move, copy or draw) will auto-pan.

Other (not in any menu):
SameAgain - Execute the last function again.
If you have a mouse with 3 buttons, pressing middle button
will execute this command (hard-bound).
if you have a mouse with 2 buttons, pressing both buttons
will execute this command (hard-bound).

5. Spacial Notes
----------------

Designing using A4 page size does not require much memory even when few
libraries are loaded. My system with 640k (-70k of the O.S) has almost 300k
free to use (Use the MemoryStatus function to query free memory), when all the
provided libraries are loaded. I guess you will need to work hard to get down
to less than 100k. If you succeed and/or you system has less than 640k memory,
make yourself a rule: never to go below 64k of free memory. The program need
about 32k of temporary memory for the different operations, and getting close
to that is dangerous! When you approach 32k of free memory, you will be
issued a warning (Continue question):

Free memory too small - dangerous to continue.

Every 30 second (if you do any operation in that time). Continuing at this
point may result with loss of all your work - the program will exit when no
more memory will be available!

Yes, I know this is ugly, but you eat what you cook, right? I used this
program quite a bit, and never succeeded to go below 200k, so why bather.


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


Appendix A. Glossary
--------------------

SELECT Key - The key used for the select operation. Currently hard-bound to
Enter (or Return), and to the Left mouse button if mouse exists.

ABORT Key - The key used for the abort operation. Currently hard-bound to
Space bar, and to the Right mouse button if mouse exists.

Screen Space - the space of the display device. Depends on the graphic
device coordinates on the selected mode.

Drawing Space - the space in which the drawing objects exist. This space
is bounded by a wide box (zoom out twice to see this box on an
empty drawing) so it will fit into an A4 (8.5" by 11") page in both
the EPSON and the PostScript printer drivers (see Appendix B).


Appendix B. Printer drivers
---------------------------

The following printer drivers are available (see also installation section):

1. EPSON printer.

Usage: EEDEpson [-g] [-r] [-1] [-2] [-3] [-d] [-z] FileName[.EED]

Options: [-g] Output goes to standard output as 1 bit per pixel (B&W)
GIF file.
[-r] Output goes to standard output as raw data.
[-1], [-2], [-3] Output goes to LPT1:, LPT2:, LPT3:
respectively.
[-d] if Output goes to Epson printer - print in double the
density.
[-z] Print version number and usage.

* if neither [-g], not [-r] are specified, output is in Epson
compatible format (default).
* If non of [-1], [-2], [-3] are specified, output goes to
standard output.
* [-1], [-2], [-3], [-d] are ignored if [-g] or [-r] are
specified.

2. PostScript Printer.

Usage: EED-PS [-z] FileName[.EED]

Options: [-z] Print version number and usage.


Appendix C. Library file format
-------------------------------

This appendix describes the format of the library file. It contains
all the information required to create your own libraries. The libraries are
designed to be parametric only. I.e. no bitmaps are supported. You can look
at the given libraries while reading this appendix for better understanding.

Empty lines and lines starts with '#' are ignored. In order to identify
a library as such the first line must start with 'EEDRAW-LIB'. Following in
the same line is version number as 'Version X.X'. Currently 'X.X' equal '1.0'
and is ignored. However it may be used in future versions, to ensure backward
compatibility. Following are the parts themselves. Each part definition begins
as follows:

DEF Name Prefix #Pins TextInside DrawNum #Units #PinsPerUnit

Were1. Name is the Part name, i.e. "74LS00". If Name is prefixed with "~"
(for example "~74LS00") then the name is not drawn, nor it will be
accessible to the user.
2. Prefix is the prefix to be used in chip name (IC, R, C etc.). If
prefix is "~", then no prefix is drawn.
3. #Pins is the same as number of entries in PINS (see below),
i.e 14 for 74LS00.
4. TextInside is 0 if pin text is to be put outside as well (as the
pin numbers are), otherwise inside. You may put any positive
integer there to scale the distance inside. 10 is a good start.
5. DrawNum is 1 if pin numbers are to be drawn, 0 otherwise.
6. #Units holds number of multiple entries. For example 74LS00 has
4 units (Nand gates). For no multiple units put 0 here.
7. #PinsPerUnit holds number of entries for one unit if more than
one unit per part. If #Units is 0, it is ignored.

The part definition follows by the following blocks, in any order:


1. DRAW/ENDDRAW - defines how to draw the part. This block is optional, and
a simple box with half the pins on each side is drawn if this block is
not defined. The following commands are supported:
A x y r t1 t2(Define ARC at x, y, radius r, angles t1 to t2)
P n x y x y x y... [F](Define a POLYLINE of (any) length n)
C x y r(Define a CIRCLE at x, y, radius r)
S x1 y1 x2 y2(Define a square (Not filled))
T x y h str(Define a text string at x, y (see below))
L x1 y1 x2 y2 [I](Define terminal line to part - see PINS)

Notes:
A. a text string (S) with be drawn horizontally if h is 1, vertically if 0.
Also '~' characters will be replaced by spaces, or this provides a
mechanism to have spaces in the string.
B. If the polyline (P) is postfixed by a F, the polyline should define a
closed shape that will be filled. The first point of the polyline must
be identical to last one in this case.
C. If the line (L) is postfixed by an I, this line is assumed to define
negative logic, and a small circle will be drawn to express that.
D. The number of L definitions should be exactly the same as #Pins in the
DEFS line if #Units = 0, and equal #PinsPerUnit if #Units != 0.
The order will match to the order in the PINS/ENDPINS block if #Units = 0
and to the order in the MULTI/ENDMULTI if #Units != 0.
E. Arcs (A) should not exceed 180 degrees, are CCW, and 0 degrees is at
3 o'clock.

2. PINS/ENDPINS - defines the names (strings) associated with each pin. This
block must always exists, and it is the minimum required to define a part.
The block holds #Pins lines each hold the string defines that pin. This
order must be the same as define in the DRAW/ENDDRAW as L commands
(if DRAW/ENDDRAW block is defined), from pin 1 to #Pins. Empty lines
are allowed and defined with only '~' in them. Not sign for X (vertical bar
above it) is defined by ~X.

3. MULTI/ENDMULTI - This block must exists iff #Unit != 0. Each line in this
provides a mapping from L terminal definitions in the DRAW/ENDDRAW block
to the pin numbers in a multi unit part. This is required as same L
terminal will have different pin number in different Units.
Each line in this block holds the pin numbers of a unit.
Number of lines should be equal to number units in part.

Part definition terminates with the ENDDEF line.

General Notes:

1. All parts are scaled up to easy the access of a single pin (by 16, but you
should not wonder about it too much - its internal mapping to drawing
space).
2. Library file can hold any number of parts (at list one though...).
3. Library file must have '.lib' extension, to be usable by the EED* programs.


Gershon Elber
Email: [email protected]


 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)