[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Snap-to-pins, was: Stupid newbie question



On Fri, May 21, 2004 at 04:16:02PM -0400, Chad Robinson wrote:
> Dave McGuire wrote:
> >On May 21, 2004, at 3:47 PM, DJ Delorie wrote:
> >
> >>One idea is to have the shift or ctrl keys temporarily toggle "snap to
> >>pin" mode.  Draw nets as usual, but just before you select the final
> >>pin, press and hold the shift key to go to snap to pin mode, select
> >>the final pin, then release the shift key to revert to grid (or no
> >>grid) mode.
> >
> >
> >  This is an interesting idea.  I seem to remember some general drawing 
> >package years ago (Micrografx Designer, maybe?) which, when drawing a 
> >line, would force it to perfectly vertical or horizontal if you dragged 
> >the second endpoint while holding down one of the modifier keys.  This 
> >seemed very streamlined and supported the "one hand on the keyboard, the 
> >other on the mouse" way of doing things.
> 
> Well, gschem already uses CTRL to control ortho line drawing, so I suppose 
> it would be a matter of figuring out how it works and using that. I see the 
> TOPLEVEL structure contains CONTROLKEY and SHIFTKEY indicators, so I could 
> wrap this in an if() check on the SHIFT key. I see right where to do this, 
> I think. The real questions are:
> 
> 1. Can anybody can help me figure out how to iterate across the available 
> pins to find one to snap to.
> 
> 2. Should I add a utility function like snap_grid() so other developers 
> could do pin-snaps in the future? Not sure why you would, but it could be 
> done that way. Or should I just add it to o_net and keep it simple?
> 
> Maybe we should take this discussion off list?

or maybe move to geda-dev (the developer list).

So here's a feature which is very much related to this that I find extremely
nice in a large unnamed, very high $$ commercial schematic capture tool.

When you're in wire mode, i.e. placing wires in the schematic, there is 
a little diamond which hilights the closest pin or wire segment (of a different
net) to where the pointer is.  If you hit a certain hotkey, the wire
will be completed to the hilighted point.  I find that I can wire up schematics
extremely quickly as I can be totally sloppy with my mouse movements and just
keep hitting the snap-to hot key.  If I could figure how to do a screen capture
to mpeg movie I'd do it to fully illustrate how it works.  Hopefully I've 
adequately described it in words.

-Dan

--