[PythonCAD] Greetings and questions about patches!

Art Haas ahaas at airmail.net
Fri Oct 14 15:15:38 CEST 2005

On Thu, Oct 13, 2005 at 10:35:31AM -0400, Stuart Brorson wrote:
> Hello PythonCADsters --
> I downloaded PythonCAD (release 25) a couple of days ago and have been
> playing with it since then.  I have been looking for a good 2D
> drafting package for a while, and PythonCAD seems to fit the bill!
> Great work!  I have previously checked out QCad, and have rejected it
> for a couple of reasons.  I have also checked out BRL-CAD, but it
> really isn't suited to producing mechanical drawings.  
> While playing with it I discovered a couple of user interface things I
> would like to change -- hopefully for the better!  I will be happy to
> produce and submit patches to Art should he be interested.  Here is
> what I propose:

I'm definitely interested!

> *  I would like to implement a "keyboard in left hand, mouse in right
> hand" style of driving PythonCAD.  Once you have experienced this
> style of driving a CAD program you realize that it makes using the
> program a real breeze.  I frequently use (and develop for)
> gEDA/gschem (the GPL'ed electronic CAD suite), and one thing which
> gschem does very well is allow for this two-handed style of driving.
> I believe strongly that PythonCAD will benefit from this addition.
> Implementing this style of driving means that all menu items need
> to have keyboard menomics.  Note that the GTK project distinguishes
> between keyboard "accelerators" and keyboard "menomics".  Accelerators
> are the one key shortcuts like <ctrl>c for copy.  Menomics are (often)
> multi key ways to activate menu items, such as <alt>dbs for the menu
> item "Draw -> Basic -> segment".  They are the underlined letters you
> see in the menu items.
> I have already implemented menomics for about 1/2 of the menu items,
> and I can be done with this work in a few days.  I hope you are
> interested in this patch!  Again, I highly recommend this style of
> driving a complex program!

Having keyboard shortcuts for accessing things could definitely be
handy, especially for people familiar with other CAD packages that
offered this sort of use. I suspect that adding the mnemonics is
mostly a matter of adding underscore characters to the appropriate
argument in the gtk.Action instances, but there could be more to do.
> *  I would like to add an "escape key" functionality to each action.
> Currently, there is no way to leave a particular drawing mode and
> return to an "idle state".  That is, when I am finished drawing a
> two-point line segment, then PythonCAD goes into a mode where it waits
> for the first point of my next line segmenet.  I would prefer if I
> could hit <escape> and have the program go into an "idle" mode where
> it wasn't waiting while in a particular tool mode.  (That is, the
> tool.reset() fcn would be called when the user hit <escape>.)  I
> believe this is the more intuitive behavior than the present one.
> I have started looking at the code, and belive I can make this happen
> (i.e. mod the code and submit patches) in a few days also.  Assuming
> you agree that this would be a useful change!  

Pressing 'Esc' should do what you propose now. It is a bug if doing so
does not return PythonCAD to the 'Enter Command' mode. I'll take a peek
at this and see if things are or are not working properly.
> *  Finally, I would like to create a new top-level menu item,
> something like "settings" which would hold actions like "zoom",
> "preferences" and so on.  Right now, "zoom" is buried underneath
> "modify", which doesn't make sense to me, since I think that modify
> should only apply to the object being drawn.
I'd put the 'Zoom' menus under the 'Modify' menu because I was thinking
that zoom operations "modify" the view of the drawing. The "preferences"
menu is in 'Edit' because that is where many programs keep such a
choice, though it could also be in an 'Options' menu a-la Firefox.

> I propose these changes because I believe they will make PythonCAD
> better.  I do want to gauge how open you are to patches, however,
> before I finish the work.  Any comments?

I think your ideas all sound great, and I'm open to nearly anything that
makes PythonCAD a better program.

Art Haas
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822

More information about the PythonCAD mailing list