- ;; 圆动态渐变偏移变色
- ;;需要e派工具箱(XCAD)的支持:[url]http://yunpan.cn/QXQKsW9gAPmpF[/url](defun c:test1498 (/ s0 p0 rr mode mo co r0 i p1 dd s00 n ss)
- (xyp-CMDLA0)
- (setq d0 (Udist 1 "" "渐进距离<输入或鼠标直接量取>" d0 nil)
- s0 (car (entsel "\n选择圆: "))
- p0 (xyp-DXF 10 s0)
- rr (xyp-DXF 40 s0)
- mode t
- )
- (while mode
- (setq mo (grread t 15 0)
- co (car mo)
- r0 0
- )
- (redraw)
- (cond ((member co '(5))
- (if (and ss (> (sslength ss) 0))
- (xyp-erase ss)
- )
- (setq i 1
- p1 (cadr mo)
- dd (distance p1 p0)
- s00 (entlast)
- )
- (xyp-Grvecs-Ptlst (list p0 p1) 1)
- (while (< (+ r0 rr) dd)
- (setq n (* (/ (+ 1 i) 2.) i)
- r0 (* n d0)
- i (1+ i)
- )
- (xyp-Offset s0 r0 t nil nil)
- (xyp-SubUpd (entlast) 62 (rem i 255))
- )
- (setq ss (xyp-SSelEntnext s00)
- )
- )
- (t (setq mode nil))
- )
- )
- (xyp-CMDLA1)
- )
|