本帖最后由 kucha007 于 2024-3-1 10:07 编辑
while方便一点
 - (defun K:Grid->100 (StaPT / x y PTLst)
- (setq x 0.0 y 0.0)
- (while (<= x 900)
- (while (<= y 900)
- (setq PTLst (cons (list x y) PTLst))
- (setq y (+ y 100))
- )
- (setq x (+ x 100))
- (setq y 0)
- )
- (mapcar '(lambda (XX) (mapcar '+ StaPT XX)) (reverse PTLst));累加
- )
|