CAD图纸排列有很多圆柱排成的规则图形,想计算那些柱子的数量,有没有什么命令可以直接算出来的、、、
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/13 21:30:38
CAD图纸排列有很多圆柱排成的规则图形,想计算那些柱子的数量,有没有什么命令可以直接算出来的、、、
(defun c:pp (/ pd r pt1 pt2 pt3 pt4 pt5 pt6
pt7 pt8 pt9 pt10 pt11 pt12 pt13 pt14 e1
e2
)
(setq v1 (getvar "osmode"))
(setq v2 (getvar "cmdecho"))
(setq v3 (getvar "blipmode"))
(setq v4 (getvar "CELTYPE"))
(setq v5 (getvar "CECOLOR"))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(graphscr)
(PRINC "\加销孔符号!\(WRITEN BY 向赞扬 2012/08/10\)")
(setq en (entsel "\n选择销孔!")
pt0 (cadr en)
en_data (entget (car en))
)
(setq cenpt (osnap pt0 "center"))
(setq r (cdr (assoc 40 en_data)))
(setq d0 (* 2 r))
(setq d1 (fix (+ d0 0.5)))
(setq d2 (rtos d1 2 0))
(setq ps (strcat "D" d2))
(setq px (strcase ps))
(setq pt1 (polar cenpt (* pi 1.5) (+ r (* r 0.2)))
pt2 (polar cenpt (/ pi 2) (+ r (* r 0.2)))
pt3 (polar cenpt pi (+ r (* r 0.2)))
pt4 (polar cenpt 0 (+ r (* r 0.2)))
pt5 (polar cenpt 0 r)
pt6 (polar cenpt (/ pi 2) r)
pt7 (polar cenpt pi r)
pt8 (polar cenpt (* pi 1.5) r)
)
(vl-cmdf "layer" "s" "line-part" "")
(command "color" 1)
(vl-cmdf "line" cenpt pt5 "")
(setq e1 (entlast))
(vl-cmdf "line" cenpt pt6 "")
(setq e2 (entlast))
(vl-cmdf "arc" "c" cenpt pt5 pt6 "")
(setq e3 (entlast))
(vl-cmdf "line" cenpt pt7 "")
(setq e4 (entlast))
(vl-cmdf "line" cenpt pt8 "")
(setq e5 (entlast))
(vl-cmdf "arc" "c" cenpt pt7 pt8 "")
(setq e6 (entlast))
(vl-cmdf "layer" "s" "cen" "")
(vl-cmdf "color" 2)
(vl-cmdf "hatch" "solid" e1 e2 e3 "")
(vl-cmdf "hatch" "solid" e4 e5 e6 "")
(vl-cmdf "ERASE" e1 e2 e3 e4 e5 e6 "")
(vl-cmdf "layer" "s" "line-part" "")
(vl-cmdf "color" 1)
(vl-cmdf "layer" "s" "cen" "")
(vl-cmdf "linetype" "s" "center2" "")
(vl-cmdf "color" 2)
(vl-cmdf "line" pt1 pt2 "")
(vl-cmdf "line" pt3 pt4 "")
(vl-cmdf "layer" "s" "DIM" "")
(vl-cmdf "linetype" "s" "bylayer" "")
(vl-cmdf "color" "bylayer")
(setq th (/ r 2))
(vl-cmdf "text" "j" "r" cenpt th 0 px)
(setvar "osmode" v1)
(setvar "cmdecho" v2)
(setvar "blipmode" v3)
(princ)
)
加载这个LISP程序,命令行用PP命令,输入圆的直径,就可以得出数量!
pt7 pt8 pt9 pt10 pt11 pt12 pt13 pt14 e1
e2
)
(setq v1 (getvar "osmode"))
(setq v2 (getvar "cmdecho"))
(setq v3 (getvar "blipmode"))
(setq v4 (getvar "CELTYPE"))
(setq v5 (getvar "CECOLOR"))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(graphscr)
(PRINC "\加销孔符号!\(WRITEN BY 向赞扬 2012/08/10\)")
(setq en (entsel "\n选择销孔!")
pt0 (cadr en)
en_data (entget (car en))
)
(setq cenpt (osnap pt0 "center"))
(setq r (cdr (assoc 40 en_data)))
(setq d0 (* 2 r))
(setq d1 (fix (+ d0 0.5)))
(setq d2 (rtos d1 2 0))
(setq ps (strcat "D" d2))
(setq px (strcase ps))
(setq pt1 (polar cenpt (* pi 1.5) (+ r (* r 0.2)))
pt2 (polar cenpt (/ pi 2) (+ r (* r 0.2)))
pt3 (polar cenpt pi (+ r (* r 0.2)))
pt4 (polar cenpt 0 (+ r (* r 0.2)))
pt5 (polar cenpt 0 r)
pt6 (polar cenpt (/ pi 2) r)
pt7 (polar cenpt pi r)
pt8 (polar cenpt (* pi 1.5) r)
)
(vl-cmdf "layer" "s" "line-part" "")
(command "color" 1)
(vl-cmdf "line" cenpt pt5 "")
(setq e1 (entlast))
(vl-cmdf "line" cenpt pt6 "")
(setq e2 (entlast))
(vl-cmdf "arc" "c" cenpt pt5 pt6 "")
(setq e3 (entlast))
(vl-cmdf "line" cenpt pt7 "")
(setq e4 (entlast))
(vl-cmdf "line" cenpt pt8 "")
(setq e5 (entlast))
(vl-cmdf "arc" "c" cenpt pt7 pt8 "")
(setq e6 (entlast))
(vl-cmdf "layer" "s" "cen" "")
(vl-cmdf "color" 2)
(vl-cmdf "hatch" "solid" e1 e2 e3 "")
(vl-cmdf "hatch" "solid" e4 e5 e6 "")
(vl-cmdf "ERASE" e1 e2 e3 e4 e5 e6 "")
(vl-cmdf "layer" "s" "line-part" "")
(vl-cmdf "color" 1)
(vl-cmdf "layer" "s" "cen" "")
(vl-cmdf "linetype" "s" "center2" "")
(vl-cmdf "color" 2)
(vl-cmdf "line" pt1 pt2 "")
(vl-cmdf "line" pt3 pt4 "")
(vl-cmdf "layer" "s" "DIM" "")
(vl-cmdf "linetype" "s" "bylayer" "")
(vl-cmdf "color" "bylayer")
(setq th (/ r 2))
(vl-cmdf "text" "j" "r" cenpt th 0 px)
(setvar "osmode" v1)
(setvar "cmdecho" v2)
(setvar "blipmode" v3)
(princ)
)
加载这个LISP程序,命令行用PP命令,输入圆的直径,就可以得出数量!
CAD图纸排列有很多圆柱排成的规则图形,想计算那些柱子的数量,有没有什么命令可以直接算出来的、、、
用什么命令可以在CAD里面查找出图纸中一个重复图形的数量?
cad折断线怎么画 有没有直接的命令
cad图纸中有个块数量很多用什么简便的方法可以数出它的数量
CAD圆数量计算我想计算每个交点上的圆总共有多少个 边缘不足的不算数多麻烦 CAD里有什么方法可以算出来&nb
CAD制图怎么查询图纸中某一图形的数量总和?我用的是2007 比如一个图纸里 有好多开关 我怎么计算开关的数量
请问一下CAD中空间两条直线的最近距离如何求得,有没有直接的一个命令?谢谢!
现在我统计CAD图纸上的喷头数量,但一个个数太麻烦,请问有什么快捷方式?
CAD有按图形最大外形画圆的命令吗
路灯品字形排列和对称排列的优缺点都有什么啊.在CAD格式中用图形怎么表现.
有什么软件可以在cad图形里面翻译英文?是图形,不是图纸
电气图纸系统图中那些配电箱的功率,电流,系数,还有功率因数都是怎么算出来的,有计算公式吗?