单独画法线,命令hfx
(defun C:hfx ()
(vl-load-com)
(setq a (vlax-ename->vla-object (car (entsel))))
(setq i (getreal "\n输入计算距离:"))
(setq b (vlax-curve-getpointatdist a i))
(setq c (vlax-curve-getparamatpoint a b))
(setq d (vlax-curve-getfirstderiv a c))
(setq e (atan (cadr d) (car d)))
(setq m (polar b (+ e (/ pi 2)) 100))
(setq n (polar b (- e (/ pi 2)) 100))
(command ".line" m n "")
)