And on a related subject, here's a way to OSNAP to any FRACTIONAL distance
between two points (e.g. in the example usage below, 3/5 of the way from one
point to another), in Pop & Screen Menu format but you could probably make
it work other ways.
To get to it, in A2K (probably similar in other releases), add this (and,
while you're at it, the MidOf2 one in my previous post) into the ***POP0
menu section's **SNAP area:
ID_OsnapFrac [Fractional]$S=FRACSNAP
Or add this anywhere else (e.g. in a Tablet Menu Osnap area):
$S=FRACSNAP
(or in some other Pop-down Menu):
[FracSnap]$S=FRACSNAP
Put these lines anywhere else in the Menu file's ***SCREEN area:
**FRACSNAP 3 [but change the 3 here for how far down the Screen it should
start, as appropriate to your Screen Menu setup]
[Fraction]
[of a]
[distance]
[snap:]
[SET I/J]^C^P(setq I (getint "Enter Numerator I: ")) \(setq J (getint "Enter
Denominator J: ")) \^P
[USE I/J]^P(polar (setq A (getpoint "1st POINT: ")) (angle A (setq B
(getpoint "2nd POINT: "))) (/ (* (distance A B) I) J)) $S= ^P
When you want to use it, you invoke it from wherever, and the Screen Menu
will show this:
Fraction
of a
distance
snap:
SET I/J
USE I/J
Pick "SET I/J" to set the ratio you want (e.g. answer "3" to the first
prompt and "5" to the second), then within any command looking for a
location, pick "USE I/J", select two locations (you can use Osnap to do so),
and it will return the location that is (in the sample case) 3/5 of the way
from the first to the second. It will remember the fraction as long as
you're in the same editing session in the same drawing, so you can use the
"USE I/J" repeatedly without picking "SET I/J" each time. You can even pick
"SET I/J" within a command, and it will set the ratio for you while the
command waits.
You can have running Osnap on when you select the first Point, but it's a
good idea to turn it off (F3) before you pick the second (then invoke the
Osnap mode you want explicitly for that point, if you need to), unless the
resultant point will be clear of Osnap-able entities. It calculates the
fractional-distance point immediately after you pick the second point, so if
running Osnap is on, it will use it if it can. (I keep meaning to put
"None" in here or something, to fix that, but haven't gotten around to
figuring out just where to put it, etc. Maybe if I used it a lot more often
than I do, I'd have the incentive....)
This requires the numerator and denominator to be integers, but you could
probably change the "getint"s to "getreal"s and then you could, say, snap to
a point that's pi 137ths of the way from one place to another (not that I
can imagine why anyone would WANT to, but anyway....).
Kent Cooper, AIA