pcb-rnd knowledge pool
On-point: indicate when crosshair is on object points
onpoint by Robert Drehmel on 2015-10-14 | Tags: announcement, ui, gui, cursor, end |
Abstract: Objects are highlighted (recolored) when crosshair is 'on point', e.g. on end-point of a line. This makes it easier to draw precisely connected lines.
This feature is disabled by default; it can be enabled using the conf node editor/highlight_on_point.
Robert Drehmel writes:
When (e.g.) routing 5mm power traces on a small grid, it's not always easy to hit the point where the trace ended (which is the center of the semicircle at the end of the line) to start the next line. If you have selected the line tool, finding the end of the line can become guesswork as the cursor doesn't change shape like it does with the select tool.
I want my traces to consist of lines and arcs that are perfectly connected and I want to work as fast as possible.
Attached is a small patch that
- makes it possible to deactivate snapping to "some sensible point along a line". (that's what a comment in the code says). This snapping algorithm gets in the way sometimes so you have to slowly go over a line to find out where it really ends, bouncing back and forth between the points of the small grid, the end of the line and these "sensible points", which is wasting time. The command is "Display(ToggleSnapOffGridLine)". It is still activated by default to avoid violating POLA.
- more importantly, introduces a new command called "Display(ToggleHighlightOnPoint)" that highlights all lines and arcs which have (end)points exactly on the position where the cross hair is currently snapped to. It therefore helps finding the end points of lines and arcs, but sometimes also shows redundant traces, traces that aren't perfectly connected to each other, traces that don't end directly on the center of a via but should, etc. It works with thin draw too and I tested it with gtk and lesstif.
I use the second option mostly in conjunction with deactivating the first. Both commands
have been added to the menu
by means of (g)pcb-menu.res.in
and are available as command
line options as well.
Caveats:
- The HID API expects all HIDs to make a copy of the color string when setting a color.
- The function that lightens up a color could be improved.
- I used it for a while, but after porting it from my local fork, it probably needs more testing.