- (defun c:tt (); tt(矩形管)
- (defun Udist (bit kwd msg def bpt / inp)
- (if def
- (setq msg (strcat "\n" msg "<" (rtos def) ">: ")bit (* 2 (fix (/ bit 2))))
- (setq msg (strcat "\n" msg ": "))
- )
- (initget bit kwd)
- (setq inp (if bpt(getdist msg bpt)(getdist msg)))
- (if inp inp def)
- )
- (setq ww (Udist 7 "" "宽度<输入或鼠标直接量取>" ww nil))
- (setq hh (Udist 7 "" "高度<输入或鼠标直接量取>" hh nil))
- (setq dd (Udist 7 "" "厚度<输入或鼠标直接量取>" dd nil))
- (while (setq p0 (getpoint "\n基点<退出>: "))
- (setq p1 (list (+ (car p0) ww) (+ (cadr p0) hh))
- p01 (list (+ (car p0) dd) (+ (cadr p0) dd))
- p11 (list (- (car p1) dd) (- (cadr p1) dd))
- )
- (command "Rectang" "non" p0 "non" p1)
- (command "Rectang" "non" p01 "non" p11)
- )
- (princ)
- )
|