Thanks for your kind words. I looked at the commit and see you've actually improved what I provided. Good stuff.
As to the point filters, I copied SnapMiddleManual.js and modified it to take the x coord from one point and the y coord from another, and return a new point. The way the preview works it may appear to restrict movement in the x and y direction, but the actual aim of the point filter is to construct a new point from the coordinates of two points. It doesn't actually restrict anything. I merely restrict the preview to the x or y coordinate while waiting for the user to enter a second point to complete the command.
'Restrict X' and 'Restrict Y' don't actually describe what's happening. The user is actually constructing a new point using the x coord from one point and the y coordinate from a second point and returning that new point. (DotY takes the y coordinate from the first point and x coordinate from the second point.)
So, because we're constucting a point, I felt that snap wasn't quite the right menu as we're not snapping or restricting anything. After some thought I decided the edit menu was the closest match to the action. (Although it's not quite right.)
I should explain that my background is Autocad, where I first came across these commands. (Autocad actually has six point filters:- .x, .y, .z, .xy, .xz and .yz).
These point filters do not appear in any of Autocad's menus, probably because they are only meant to be used inside another command (mainly drawing commands). They are not actual commands in themselves. I only added them to the edit menu so that you can type .x or .y in drawing mode, instead of just in command line mode. They should not really be in any menu. Perhaps you could create a hidden menu that could contain all such commands, but still allow the shortcuts to be used in drawing mode.
Restrict Angle. Instead of restricting the angle I have been thinking about a 'snap to nearest multiple of a given angle' for the Line2P command (with the default being 15 degrees). So it would snap to 0, 15, 30, 45........345 degrees. (360 would be set back to 0). To allow the user to change the angle I would have a spin box in the options toolbar. If I went for global 'snap to nearest multiple' where would the spin box go? It could go in the options toolbar, but snap middle used to put a spin box in the options toolbar, but no longer. Is there a reason not to use the options toolbar?
This option would obviously go in the snap menu.
Restrict Distance. I can't quite imagine exactly what you mean. Perhaps you could expand on the idea. There is already a snap to distance isn't there? Do you mean snap to a distance between two selected points? (SnapDistanceManual?)
Last edited by riverbuoy
on Sun Oct 06, 2013 3:06 pm, edited 2 times in total.