+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Forum Newbie
    Using
    AutoCAD 2004
    Join Date
    Jul 2008
    Posts
    3

    Default lisp routine for 3D mitered elbows

    Registered forum members do not see this ad.

    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

  2. #2
    Forum Newbie
    Computer Details
    Red_B's Computer Details
    Operating System:
    Windows 7
    Computer:
    Dell
    Discipline
    Manufacture
    Red_B's Discipline Details
    Occupation
    Senior Designer
    Discipline
    Manufacture
    Details
    Design of hydro-carbon processing facilities. Pressure vessels etc.
    Using
    AutoCAD 2013
    Join Date
    May 2015
    Location
    Oklahoma
    Posts
    3

    Default

    ;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 CMELB (/ 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 <L>ong or <S>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)
    )

  3. #3
    Forum Newbie
    Computer Details
    Red_B's Computer Details
    Operating System:
    Windows 7
    Computer:
    Dell
    Discipline
    Manufacture
    Red_B's Discipline Details
    Occupation
    Senior Designer
    Discipline
    Manufacture
    Details
    Design of hydro-carbon processing facilities. Pressure vessels etc.
    Using
    AutoCAD 2013
    Join Date
    May 2015
    Location
    Oklahoma
    Posts
    3

    Default

    Don't know where the smiley face came from but that line is supposed to be CMELB (the letter C followed by a colon, followed by the letters "DMELB".

  4. #4
    Senior Member Spaj's Avatar
    Computer Details
    Spaj's Computer Details
    Operating System:
    Win 7
    Motherboard:
    ASUS P5K
    CPU:
    Intel E8400
    RAM:
    4096Mb
    Graphics:
    MSI Nvidia GTX660 2GB
    Primary Storage:
    OCZ RevoDrive 128GB
    Secondary Storage:
    WD Black 1TB
    Monitor:
    Samsung 27" LCD
    Discipline
    Civil
    Using
    AutoCAD 2013
    Join Date
    Oct 2013
    Location
    SA
    Posts
    110

    Default

    Registered forum members do not see this ad.

    Howdy

    Maybe read the posting guides http://www.cadtutor.net/forum/showth...or-new-members. Hint try the #...

Similar Threads

  1. Looking for a LISP routine...
    By tzframpton in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 6th Aug 2013, 01:54 pm
  2. m2s lisp routine
    By neilma in forum AutoCAD 3D Modelling & Rendering
    Replies: 19
    Last Post: 30th Sep 2010, 04:14 pm
  3. Ductwork Lisp Round to Square Elbows
    By crimhoff in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 2nd Mar 2008, 09:27 am
  4. I need a lisp routine
    By Andrew in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 28th Apr 2007, 02:57 pm
  5. Run a LISP ROUTINE
    By CADken in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 9th Aug 2006, 12:02 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts