×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

springs

springs

springs

(OP)
How to draw springs in autocad?, How to write a vlisp program in acad to draw a spring?

RE: springs

Look at this post
Thread555-13480 link to  the lisp file returns an error
use this link
http://www.cadenceweb.com/
Then under downloads click on code archive navigate to 1997
then select the month of October. this will have the code you need to create a spring. It's actually a heilicoil lisp
but basiclly the same thing
Good luck

RE: springs

Try this one

It not mine, I got from By Scott Hull at CADALOG.

http://www.cadalog.com

(defun C:SPIRAL (/ #ANG #ANG-DT #ANG-TAN #COILS
 #DIA #LST #OSMODE #PITCH #PT #PT-0 #PT-1 #RAD
 #RES #SEGS #TAN-0 #TAN-1 #Z #Z-DT #Z-END
 #Z-TAN *error*)

 (defun *error* (%A)
  (if #OSMODE
   (setvar "osmode" #OSMODE))
  (cond
   ((= %A "Function cancelled") nil)
   (t (princ (strcat "\nerror: " %A "\007\n"))))
  (princ))

 (if (not V:SPIRAL-DIA)
  (setq V:SPIRAL-DIA 1.0))
 (initget 6)
 (setq #DIA (getreal
  (strcat "\nDiameter <" (rtos V:SPIRAL-DIA) ">: ")))
 (if (not #DIA)
  (setq #DIA V:SPIRAL-DIA)
  (setq V:SPIRAL-DIA #DIA))
 (if (not V:SPIRAL-PITCH)
  (setq V:SPIRAL-PITCH 0.25))
 (initget 6)
 (setq #PITCH (getreal
  (strcat "\nPitch <" (rtos V:SPIRAL-PITCH) ">: ")))
 (if (not #PITCH)
  (setq #PITCH V:SPIRAL-PITCH)
  (setq V:SPIRAL-PITCH #PITCH))
 (if (not V:SPIRAL-COILS)
  (setq V:SPIRAL-COILS 8))
 (initget 6)
 (setq #COILS (getint
  (strcat "\nNumber of coils <" (itoa V:SPIRAL-COILS) ">: ")))
 (if (not #COILS)
  (setq #COILS V:SPIRAL-COILS)
  (setq V:SPIRAL-COILS #COILS))
 (initget 1)
 (setq #PT-0 (getpoint "\nCenterpoint: ")
       #RES 16
       #RAD (* #DIA 0.5)
       #ANG-DT (/ (* 2 pi) #RES)
       #ANG 0.0
       #SEGS (* #COILS #RES)
       #Z-DT (/ #PITCH #RES)
       #Z 0.0)
 (repeat #SEGS
  (setq #PT-1 (polar #PT-0 #ANG #RAD)
        #PT-1 (list (car #PT-1)
                    (cadr #PT-1)
                    (+ (caddr #PT-1) #Z))
        #LST (cons #PT-1 #LST)
        #ANG (+ #ANG #ANG-DT)
        #Z (+ #Z #Z-DT)))
 (setq #LST (reverse #LST)
       #ANG-TAN (/ pi 500)
       #Z-TAN (* 0.001 #PITCH)
       #TAN-0 (polar #PT-0 (- #ANG-TAN) #RAD)
       #TAN-0 (list (car #TAN-0)
                    (cadr #TAN-0)
                    (- (caddr #TAN-0) #Z-TAN))
       #Z-END (caddr (last #LST))
       #TAN-1 (polar #PT-0 #ANG-TAN #RAD)
       #TAN-1 (list (car #TAN-1)
                    (cadr #TAN-1)
                    (+ #Z-END #Z-TAN)))
 (setq #OSMODE (getvar "osmode"))
 (setvar "osmode" 0)
 (setvar "cmdecho" 0)
 (command "_.spline")
 (foreach #PT #LST (command #PT))
 (command "" #TAN-0 #TAN-1)
 (setvar "osmode" #OSMODE)
 (princ))

Feel free to contact me I'm working on spirals.

You can reach me at k281969@hotmail.com
but keep your post here for mutual benefits.
Pardal

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources