
AUTO LISP倒角程序怎样编啊??
(defundj()(setqp0(getpoint"输入第一点:"))(setqp1(polarp00100))(setqp2(polarp1(*0.5pi)30))(...
(defun dj()
(setq p0 (getpoint "输入第一点:"))
(setq p1 (polar p0 0 100))
(setq p2 (polar p1 (* 0.5 pi) 30))
(command "pline" p0 p1 "")
(setq l1 (entlast)) ;;;怎样选取一条直线啊?这样好像是错
的在倒角指定直线时不对
(command "pline" p1 p2 "")
(setq l2 (entlast))
(command "chamfer" "t" "t" "d" 5 5 l1 l2 "" )
(prin1)
) ;;;谢谢指教
;;;;还有怎样写(command "dim" "dia"…………………………)标注直径
(command "dim" "rad"…………………………)标注半径
能否给编写个实例??? 展开
(setq p0 (getpoint "输入第一点:"))
(setq p1 (polar p0 0 100))
(setq p2 (polar p1 (* 0.5 pi) 30))
(command "pline" p0 p1 "")
(setq l1 (entlast)) ;;;怎样选取一条直线啊?这样好像是错
的在倒角指定直线时不对
(command "pline" p1 p2 "")
(setq l2 (entlast))
(command "chamfer" "t" "t" "d" 5 5 l1 l2 "" )
(prin1)
) ;;;谢谢指教
;;;;还有怎样写(command "dim" "dia"…………………………)标注直径
(command "dim" "rad"…………………………)标注半径
能否给编写个实例??? 展开
展开全部
只是因为你的(command "chamfer")格式有问题而已,不是说用command 调用所用的函数都是按照画图时候的顺序来就可以的,而且经尝试,不可以用PLINE~只能用LINE,我也不知道为什么,正确的语言是
(defun c:dj()
(setq p0 (getpoint "输入第一点:"))
(setq p1 (polar p0 0 100))
(setq p2 (polar p1 (* 0.5 pi) 30))
(command "line" p0 p1 "")
(setq l1 (entlast))
(command "line" p1 p2 "")
(setq l2 (entlast))
(command "chamfer" "t" "t" "d" 5 5 "chamfer" l1 l2 "" )
(prin1)
)
(defun c:dj()
(setq p0 (getpoint "输入第一点:"))
(setq p1 (polar p0 0 100))
(setq p2 (polar p1 (* 0.5 pi) 30))
(command "line" p0 p1 "")
(setq l1 (entlast))
(command "line" p1 p2 "")
(setq l2 (entlast))
(command "chamfer" "t" "t" "d" 5 5 "chamfer" l1 l2 "" )
(prin1)
)
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询