新手求助
程序如下:(defun c:zk ()
(setvar "cmdecho" 0)
(setvar "osmode" 0) ; 关闭捕捉
(setq p0 (getpoint "\n输入基点:"))
(setq a (getdist "\n高度:"))
(setq b (getdist "\n宽度:"))
(setq c (getdist "\n内径:"))
(setq d (getdist "\n板厚:"))
(setq p1 (polar p0 (* pi 1.5) a))
(setq p2 (polar p1 0 b))
(setq p3 (polar p2 (/ pi 2) a))
(setq p4 (polar p0 pi (/ d 2)))
(command "pline" p0 p1 p2 p3 "")
(setq ent1 (entlast))
(command "fillet" "r" c "fillet" "p" ent1 "")
(command "pline" p0 p4 "")
U
(setq ent2 (entlast))
(command "offset" "t" ent1 p4 "")
(setq ent3 (entlast))
(command "lengthen" ent3 "");取得线段长度
(setq dd (getvar "perimeter")) ;显示长度尺寸
(setq w (distof (rtos dd 2 1))) ;保留一位小数
(setq d9 (getpoint "\n输入基点:"))
(setq ll (getdist "\n图形长度:"))
(setq d1 (polar d9 (/ pi 2) w))
(setq d2 (polar d1 0 ll))
(setq d3 (polar d2 (* pi 1.5) w))
(setq d4 (polar d9 (/ pi 2) (/ w 2)))
(setq d5 (polar d4 0 ll))
(command "line" d9 d1 d2 d3 "C")
(command "line" d4 d5 "")
(setvar "osmode" 567) ;捕捉还原
(prin1)
)
(prompt ":\中径展开")
(prin1)
在执行过程中会出现“未知命令“ZK”。按 F1 查看帮助。” 但是并不影响程序的顺利执行,请问这是为什么?
我已经找到问题了 (command "fillet" "r" c "fillet" "p" ent1 "") 这里面多了最后一个""我想删掉这个帖子 可是不知道怎么操作,谁能指导一下怎么删贴?
页:
[1]