+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    laddo
    Guest

    Default Metric Thread Lisp

    Registered forum members do not see this ad.

    Does anybody know of a lisp to draw a 3D metric thread? I downloaded one for Imperial threads from another part of the forum but we work in Metric over here in england!!!!

  2. #2
    Administrator CADTutor's Avatar
    Computer Details
    CADTutor's Computer Details
    Operating System:
    Windows 7 Home Premium 64bit
    Motherboard:
    Asus P7P55D-E PRO
    CPU:
    Intel Core i7-860
    RAM:
    4GB PC3-12800 C8 Corsair Dominator
    Graphics:
    NVIDIA Quadro FX 1800 768 MB
    Primary Storage:
    Intel X25-M SSD 160GB
    Secondary Storage:
    Samsung Spinpoint 320GB
    Monitor:
    BenQ FP241W 24" Wide
    Discipline
    Education
    CADTutor's Discipline Details
    Occupation
    Senior Lecturer (Digital Design), Landscape Architect & Web Designer
    Discipline
    Education
    Using
    AutoCAD 2014
    Join Date
    Aug 2002
    Location
    Hampshire, UK
    Posts
    3,606

    Default

    Well, you could always draw it yourself in metric.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
    AutoCAD Tutorials | How to add images to your posts | How to register successfully | Forum FAQ

  3. #3
    laddo
    Guest

    Default

    Work in Metric and are generally lazy!!!!!! Thanks for the link I'll have a go. A lisp would be much quicker though!!!!!

  4. #4
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default

    You can draw the thread as surfaces using the HELSURF routine. I admit that surfaces are hard to manipulate but this is the way I used to create my screws for rendering purposes. Follow the link above and scroll down to see a sample.
    An advice: don't use real like threads in your drawings if you don't have to.
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

  5. #5
    Senior Member Cadastrophic's Avatar
    Using
    not specified
    Join Date
    Dec 2002
    Location
    Australia
    Posts
    152

    Default

    Quote Originally Posted by CADTutor
    Well, you could always draw it yourself in metric.
    I just tried this tutorial to draw a M18 thread. First of all, following the tutorial exactly, it produces a left hand thread. This is easily remedied afterwards by mirroring the solid, though it could be ammended by reversing the direction of the tutorial.
    Secondly, I'm not clever enough to see what's going on, but it appears to produce a twin thread rather than a single helix. Unless of course I went wrong at some step in the tutorial. It certainly doeant look like other solid thread models I have.
    I'm going to try it again to make a 3/4" UNF thread.
    I'm sure you said "Hurry up and DELETE your work".

    AutoCAD 2004, Inventor 8.
    AMD Athlon 64 FX-55, 3GB RAM, NVIDIA Quadro4 980XGL, Windows XP Pro.

  6. #6
    Senior Member Adesu's Avatar
    Using
    AutoCAD 2005
    Join Date
    Feb 2004
    Location
    Indonesia-Tangerang
    Posts
    158

    Default Re: Metric Thread Lisp

    Quote Originally Posted by laddo
    Does anybody know of a lisp to draw a 3D metric thread? I downloaded one for Imperial threads from another part of the forum but we work in Metric over here in england!!!!
    here I have file for metric thread lsp,maybe you can adopt,this file I've got from forum.

    Code:
    ;-------------------------------------------------------------------
    ; THREAD.LSP   Creates 3D solid (ACIS) threads.          3/3/98
    ;
    ; Corrected  3/4/98
    ; Corrected again 3/6/98
    ;
    ;                                       written by: Jim Fitzgerald
    ;
    ; Credit goes to Bernd Hoffmann and Ken Shearron for showing
    ; me this modeling technique and helping me spot
    ; some bugs.
    ;
    ;-------------------------------------------------------------------
    ;
    ; This is a way to make 3D solid external threads in
    ; AutoCAD R13 and R14. Just so you know, it's not
    ; geometrically correct, but it's pretty darn close.
    ; There is no error trapping or anything like that.
    ;
    ; You are prompted for the Nominal thread size
    ; (actual size like .190 or .112, not #10, #4, etc..),
    ; threads per inch (tpi), the total length of the thread, and a
    ; center point. The program works by creating a single thread
    ; and then arraying it out to the proper length. The threads are
    ; drawn a little long and then sliced off to the correct length.
    ; This program only draws the thread, you're on your own drawing
    ; the rest of the screw. For internal threads, just subtract this from
    ; another solid.
    ;
    ; Note, the threads created by this can make for some rather big files,
    ; so make sure your system is up to it. Also, it might take a while
    ; to union all of the single threads together so be patient.
    ;
    ;-------------------------------------------------------------------
    ; This is freeware. Do what you want with it. If you modify it,
    ; please take my name off of it so I don't have to support your
    ; software.
    ;
    ; All the typical legal stuff applies. I make no claims that
    ; this actually works. Use it at your own risk. You can't sue me
    ; for any problems that you have as a result of using this
    ; (either personal or professional). Don't drink and
    ; drive. Eat your vegetables, and call your mother.
    ;-------------------------------------------------------------------
    
    (defun c:thread ( / nom pitch len cpt total pt1 pt1z pt2 pt3 ang pt1a
    pt1az pt3a pt1b pt1bz pt3b pt4 pt4 pt6 pt7 pt8 pt9 pt10 pt11 pt12 ss
    osm)
    
       ;-------------------------------------------------------------------
       ; Gets the nominal size, tpi, and total length
       ; then calculates a bunch of geometry points.
       ; All running osnaps are turned off as well.
       ;-------------------------------------------------------------------
    
       (setq nom (getdist "\nNominal size: ")
          pitch (/ 1.0 (getreal "\nThreads per Inch: "))
          len (getdist "\nTotal thread length: ")
          cpt (getpoint "Center point: ")
          total (+ (fix (/ len pitch)) 2)
          pt1 (list (- (car cpt) (/ nom 2.0)) (cadr cpt))
          pt1z (list (- (car cpt) (/ nom 2.0)) (cadr cpt) 1.0)
          pt2 (polar pt1 (/ (* 30.0 pi) 180.0) 0.1)
          pt3 (list (+ (car pt1) nom) (+ (cadr pt1) (/ pitch 2.0)))
          ang (angle pt1 pt3)
          pt1a (polar pt1 (+ ang (/ pi 2.0)) pitch)
          pt1az (list (car pt1a) (cadr pt1a) 1.0)
          pt3a (polar pt1a ang nom)
          pt1b (polar pt1 (- ang (/ pi 2.0)) pitch)
          pt1bz (list (car pt1b) (cadr pt1b) 1.0)
          pt3b (polar pt1b ang nom)
          pt4 (polar pt3 (/ (* 150.0 pi) 180.0) 0.1)
          pt5 (inters pt1 pt2 pt3 pt4 nil)
          pt6 (list (car pt5) (cadr cpt))
          pt7 (polar pt1 (/ (* 330.0 pi) 180.0) 0.1)
          pt8 (polar pt3 (/ (* 210.0 pi) 180.0) 0.1)
          pt9 (inters pt1 pt7 pt3 pt8 nil)
          pt10 (list (car pt9) (cadr pt3))
          pt11 (polar cpt (/ pi 2.0) pitch)
          pt12 (polar pt11 (/ pi 2.0) len)
          osm (getvar "osmode")
       )
       (setvar "osmode" 0)
    
       ;-------------------------------------------------------------------
       ; Draws two cones which are inverted and offset 1/2 the pitch.
       ; The cones are each sliced at the angle of the crest line
       ; and then unioned together
       ;-------------------------------------------------------------------
    
       (princ "\nCreating thread...this might take a while.")
       (command "pline" pt1 pt5 pt6 "c")
       (command "revolve" "l" "" pt5 pt6 "")
       (command "slice" "l" "" pt1 pt3 pt1z pt5)
       (command "slice" "l" "" pt1a pt3a pt1az pt3)
       (setq ss (ssadd (entlast)))
       (command "pline" pt3 pt9 pt10 "c")
       (command "revolve" "l" "" pt9 pt10 "")
       (command "slice" "l" "" pt1 pt3 pt1z pt9)
       (command "slice" "l" "" pt1b pt3b pt1bz pt3)
       (setq ss (ssadd (entlast) ss))
       (command "union" ss "")
    
       ;-------------------------------------------------------------------
       ; This above solid is sliced in half and then mirrored. This
       ; creates the "helix" in the thread. The height of the single
       ; thread is actually equal to twice the pitch, but the
       ; excess is either absorbed or cut off in the last step
       ;-------------------------------------------------------------------
    
       (command "slice" ss "" "xy" cpt "b")
       (setq ss (ssadd (entlast) ss))
       &#40;command "mirror" "l" "" pt1 "@10<0" "y"&#41;
       &#40;command "union" ss ""&#41;
    
       ;-------------------------------------------------------------------
       ; The thread is arrayed and then unioned together &#40;this part can
       ; take a while&#41;. The resulting solid is cut to the specified length.
       ;-------------------------------------------------------------------
    
       &#40;setq e &#40;entlast&#41;&#41;
       &#40;command "array" ss "" "r" total 1 pitch&#41;
       &#40;repeat &#40;1- total&#41;
          &#40;setq e &#40;entnext e&#41;
             ss &#40;ssadd e ss&#41;
          &#41;
       &#41;
       &#40;command "union" ss ""&#41;
       &#40;command "slice" "l" "" "zx" pt11 pt12&#41;
       &#40;command "slice" "l" "" "zx" pt12 pt11&#41;
       &#40;princ "\nDone"&#41;
       &#40;setvar "osmode" osm&#41;
       &#40;princ&#41;
    &#41;

  7. #7
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    4

    Default

    Thanks for the help-Greville

  8. #8
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Sep 2007
    Posts
    2

    Default

    Quote Originally Posted by Adesu View Post
    here I have file for metric thread lsp,maybe you can adopt,this file I've got from forum.
    thank you very much buddy... it helped me a lot... (made my work a LOT simple)... thanx again to the original writers...

  9. #9
    Forum Newbie
    Using
    Inventor 2008
    Join Date
    Apr 2008
    Location
    Michigan USA
    Posts
    2

    Default 3D Metric Threads

    Registered forum members do not see this ad.

    This lisp file creates 3D threads in inches. Is there a version that creates them for metric threads?

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