编写一lisp程序 cad
答案:2 悬赏:40 手机版
解决时间 2021-11-21 23:47
- 提问者网友:两耳就是菩提
- 2021-11-21 10:25
编写一lisp程序 cad
最佳答案
- 五星知识达人网友:归鹤鸣
- 2021-11-21 10:57
试编程序如下,请校核。
(defun hang (p r n)
(repeat n
(command "circle" p r)
(setq l (cons p l)
p (polar p 0 (+ r r))
)
)
l
)
(defun sjy (p r n / i p1 p2 p3 l)
(setq i 0)
(repeat n
(hang p r (- n i))
(setq i (1+ i)
p (polar p (/ pi 3) (+ r r))
)
)
(setq p1 (last l)
p2 (car l)
p3 (polar p1 0 (distance p1 p2))
)
(command "pline" p1 p2 p3 "c")
(command "offset" r p2 (polar p2 (/ pi 2) (+ r r)) "")
(command "erase" p2 "")
l
)
(defun c:sjy (/ p r n)
(setq p (getpoint "左下角圆心坐标:")
r (getdist p "半径:")
n (getint "排数:")
)
(sjy p r n)
)追问蟹蟹
(defun hang (p r n)
(repeat n
(command "circle" p r)
(setq l (cons p l)
p (polar p 0 (+ r r))
)
)
l
)
(defun sjy (p r n / i p1 p2 p3 l)
(setq i 0)
(repeat n
(hang p r (- n i))
(setq i (1+ i)
p (polar p (/ pi 3) (+ r r))
)
)
(setq p1 (last l)
p2 (car l)
p3 (polar p1 0 (distance p1 p2))
)
(command "pline" p1 p2 p3 "c")
(command "offset" r p2 (polar p2 (/ pi 2) (+ r r)) "")
(command "erase" p2 "")
l
)
(defun c:sjy (/ p r n)
(setq p (getpoint "左下角圆心坐标:")
r (getdist p "半径:")
n (getint "排数:")
)
(sjy p r n)
)追问蟹蟹
全部回答
- 1楼网友:孤独入客枕
- 2021-11-21 12:24
我有这种图形的LISP程序,很不错的追问又是你😂😂追答你要吗?追问当然想😂😂😂作为一个学理科的妹子我也是不容易啊!我是长理云塘校区的追答你私信我追问怎么弄😳😳😳我只要简单的😁😁😁追答电脑上网时,网页右上角的信封图标就是私信啊追问明天我再看看😁😁
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯