资源说明:CAD二次开发 绘制螺纹
(defun c:luowen()
(setq d(getreal “螺纹公称直径=”))
(setq r(/d 2))
(setq tt(getreal “螺距=”))
(setq l(getreal “螺纹长度=”))
(setq p0(getpoint “指定基点”))
(setq p01(list (n th 0 p0) (n th 1 p0) (-1(/tt 1.155))))
(setq p012(list (n th 0 p0) (n th 1 p0)1))
(command “layer” “m” “l1” “c” 1 “” “”)
(command “layer” “m” “l2” “c” 2“” “”)
(command “layer” “m” “l3” “c” 252 “” “”)
(command “layer” “s” “l1” “”)
(command “cylinder” p0 r 1)
(command “ucs” “o” p0)
(setq e0 (entlast))
(setq r0(-0 r))
(setq t0(/tt 2))
(setq pr(* (pi n)))
(setq pr0(-0(*pi n)))
(setq pt1(list pr r0 (+ 1 t0)))
(command “ucs” “o” pt1)
(command “ucs” “y” -90)
(setq p1(list 0 0))
(setq p1(list tt 0)))
(setq p3(list(- 0 tt 0 (*pi d)))
(command “layer” “s” “13” “”)
(command “line” p1 p3 “”)
(setq e2(entlast))
(command “extrude” e1 “” “P” e2 “”)
(setq e3(entlast))
(command “erase” e2 “”)
(setq n 30)
(set I 0)
(setq zl(/ tt n))
(setq zj(/360 n))
(setq yd 0)
(while (
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。