- (defun AYL-GetAllPath (SttPnt EndPnt PtsLst / AllPathLst CurPnt CurPathLst TestLst TmpLst DPtLst NxtPnt CurPathLst-s)
- (setq AllPathLst nil)
- (setq CurPathLst (List SttPnt))
- (setq TestLst (list (list SttPnt CurPathLst PtsLst)))
- (while TestLst
- (setq TmpLst (car TestLst))
- (setq TestLst (cdr TestLst))
- (setq CurPnt (car TmpLst))
- (setq CurPathLst (cadr TmpLst))
- (setq PtsLst (caddr TmpLst))
-
- (setq TmpLst (vl-remove-if-not (function (lambda (Pts) (member CurPnt Pts))) PtsLst))
- (while TmpLst
- (setq DPtLst (car TmpLst))
- (setq TmpLst (cdr TmpLst))
- (if (equal (car DPtLst) CurPnt)
- (setq NxtPnt (cadr DPtLst))
- (setq NxtPnt (car DPtLst))
- )
- (setq CurPathLst-s (cons NxtPnt CurPathLst))
- (setq TestLst (cons (list NxtPnt CurPathLst-s (vl-remove DPtLst PtsLst)) TestLst))
- (if (equal NxtPnt EndPnt)
- (setq AllPathLst (cons (reverse CurPathLst-s) AllPathLst))
- )
- )
- )
- (princ "\n")
- (princ (length AllPathLst))
- (princ "\n")
- AllPathLst
- )
|