求CAD自动编码插件,跪求,水泥搅拌桩太多了。
发布网友
发布时间:2022-05-06 10:24
我来回答
共2个回答
热心网友
时间:2022-06-29 18:47
(defun c:idtl()
(setvar "AUNITS" 2)
(setvar "ANGBASE" (/ PI 2))
(setvar "ANGDIR" 1)
(setq h (getdist "\nEnter height of text:")
GH (* PI 2)
HG (/ PI 2)
HA (GTR 100.0)
VA (GTR 200.0)
ds1 (* 6.0 H)
ds2 (* 9.0 H)
dsV (* 3.0 H)
DSN (/ DSV 2.0)
VA0 (GTR 0.0)
bs (getpoint "\nEnter Base point for table:")
no (getint "\nEnter point no.:")
b (getpoint "\nEnter start point:")
lm 0.0
bs1 (COO bs ha ds1)
bs2 (COO bs ha (+ ds1 H H ds2))
)
(command "layer" "n" "table" "c" "7" "table"
"n" "line" "c" "1" "line"
"n" "no" "c" "3" "no" ""
)
(while b
(setq st (COO bs va (* dsV lm))
st1 (COO bs1 va (* dsV lm))
st2 (COO bs2 va (* dsV lm))
BH (COO B VA0 DSN)
)
(command "layer" "s" "table" "")
(command "text" st h (rtG ha) no)
(command "text" st1 h (rtG ha) (rtos (car b) 2 3))
(command "text" st2 h (rtG ha) (rtos (cadr b) 2 3))
(command "layer" "s" "no" "")
(command "text" bH h (rtG ha) no)
(SEtq lm (+ lm 1)
NO (+ NO 1)
c (getpoint "\nEnter next point:")
)
(command "layer" "s" "line" "")
(command "pline" B "w" "0.0" "0.0" c "")
(setq b c)
)
(command "layer" "s" "table" "")
(SETQ STL (COO ST (+ VA (/ HG 2)) (/ DSV 2)))
(SETQ STL1 (COO STL HA (* H 25)))
(COMMAND "LINE" STL STL1 "")
(COMMAND "ARRAY" STL "" "R" (FIX (+ 1 LM)) "" DSV)
)
(princ "\n < idtl > loaded:")
(princ)
将以上代码复制到记事本里,保存为:文件名.lsp
加载后,运行命令是:idtl
也可以直接复制到CAD命令行里运行
热心网友
时间:2022-06-29 18:47
用 工程桩自动编号并提取坐标程序,专门解决这方面问题