当前位置:贵波网 > 生活 > 正文

autolisp怎么创建函数

2021-08-01 19

(defun c:tuxing()
(setvar "cmdecho" 0)
(setq pt1 (getpoint "n输入圆心坐标:"))
(setq rad (getdist "n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)(defun c:tuxing()
(setvar "cmdecho" 0)
(setq pt1 (getpoint "n输入圆心坐标:"))
(setq rad (getdist "n输入半径:"))
(setq pt2 (polar pt1 pi (* rad 2)))
(setq pt3 (polar pt1 0 (* rad 2)))
(command "circle" pt1 rad)
(command "circle" pt2 rad)
(command "circle" pt3 rad)
(command "line" pt2 pt3 "")
(setvar "cmdecho" 1)
(princ)
)AUTOLISP ? 没学过啊!不过看你的问题描述 这个问题应该很简单。。。
本周热门
热门文章
热门关注