- 积分
- 989
- 明经币
- 个
- 注册时间
- 2011-9-21
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
(defun C:XX ()
(setq a 0)
(setq b 1)
(setq dist (getdist “测量布线宽度:”))
(setq xs (getint “线条数:”))
(initget 7)
(setq jk (/ dist (+ 1 (* 2 xs))))
(prompt “平均间距:” )
(prin1 (* 2 jk))
(setq xjj (getreal “线间距:”))
(setq dist (/ (- dist (* (+ xs 1) xjj)) xs))
(prompt “选择基线:”)
(while (= obj1 nil)
(setq obj1 (entsel)))
(initget 1)
(setq pt1 (getpoint “在布线侧任取一点:”))
(setq xhs (+ 1 xs))
(while (not (= b xhs))
(progn
(setq aaa (car obj1))
(setq d 1)
(while (/= d 3)
(if (= 1 d)
(setq a (rtos (+ (atof a) xjj) 2))
(setq a (rtos (+ (atof a ) dist) 2)))
(command “_.offset” a aaa pt1 “”)
(setq d (+ 1 d)))
(setq b (+ 1 b))
);end progn
);end while
(prompt “图层转换:”)
(setq obj1 (ssget))
(while (/= obj1 nil)
(setq a (getstring “选择图层:”))
(command “chprop” “p” “” “la” a “”))
(princ))
|
|