beneman 发表于 2014-4-16 01:40:32

直线中点绘制圆,怎么执行不了呢,说我参数错误,怎么回事呢?

(defun c:ttt()(vl-load-com)(setq b (entget (car (entsel))))(setq qd (assoc 10 b))(setq zd (assoc 11 b))(setq jl1 (distance qd zd))(setq jl2 (/ jl1 2))(setq jd (angle qd zd))(setq zxd (polar qd jd jl2))(setq r (getint "\n输入半径"))(command "circle" zxd r)(princ))(princ "\n程序加载完成")(princ "\n")在一直线中点绘制一个圆的代码!!!


http://bbs.mjtd.com/xwb/images/bgimg/icon_logo.png 该贴已经同步到 beneman的微博

yoyoho 发表于 2014-4-16 06:59:26

(defun c:ttt()
(vl-load-com)
(setq b (entget (car (entsel))))
(setq qd (cdr (assoc 10 b)))
(setq zd (cdr (assoc 11 b)))
(setq jl1 (distance qd zd))
(setq jl2 (/ jl1 2))
(setq jd (angle qd zd))
(setq zxd (polar qd jd jl2))
(setq r (getint "\n输入半径"))
(command "circle" zxd r)
(princ)
)
(princ "\n程序加载完成")
(princ "\n")
页: [1]
查看完整版本: 直线中点绘制圆,怎么执行不了呢,说我参数错误,怎么回事呢?