你好
我遵循这个代码,它的操作方式与fens选择模式相同,
除了两样东西,我都有,
(grread 5),5代表什么?(不懂文件)
什么使PT为零?(当它终止程序主循环时)
- (defun VECTORS (/ PT PTLIST)
- ; Sequential choice of points
- ; by ElpanovEvgeniy
- ; (2005-10-19 17:59:01)
- ; (VECTORS)
- (setq PTLIST (list
- (setq PT (getpoint "\n Specify the first point "))
- ) ;_ list
- ) ;_ setq
- (princ "\n Specify the following point ")
- (princ)
- (while
- (setq PT
- (progn (while
- (and (setq PT (grread 5))
- (= (car PT) 5)
- ) ;_ and
- (redraw)
- (mapcar
- (function
- (lambda (x1 x2)
- (grdraw x1 x2 6 5)
- ) ;_ lambda
- ) ;_ function
- (cons (cadr PT) PTLIST)
- PTLIST
- ) ;_ mapcar
- ) ;_ while
- (if (listp (cadr PT))
- (cadr PT)
- ) ;_ if
- ) ;_ progn
- ) ;_ setq
- (setq PTLIST (cons PT PTLIST))
- ) ;_ while
- ) ;_ defun
谢谢 |