Apprécier la vie 23:16:41
参数类型错误: point: nil
哪位大神知道,给解释一下呀
[ZZXXQQ] 23:20:16
点类型错
Apprécier la vie 23:20:39
不是太明白,我是个小白
新来的
怎么改呀
[vormittag]桔子 23:22:05
先改名片
Apprécier la vie 23:22:14
哦看
哦了
[inl] 23:23:28
改好了吗
[inl] 23:24:01
(defun c:tx ()
(setvar "cmdecho" 0 )
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq dd (getdist "
正方形边长:"))
(if (null dd) (setq dd 10))
(setq num (getint "
起始编号 :"))
(if (null num)(setq num 1))
(setq dd2 (/ dd 5))
(setq pt1 (getpoint "
第一点:"))
(while (/= pt1 nil)
(command "donut" 0 dd2 pt1 "")
(setq pt2 (getpoint pt2 "
第二点:"))
(command "line" pt1 pt2 "")
(command "polygon" 4 "e" pt2 (polar pt2 0 dd))
(setq en1 (entlast))
(command "text" "m" (polar (polar pt2 0 (/ dd 2)) (/ pi 2) (/ dd 2)) (/dd 2) 0 (itoa num))
(setq en2 (entlast))
(setq pp1 pt2)
(setq pp2 (polar pp1 0 dd))
(setq pp3 (polar pp2 (/ pi 2) dd))
(setq pp4 (polar pp2 (/ pi 2)dd))
(setq pp_0 (polar pp1 (/ pi 2)(/ dd 2 )))
(setq pp_90 (polar pp1 0 (/ dd 2 )))
(setq pp_180 (polar pp2 (pi 2) (/ dd 2)))
(setq pp_270 (polar pp3 pi (/ dd 2)))
(setq pp pt2)
(setq ang (angle pt1 pt2))
(cond ((and (> ang (* pi 0.5)) (< ang pi )) (setq pp pp2))
((and (> ang pi) (< ang (* pi 1.5))) (setq pp pp3))
((and (> ang (* pi 1.5)) (< ang (* pi 2))) (setq pp pp4))
)
(cond ((= ang 0) (setq pp pp_0))
((= ang (/ pi 2)) (setq pp pp_90))
((= ang pi) (setq pp pp_180))
((=ang (** pi 1.5 )) (setq pp pp_270))
)
(command "move" en1 en2 "" pp pt2)
(setq num (1 + num))
(setq pt2 (getpoint "
第二点:"))
)
(setvar "osmode" os)
(prin1)
)
我在书上抄的程序,就有这个问题
也不知道怎么下手, |