ARC命令的应用
(setq Lst '((1 2)(2 2)(3 2)(4 2)(5 2)(6 2)))(setq pt0 (nth 0 Lst)
pt1 (nth 1 Lst)
pt2 (nth 2 Lst)
)
(command "_.arc" pt0pt1 pt2 )
提示:函数被取消
为什么???
http://space.mjtd.com/xwb/images/bgimg/icon_logo.png 该贴已经同步到 Jully的微博 本帖最后由 jackynine 于 2011-4-15 15:06 编辑
列表格式不对
(setq Lst '((1,2)(2,2)(3,2)(4,2)(5,2)(6,2)))
(setq pt0 (nth 0 Lst)
pt1 (nth 1 Lst)
pt2 (nth 2 Lst)
)
(command "_.arc" pt0pt1 pt2 )
那自动采集到Lst中的点都是那样的,不带","怎么办?? 本帖最后由 mandala 于 2011-4-15 15:46 编辑
差点被你搞糊涂了,一条直线上的三点,怎么画圆弧啊???
你倒直接在cad里画画看,不“函数被取消”才怪。
本帖最后由 mandala 于 2011-4-15 15:56 编辑
害得我调试了好久,看来看去格式都是对的嘛。 我辈需谨记之 (setq pt0 (entsel)
pt1 (entsel)
pt2 (entsel)
)
(command "_.arc" pt0pt1 pt2 )
也提示函数被取消。我选择的三个点不在一直线上 ;方法一
(setq pt0 (getpoint)
pt1 (getpoint)
pt2 (getpoint)
)
(command "_.arc" pt0pt1 pt2 )
方法二:
(setq pt0 (entsel)
pt1 (entsel)
pt2 (entsel)
)
(command "_.arc" pt0pt1 pt2 )
方法三:
(setq Lst '((195 160 0)(200 160 0)(203 158 0)))
(setq pt0 (nth 0 Lst)
pt1 (nth 1 Lst)
pt2 (nth 2 Lst)
)
(command "LINE" pt0 pt1 "")
(command "_.arc" pt0pt1 pt2 )
这三种方式,时而成功,时而出现函数被取消的提示。为什么?? (entsel)返回的不是点坐标,你要点坐标 ,就要用(car (entsel)) 本帖最后由 mandala 于 2011-4-16 10:20 编辑
Jully 发表于 2011-4-16 10:11 http://bbs.mjtd.com/static/image/common/back.gif
;方法一
(setq pt0 (getpoint)
pt1 (getpoint)
方法一,只要三点不在一直线上就会成功。
方法二,无论如何一定会失败。建议先去研究一下entsel函数到底是用来做什么的。
方法三,一定会成功。
页:
[1]
2