Mark Eiberg Posted July 16, 2008 Posted July 16, 2008 Does anybody know how to make a 3D mitered or 2D mitered elbow with a lisp routine.Would you share the lisp routine.I use auto-cad 2004 Quote
Red_B Posted May 28, 2015 Posted May 28, 2015 ;3D HOLLOW DOUBLE MITER ELBOW ;CREATS P-LINE & EXTRACTS ;NOT FOR SMALLER PIPE SIZES WITH FRACTIONAL OUTSIDE DIAMETERS (defun dtr (a) (* pi(/ a 180.0)) ) (defun C:DMELB (/ dia thk len p1 p2 p3 p4 com en1 en2 en3 en4) (setq dia(getdist "\nEnter pipe O.D.: ") thk(getdist "\nEnter wall thickness: ")) (initget 1 "L S") (setq len(strcase(getkword "\nEnter ong or hort radius: "))) (if(= len "L") (setq len(* dia 0.62132034)) (setq len(* dia 0.41421356)) ) (setq p1(getpoint "\nPick starting endpoint for Double Mitre Elbow: ")) (setq p2(polar p1 (dtr 90) len)) (setq p3(polar p2 (dtr 135) (* len 2.0))) (setq p4(polar p3 (dtr 180) len)) (setq comode(getvar "osmode")) (setvar "osmode" 0) (command "pline" p1 p2 p3 p4 "") (setq en1 (entlast)) (command "ucs" "za" p1 p2) (command "_.circle" "0,0,0" "d" dia p2) (setq en2 (entlast)) (command "._region" en2 "") (setq en2 (entlast)) (command "_.circle" "0,0,0" "d" (- dia (* thk 2.0)) p2) (setq en3 (entlast)) (command "_.region" en3 "") (setq en3 (entlast)) (command "subtract" en2 "" en3 "") (setq en4 (entlast)) (command "_.extrude" en4 "" "p" en1 "") (setq en4 (entlast)) (command "ucs" "P") (setvar "osmode" comode) (command "rotate" en4 "" p1 pause) (princ) ) Quote
Red_B Posted May 28, 2015 Posted May 28, 2015 Don't know where the smiley face came from but that line is supposed to be C:DMELB (the letter C followed by a colon, followed by the letters "DMELB". Quote
Spaj Posted May 29, 2015 Posted May 29, 2015 Howdy Maybe read the posting guides http://www.cadtutor.net/forum/showthread.php?56184-Information-for-new-members. Hint try the #... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.