Hi,
quite often it happens to place components off grid. The common case is
when you have several IC with different pin pitches.
One issue I have is to place vias on tracks off grid.
Simple example:
1. place a component with pins off grid
2. route tracks (say horizontally) from those pins straight out (i.e.
you will have parallel tracks spaced by the IC pitch)
3. now you want to connect a wire (vertically) to one of the tracks,
using a via
Best case: the vertical track is on grid. So only the Y position of the
via is off grid.
Worst case: also the vertical track is off grid. Both X and Y
coordinates of the via will be off grid.
The only way I found is:
1. start routing from the off grid track (in the worst case it doesn't
matter which of course), in this example I assume the horizontal one
2. set the wire bend settings to the right corner
3. change layer so the via is placed automatically
4. connect to the other track
5. with the info tool copy the X coordinate of the vertical track
6. close the info tool, and open it again on the via
7. past the value to the X coordinate
Now you have the via properly aligned with the vertical track.
It takes a long time if you have to route dozens of tracks!
And if both tracks are off grid you have to repeat the process twice, or
at least you have to move around them to go on grid.
I never wrote an ulp so before start learning I would ask if it is
possible to do the following.
I'm thinking about an alignment aid. The flow would be this:
1. route the new track regardless the grid
2. right click on each end and select "align to"
3. specify the reference (if it's a track the correct axis is inferred
automatically - the one that doesn't change, it it's an object or a via
it could ask for X or Y)