Snapping to grid in two dimensions
-
I'm developing a tool where I'm locating a point that's offset in two directions from a starting point. I started with the example line tool, and things are working pretty well, but the snapping isn't what I would like. It snaps to the nearest 1/8", but in the 'diagonal' distance from the starting point. The x,y values I snap to are thus not multiples of 1/8". The built-in rectangle tool behaves like I want my tool to behave: it snaps to the grid in two dimensions. Does anyone know the trick for this? CB.
-
Sorry about bumping my own thread, but I'd really like to solve this one. The built-in rectangle tool does exactly what I want. You can see it by watching the VCB. Even though you are at a diagonal distance from the the first point, it snaps to even numbers in the cartesian directions.
I started with the line tool sample, but I modifed the VCB code to display the x and y offset values rather than the striaght-line length. But they are always some odd value with a ~. CB.
Advertisement