Autocad 画刀线飞机孔怎麼画最快?求详细方法,如图。

Autocad 画刀线飞机孔怎麼画最快?求详细方法,如图。,第1张

(defun c:fj ( / pt cm os r1 r2 r3 r4 p1 p2 p3 p4 p5 p6 )
(if (setq pt (getpoint "\n选择刀线飞机孔基点: "))
(progn
(setq cm (getvar "cmdecho") os (getvar "osmode"))
(command "cmdecho" 0 "osmode" 0)
(if (null (setq r1 (getdist pt "\n输入中心圆半径: <60> "))) (setq r1 6) )
(if (null (setq r2 (getreal "\n输入中心圆与边圆角值: <20> "))) (setq r2 2) )
(if (null (setq r3 (getdist pt "\n输入长边宽度: <60> "))) (setq r3 6) )
(if (null (setq r4 (getreal "\n输入长边长度: <270> "))) (setq r4 27) )
(setq p1 (polar pt 0 r1) p2 (polar pt pi r1))
(command "_arc" "c" pt p1 p2) (setq a1 (list (entlast) p1))
(setq p3 (polar pt 0 (/ r4 20)) p4 (polar pt pi (/ r4 20)))
(command "_line" p1 p3 "") (setq a2 (list (entlast) p1))
(command "_line" p2 p4 "") (setq a3 (list (entlast) p2))
(setq p5 (polar p3 ( pi 15) r3) p6 (polar p4 ( pi 15) r3))
(command "_fillet" "r" r2) (command "_fillet" a1 a2)
(command "_fillet" a1 a3) (command "_line" p5 p6 "")
(command "_arc" "c" (polar p5 (/ pi 2) (/ r3 20)) p5 p3)
(command "_arc" "c" (polar p6 (/ pi 2) (/ r3 20)) p4 p6)
(command "osmode" os "cmdecho" cm)
)
)
(princ)
)
;;如果要画的都是类似中的话,给你个程序吧,新建一文本文件,复制以上代码进去,另存 FJLSP 后,加载到CAD中,输入命令 FJ 使用。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12749117.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-27
下一篇 2023-05-27

发表评论

登录后才能评论

评论列表(0条)

保存