- 积分
- 1005
- 明经币
- 个
- 注册时间
- 2010-5-20
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2013-5-3 19:35:22
|
显示全部楼层
(DEFUN C:R1()
(SETQ P0 (GETPOINT "\n 第一个数据点:"))
(while (/= (progn
(setq px (polar (polar p0 0 80) (* 1.5 pi) 22))
(setq sx (ssget "c" p0 px '((0 . "*text"))))
)nil)
(setvar "osmode" 0)
(setq p1 (polar p0 0 80))
(setq p2 (polar p1 0 80))
(setq p3 (polar p2 0 80))
(setq p4 (polar p3 0 80))
(setq p5 (polar p4 0 80))
(setq ss-p (list p0 p1 p2 p3 p4 p5))
(setq s1 (mapcar '(lambda(x)
(setq pp (polar (polar x 0 80) (* 1.5 pi) 22))
(setq s (ssget "c" x pp '((0 . "*text"))))
(cdr(assoc 1 (entget (ssname s 0)))))
ss-p
))
(setq s2 (apply '(lambda (x y z x1 y1 z1)
(strcat x "," y "," z "," x1 "," y1 "," z1)
)
s1
))
(setq ff (open "d:\\2.csv" "a"))
(write-line s2 ff)
(close ff)
(setvar "osmode" 16383)
(setq p0 (polar p0 (* 1.5 pi) 22))
)
)
改了下 |
|