(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 使用。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)