CUSTOMIZED AUTO PUNCH.HTM LABELS FOR INPUT ![]() DIMENSIONS FROM INPUT ![]() SHADED PUNCH ![]() RENDERED AS A SOLID ![]() AUTOLISP SCREW.HTM ![]() (defun kvv()(command "script" "a:\punch")) (defun tac() (defun pnch (aa bb cc dd ee ff gg kk) (setq hh 0.25 x hh) (defun thred() ;;screw thread (setq p0 (list (+(- dd ff ee)hh) 0 (/ bb 2.0))) (setq flg 't tx 0 tn (fix(/ ff x)) ij 0 tc (/ x 2.0)) (setq p3 (list (+(- dd ff ee)hh) 0 0)) (setq p4 (list (+(- dd ff ee)hh) 0 0)) (command "layer" "m" "5" "c" "4" "5" "s" "5" "") ;;(while (< ij (*(- tn 3.0)36.0))) (while flg (if (< (+ tx hh) (- dd ee))(setq flg 't)(setq flg nil)) (setq r1 (+ (/ bb 2.0) x)) (setq tx (+(- dd ff ee)hh(*(/ (+ 0.125 hh) 360.0)ij))) (setq ty (* (/ bb 2.0) (sin (*(/ ij 180.0)pi)))) (setq tz (* (/ bb 2.0) (cos (*(/ ij 180.0)pi)))) (setq p1 (list tx (* r1 (sin (*(/ ij 180.0)pi))) (* r1 (cos (*(/ ij 180.0)pi))))) (setq pl (list (- tx tc) ty tz)) (setq pr (list (+ tx tc) ty tz)) (command "3dface" p0 p1 pl p3 "") (command "3dface" p0 p1 pr p4 "") ;;(command "pline" p0 p1 "") (setq po p0 p0 p1 p3 pl p4 pr ij (+ 10 ij)) )) (print "NICK K. VAN VLIET (416) 921-4653") (setvar "aperture" 50)(setvar "blipmode" 0) (setvar "surftab1" 27)(setvar "surftab2" 40) (command "units" "2" "3" "1" "3" "0" "") (command "limits" "-200,-200" "200,200") (command "layer" "t" "*" "m" "3" "c" "3" "3" "s" "3" "") (command "erase" "c" "-200,-200" "200,200" "") (command "zoom" "-15,-15" "15,15") ;;"-2,-2" "12,12" (command "line" (list 0 (/ aa 2)) (list cc (/ aa 2)) (list cc (/ aa -2))(list 0 (/ aa -2)) "c") (setq g(- dd(+ ee ff)))(setq h(- dd ee)) (setq i 1.0000)(setq j (/ 1.0000 8.0000)) (command "line" (list g (/ bb 2)) (list h (/ bb 2)) (list h (/ bb -2)) (list g (/ bb -2)) "c") (setq r(- dd (+ cc ee ff))) (command "arc" "c" (list g (+ r (/ bb 2))) (list (- g r) (+ r (/ bb 2))) (list g (/ bb 2))) ;;(setq kvv (entget(entlast))) ;;(terpri)(princ kvv) (command "arc" "c" (list g (- (/ bb -2) r)) (list g (/ bb -2)) (list (- g r) (- (/ bb -2) r))) ;;(setq hvv (entget(entlast))) ;;(terpri)(princ hvv) (command "circle" (list (- dd gg) 0) gg) (command "line" "tan" (list (- dd gg) gg) "end" (list (- dd ee) (/ bb 2)) "") (setq kvv (entget(entlast))) (setq pnt (cdr(assoc 10 kvv))) (setq pntf (cdr(assoc 11 kvv))) ;;(terpri)(princ pnt)(terpri)(princ pntf)(terpri)(getreal "enter") (command "line" "tan" (list (- dd gg) (/ gg -1)) "end" (list (- dd ee) (/ bb -2)) "") (command "plan" "") (command "trim" "c" (list (- dd ee) (/ bb 2)) (list dd 0.1) "c" (list (- dd ee) (/ (- bb) 2)) (list (- dd) 0.1) "" (list (- dd (* 2 gg)) 0) "") (command "layer" "t" "*" "m" "1" "c" "1" "1" "") (command "line" (list (/ j -1) 0)(list (+ dd j) 0) "") (command "Change" "last" "" "prop" "lt" "center" "") (command "layer" "s" "1" "lt" "center" "1" "") (command "zoom" "e" "zoom" "0.5x") ;;1st dim vert "A" (setq ii(/ i -1))(setq jj(/ j -1)) (command "layer" "t" "*" "m" "4" "c" "4" "4" "") (command "line" (list (+ ii ii) (/ aa -2)) (list (+ ii ii) (/ aa 2)) "") (command "line" (list (+ ii ii jj) (/ aa 2)) (list jj (/ aa 2)) "") (command "line" (list (+ ii ii jj) (/ aa -2)) (list jj (/ aa -2)) "") (command "layer" "m" "2" "c" "2" "2" "s" "2" "") (command "text" (list (+ ii ii j) 0) '0.3 '0 "A%%c") ;;DIA! ;;2nd dim vert "B" (command "layer" "m" "4" "s" "4" "") (command "line" (list (+ i dd) (/ bb -2)) (list (+ i dd) (/ bb 2)) "") (command "line" (list (+ h j) (/ bb 2))(list (+ dd i j) (/ bb 2)) "") (command "line" (list (+ h j) (/ bb -2))(list (+ dd i j) (/ bb -2)) "") (command "layer" "m" "2" "s" "2" "") (command "text" (list (+ dd i j) 0) '0.3 '0 "B DIA.") ;;3rd dim hor "C" (command "layer" "s" "4" "") (command "line" (list 0 (+ (/ aa 2) i)) (list cc (+ (/ aa 2) i)) "") (command "line" (list cc (+ j (/ aa 2))) (list cc (+ i j (/ aa 2))) "") (command "layer" "s" "2" "") (command "text" (list (/ cc 2) (+ (/ aa 2) i j)) '0.3 '0 "C") ;;4th dim hor "D" (command "layer" "s" "4" "") (command "line" (list 0 (+ (/ aa 2) i i)) (list dd (+ (/ aa 2) i i)) "") (command "line" (list 0 (+ j (/ aa 2))) (list 0 (+ i i j (/ aa 2))) "") (command "line" (list dd j) (list dd (+ i i j (/ aa 2))) "") (command "layer" "s" "2" "") (command "text" (list (/ dd 2) (+ (/ aa 2) i i j)) '0.3 '0 "D") ;;5th dim hor "E" (command "layer" "s" "4" "") (command "line" (list h (+ (/ bb 2) i)) (list dd (+ (/ bb 2) i)) "") (command "line" (list h (+ j (/ bb 2))) (list h (+ i j (/ bb 2))) "") (command "layer" "s" "2" "") (command "text" (list (+ h (/ ee 2)) (+ (/ bb 2) i j)) '0.3 '0 "E") ;;6th dim hor "F" (command "layer" "s" "4" "") (command "line" (list g (+ (/ bb 2) i)) (list h (+ (/ bb 2) i)) "") (command "line" (list g (+ j (/ bb 2))) (list g (+ i j (/ bb 2))) "") (command "layer" "s" "2" "") (command "text" (list (+ g (/ ff 2)) (+ (/ bb 2) i j)) '0.3 '0 "F") ;;6th dim hor "G" (command "layer" "s" "4" "") (command "line" "perp,end" (list (- dd 0.2) 0.4) (list (+ dd ee) (+ (/ bb 2) i)) "") (setq e(entlast))(setq pnt1 (cdr(assoc 10 (entget e)))) (command "line" (list (+ dd ee) (+ (/ bb 2) i))(list (+ dd ee j) (+ (/ bb 2) i)) "") (command "layer" "s" "2" "") (command "text" (list (+ dd ee j j) (+ (/ bb 2) i (/ j -1))) '0.3 '0 "G RAD.") (setvar "dimclrt" 2)(setvar "dimclre" 4)(setvar "dimclrd" 4) ;(setvar "dimstyle" "romans") (setvar "dimtih" 0)(setvar "dimtoh" 0) (setvar "dimtad" 0)(setvar "dimdli" 1)(setvar "dimrnd" 3)(setvar "dimlim" 3) (setvar "dimtp" 0.003)(setvar "dimtm" 0.001) (if (= kk 1) (progn (setq l(getreal "Want dimentions? HOME PAGE |