; 两点测量高程点坡度[mini_gc_pd].lsp
(defun c:mini_gc_pd (/ old_cmd ang dis gc1 p1 p2 p3 pb)
	(mini_start nil)
	(mai_last_com "mini_gc_pd")
	(while
		(and
			(setq p1 (getpoint "\n 请输入高程点坡度第一点：<退出>"))
			(setq p2 (getpoint p1 "\n 请选择高程点坡度第二点：<退出>"))
		)
		(setq
			gc1 (abs (- (caddr p2) (caddr p1)))			;高差
			p3  (list (car p2) (cadr p2) (caddr p1))
			dis (distance p1 p3)						;平距,
			ang (/ (* 180. (atan (/ gc1 dis))) pi)		;夹角
			pb (/ dis gc1)
		)
		(if (= gc1 0)
			(princ "\n 两点共面，夹角= 0")
			(princ
				(strcat "\n 两点坡度夹角= " (rtos ang 2 3) " 两点间坡比=1: " (rtos pb 2 3) " .")
			)
		)
	)
	(mai_end)
)
