(defun c:l1() (setq ci (getreal "分割数:")) (setq r (getreal "半径:")) (setq jiao (getangle "角度:")) (setq p0 '(0 0 0)) (command "arc" p0 "e" (polar p0 0 (* 2 r)) "r" r) (setq hu1(entlast)) (command "pline" p0) (repeat (fix ci) (setq n 1) (setq dist (/ (* pi r) ci)) (setq p1 (vlax-curve-getPointAtDist hu1 (* n dist))) (setq p1_x (car p1)) (setq disty (apply '(lambda (x a) (* (/ (sin a) (cos a)) x)) '(p1_x jiao) )) (setq p11 (list p1_x disty)) (setq n (1+ n)) (command p11) ) (command "") )
apply赋值出错了,说是number类型错误:jiao
删除中间却不会有类型不对 |