皇上快溜 发表于 2016-6-19 13:50
你好,我这个小lsp想请你改一下。在9楼
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=172551
- (defun c:yk (/ ANG GEE IS POL PTCEN RR)
- (setq ptcen (getpoint "\n输入圆心:"))
- (setq rr (getdist ptcen "\n指定半径<默认:1>:"))
- (if (null rr)
- (setq rr 1.0)
- )
- (command "circle" "non" ptcen rr)
- (or (setq is (getdist "\n输入移动距离 <5>:")) (setq is 5))
- (while (= (car (setq gee (grread nil 1 0))) 5)
- (redraw)
- (setq gee (cadr gee))
- (setq ang (angle ptcen gee))
- (grdraw ptcen gee 1)
- )
- (setq pol (polar ptcen ang is))
- (command "move" (entlast) "" ptcen pol)
- (redraw)
- (princ)
- )
|