QSCad started as an academic exercise to see if TCL/Tk was up to the job of a real application, At the time I wanted to replace PadsPCB as there was no Linux version of it. I looked at packages such as gEDA but found that they were took up large amounts of disk space, and depended on libaries that had to be installed independantly. At the time, gEDA could not even rubber band connections when parts were moved.
Over a week during one Christmas holiday I coded up the demonstration as released here.
The purpose of this project is to provide a repository for the source code as it stands and to see if there is enough interest in the application to develop it futher.
The software provides the basic editing for decals, schematic diagrams, flow charts, part editing, and PCB layout.
You can see some screen shots here.
It is not designed for production environments. It should suffice for the hobbiest.
Source is available as well as binaries with TCL built into an executable that automatically runs QSCad. There have been made with FreeWrap and are available for Windows and Linux for people that do not have TCL installed. The scripts have been designed for TCL 8.0 but will run under all recent versions up to 8.4.
The project has been cancelled. This is due to the following reasons:
See the FAQ for a state of the features implelemtented.
Runs on all platforms where TCL is supported.
Tcl version 8.0 to 8.4.
Package Tk required for the GUI.
Only printing code is OS specific.
Less than 5000 source lines.
Approximately 150K source size.
Multiple gates per part.
Alternate decals per gate.
Design rule checking.
Gerber file output.
Drill file output.
When this application was written , my understanding of TCL was at a novice level. As a seasoned programmer I could grasp most of the tenents of the language but looking at the code now there are some places where different constructs would result in speed improvements. See the original design guide for implementation details.
TCL/TK was highly suited to this application, due to the high level of functionality provided by the canvas widget Tcl's associative arrays and lists was well suited to the storage of information needed to maintain a drawing.
What makes the whole project freasable is the canvas's ability to attach data to each object. This means that the object on the screen hold all the data needed for the schematic and PCB editors to work. Also the use of floating point numbers for the object coorinates means that the canvas can be scaled on screen without having to use a backup array to hold the real world coordinate values.
The handling of Tags. The canvas is limited when it comes to searching with complex tag criteria. Also tags cannot always be used for group operations (such as changing the width of all lines an a part) as the canvas functions will throw an error in an attribute is not supported for a specific item included in a group. This means that all canvas items must be processed infividually with checking which is grossly inefficent.
One of the holes in TK is the integration with the OS when it comes to printing. If you don't have a postscript compatible printer then printing under Windows is cumbersome to say the least.
I would rate TK's capability as 80%. Unfortunately the extra 20% comes at considerable effort. The inability to handle fractional point sizes requires some work if scaling of fonts is desired.
A 5% improvement in code size could be made in recoding some routines an removing the use of return. Another 5% improvement in code speed could be made by using tk8.3 ability to take coordinates as a list.
Under TCL 8.3 canvas items can take the coordinates as a list. This would reduce the use of eval considerably.
Change some of the base routines to use associative arrays rather than lists. Restructure the code to dealing with lists to return values that the application wants to reduce the number of conversions.
Remove the use of Return statements and use the value of the last operand which in most cases is the same as the return value.
Change the use of Scan to ForEach syntax as it is significantly faster.
Create Application Fonts using TK's font command and use these as the font name in canvas items. This would allow scaling to be done in a reasonably efficient way.
Look at changing the base tag handling. See if a better coding can be found that suits the limited tag handling ability.