很简单,我很困惑,在测地线上,X向上(由北)增加,在数学坐标系中,X向右(在东)增加。
因此这里有两个代码
1) 对于测地线学家↑x
- (defun c:geo_koord_leader (/ pod_z koord y x z xyz)
- (initget "Yes No")
- (setq
- pod_z (getkword "\nShow Z [Yes/No] <No>? : ")
- )
- (while (and
- (setq koord (getpoint "\nPoint <Exit>"))
- )
- (setq
- y (strcat "Y=" (rtos (nth 0 koord) 2 3))
- x (strcat "X=" (rtos (nth 1 koord) 2 3))
- z (if
- (= pod_z "Y")
- (strcat "Z=" (rtos (nth 2 koord) 2 3))
- ""
- )
- )
- (VL-cmdf "_leader" koord pause "" x y z "")
- )
- )
- (princ "Command name: geo_koord_leader")
2) 对于所有其他正常人→x
- (defun c:math_koord_leader (/ pod_z koord y x z xyz)
- (initget "Yes No")
- (setq
- pod_z (getkword "\nShow Z [Yes/No] <No>? : ")
- )
- (while (and
- (setq koord (getpoint "\nPoint <Exit>"))
- )
- (setq
- x (strcat "X=" (rtos (nth 0 koord) 2 3))
- y (strcat "Y=" (rtos (nth 1 koord) 2 3))
- z (if
- (= pod_z "Y")
- (strcat "Z=" (rtos (nth 2 koord) 2 3))
- ""
- )
- )
- (VL-cmdf "_leader" koord pause "" x y z "")
- )
- )
- (princ "Command name: math_koord_leader")
|