Modified point returned by grread with Polar tracking setting.

Modified point returned by grread with Polar tracking setting.

mdhutchinson
Advisor Advisor
224 Views
0 Replies
Message 1 of 1

Modified point returned by grread with Polar tracking setting.

mdhutchinson
Advisor
Advisor
The program in which the below function is used is quite large and I am afraid would only confuse my question if I posted the whole program.

The below code works to return the desired point if the user has orthomode on... but if the user chooses to use Polar tracking instead it does not.
How might I alter this to use polar tracking also?... or is this not possible?

[code]
(defun OrthoGrread (/ pnt lastpnt)
(setq pnt (cadr (grread t 4 1)) ; get the user's cursor point
lastpnt (getvar "lastpoint")
)
(if (= (getvar 'orthomode) 1) ; If orthomode is on, Then...
(if (apply '> (mapcar 'abs (mapcar '(lambda (a b) (- a b)) pnt lastpnt))) ; check if Y coord is greater, Then ...
(list (car pnt) (cadr lastpnt) 0.0) ; keep X, constrain Y to lastpnt, else
(list (car lastpnt) (cadr pnt) 0.0) ; keep Y, constrain X to lastpnt
) ; else...
pnt ; return un-altered point
)
)
[/code]
0 Likes
225 Views
0 Replies
Replies (0)