- (defun c:test( / i strtmp pts fa fb fc stra strb strc)
- (setq fa (getfiled "Select X file" "e:\" "txt" 8))
- (setq fb (getfiled "Select Y file" "e:\" "txt" 8))
- (setq fc (getfiled "Select Z file" "e:\" "txt" 8))
- (setq fa (open fa "r"))
- (setq fb (open fb "r"))
- (setq fc (open fc "r"))
- (setq i 0 stra "" strb "" strc "")
- (while (setq strtmp (read-line fa))
- (if (/= (vl-string-trim " " strtmp) "")
- (setq stra (strcat stra " " strtmp))
- )
- )
- (close fa)
- (while (setq strtmp (read-line fb))
- (if (/= (vl-string-trim " " strtmp) "")
- (setq strb (strcat strb " " strtmp))
- )
- )
- (close fb)
- (while (setq strtmp (read-line fc))
- (if (/= (vl-string-trim " " strtmp) "")
- (setq strc (strcat strc " " strtmp))
- )
- )
- (close fc)
- (setq ptsa (read (strcat "(" stra ")")))
- (setq ptsb (read (strcat "(" strb ")")))
- (setq ptsc (read (strcat "(" strc ")")))
- (setq pts (mapcar 'list ptsa ptsb ptsc))
- (command "_.3dpoly")
- (mapcar '(lambda(e) (command e)) pts)
- (command "")
- (princ pts)
- )
|