;TIP598A.LSP Draw Channel Section (c)1990, Trevar Chapmon long] (defun C:CHNNL ( ) (setq CHFL (open "C:/ACAD/LISP/CHNNL.TXT" "r")) (setq CHD (getstring "Channel size, i.e. 12x30: ")) (setq DLN (strlen CHD)) (setq CTL (read-line CHFL)) (while CTL (if (= CHD (substr CTL 1 DLN)) (setq D (atof (substr CTL 15 4)) TW (atof (substr CTL 25 5)) BF (atof (substr CTL 35 5)) TF (atof (substr CTL 45 5)) A (atof (substr CTL 55 5)) ) ) (setq CTL (read-line CHFL)) ) (close CHFL) (setq IP (getpoint "Pick insertion point ") DIS (* 0.08748 (/ (- BF TW) 2)) NTH (/ pi 2) WST pi STH (* 3 (/ pi 2)) EST 0.0 PT1 (polar IP NTH BF) PT2 (polar PT1 EST D) PT3 (polar PT2 STH BF) PT4 (polar PT3 WST (- TF DIS)) PTA (polar PT2 STH TW) PT5 (polar PTA WST (+ TF DIS)) PTB (polar PT1 STH TW) PT6 (polar PTB EST (+ TF DIS)) PT7 (polar IP EST (- TF DIS)) ) (command "PLINE" IP PT1 PT2 PT3 PT4 PT5 PT6 PT7 IP "") (command "FILLET" "R" (- (- TF DIS) 0.001)) (command "FILLET" PT4 PT4) (command "FILLET" PT7 PT7) (command "FILLET" "R" "0.125") (command "FILLET" PT5 PT5) (command "FILLET" PT6 PT6) )