Hi Lee,
I was trying out a subfunction you posted on your website to translate a point to Ortho. Very nice work!:
;;---------------------=={ Ortho Point }==--------------------;;
;; ;;
;; Returns a point transformed relative to a basepoint to ;;
;; account for activation of Orthmode in the current UCS. ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; base - basepoint for transformation (UCS) ;;
;; point - point to be transformed (UCS) ;;
;;------------------------------------------------------------;;
;; Returns: Point (UCS) transformed to account for Ortho ;;
;;------------------------------------------------------------;;
(defun LM:OrthoPoint ( base point )
(if (zerop (getvar 'ORTHOMODE)) point
(apply 'polar
(cons base
(
(lambda ( n / a x z )
(setq x (- (car (trans point 0 n)) (car (trans base 0 n)))
z (- (caddr (trans point 0 n)) (caddr (trans base 0 n)))
a (angle '(0. 0. 0.) n)
)
(if (< (abs z) (abs x)) (list (+ a (/ pi 2.)) x) (list a z))
)
(trans (getvar 'UCSXDIR) 0 1)
)
)
)
)
)
However, I noticed that this code does not account for the value of SNAPANG. I would like to do something to account for SNAPANG, but since I am a bit more mathematically challenged :ugly:, I do not completely understand your code, nor how to alter it to do so. If you or another here could put me in the right direction, it would be much appreciated.
Thanks!