- ;;******************************************************************hqd绘制墙吊
- (defun c:hqd ()
- (setq p1 (getpoint "\n墙吊取点 :"))
- (while (setq p2 (getpoint p1 "\n墙吊终端 :"))
- (setq cdd (* (distance p1 p2) 4))
- (setq wbx (rtos cdd 2 0));此函数将返回 3D p1 p2 之间的距离。
- (setq ang (angle p1 p2))
- (setq p3 (polar (polar p1 ang (/ cdd 8)) (+ (/ pi 2) ang) 2.2))
- (command ".pLINE" "non" p1 "non" p2 "")
- (command "text" "MC" p3 2.5 (/ (* ang 180) pi) wbx);文字高度2.5 旋转0
- (setq p1 p2)
- )
- (prin1)
- )
程序中字高始终是2.5,文字为线长的4倍。但不明白最后一句的意思 |