|
View previous topic :: View next topic
|
| Author |
Message |
tagi_u
Joined: 24 Jul 2005 Posts: 2
|
Posted: Sun Jul 24, 2005 7:15 pm Post subject: 3D spring with Autocad |
    |
|
| wonder if anyone can brief me on how to draw a 3D spring using autocad. |
|
| Back to top |
|
 |
lbrown
Joined: 28 Jul 2005 Posts: 1
|
Posted: Thu Jul 28, 2005 11:28 am Post subject: 3dspring |
    |
|
| Did anyone ever reply to your post? I can help. |
|
| Back to top |
|
 |
Kevin Site Admin

Joined: 13 Apr 2004 Posts: 1138 Location: Eugene, Oregon
|
Posted: Thu Jul 28, 2005 12:31 pm Post subject: |
    |
|
| lbrown, I think you're it! Help appreciated. |
|
| Back to top |
|
 |
tagi_u
Joined: 24 Jul 2005 Posts: 2
|
Posted: Sun Jul 31, 2005 9:29 pm Post subject: 3D spring with AutoCAD |
    |
|
| lbrown..would be glad for any informations regarding the subject. So far no one has solved this problem. u can use my email. |
|
| Back to top |
|
 |
pathankotia
Joined: 10 Aug 2005 Posts: 4
|
Posted: Wed Aug 10, 2005 2:22 pm Post subject: |
    |
|
i wonder if u have got as solution yet.
i can surely help u let me know via my email and i can provide u with wonderful lisp routine for generating spring qutomatically
enjoy |
|
| Back to top |
|
 |
pathankotia
Joined: 10 Aug 2005 Posts: 4
|
Posted: Sun Aug 21, 2005 12:25 pm Post subject: |
    |
|
try doing this..... may be i can explain using words only... all u have to do is to draw a helical path. and that is some what tidious to do.
1. draw a circle of any radius in top view
2. draw a line starting form the centre to any quardarent of the circle.
3. now array this line with centre of the circle as centre and and number of objects lets say.......12
4. now draw a line in side view starting from the centre of the circle with a length equal to 24 mm
5. now view the object in isometric view.
6. now move all the lines (that we arrayed in step no 3.) through the line drawn in step no 4. at regular intervals of 2 mm.
(please be sure that position of the ucs is in side view.)
7. now u can c a helical stair case like object on screen.
8. now draw a spline using expernal endpoints of the lines which will give u a helix.
9. this helix can be converted in to 3d polyline and then used as path for extruding any cross section.
let me know abt it
enjoy |
|
| Back to top |
|
 |
pathankotia
Joined: 10 Aug 2005 Posts: 4
|
Posted: Sun Aug 21, 2005 12:52 pm Post subject: |
    |
|
i am back with permanent solution.
if u know to work with lisp files then load this file in ur autocad and type "3s" at command prompt and c the wonder.
here is the lisp file that generate cdspiral
let me know
(defun myerror (s) ; If an error (such as CTRL-C) occurs while this command is active...
(if (/= s "Function cancelled")
(princ (strcat "\nError: " s))
)
(setvar "cmdecho" ocmd) ; Restore saved modes
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ)
)
(defun cspiral (ntimes bpoint hfac lppass strad vfac / ang dist tp ainc dhinc dvinc circle dv)
(setvar "blipmode" 0) ; turn blipmode off
(setvar "cmdecho" 0) ; turn cmdecho off
(setq circle (* 3.141596235 2))
(setq ainc (/ circle lppass))
(setq dhinc (/ hfac lppass))
(if vfac (setq dvinc (/ vfac lppass)))
(setq ang 0.0)
(if vfac
(setq dist strad dv 0.0)
(setq dist 0.0)
)
(if vfac
(command "_3dpoly") ; start spiral ...
(command "_pline" bpoint) ; start spiral from ;base point and...
)
(repeat ntimes
;;;
;;; section of revised code
(if (= ntimes 1) ; if the number of
;rotations is 1
(repeat (1+ lppass) ; then calculate points ;one extra time to allow
; for the missing polyline segment at the end of
; the rotation
(setq tp (polar bpoint (setq ang (+ ang ainc))
(setq dist (+ dist dhinc))
)
)
(if vfac
(setq tp (list (car tp) (cadr tp) (+ dv (caddr tp)))
dv (+ dv dvinc)
)
)
(command tp) ; continue to the next point...
);close inner repeat
;;;
;otherwise
(repeat lppass
(setq tp (polar bpoint (setq ang (+ ang ainc))
(setq dist (+ dist dhinc))
)
)
(if vfac
(setq tp (list (car tp) (cadr tp) (+ dv (caddr tp)))
dv (+ dv dvinc)
)
)
(command tp) ; continue to the next point...
);close inner repeat
);close if
);close main repeat
(command "") ; until done.
(princ)
);close defun
;;;
;;; Interactive spiral generation
;;;
(defun C:SPIRAL (/ olderr ocmd oblp nt bp cf lp)
(command ".undo" "group")
(setq olderr *error*
*error* myerror)
(setq ocmd (getvar "cmdecho"))
(setq oblp (getvar "blipmode"))
(setvar "cmdecho" 0)
(initget 1) ; bp must not be null
(setq bp (getpoint "\nCenter point: "))
(initget 7) ; nt must not be zero, neg, or null
(setq nt (getint "\nNumber of rotations: "))
(initget 3) ; cf must not be zero, or null
(setq cf (getdist "\nGrowth per rotation: "))
(initget 6) ; lp must not be zero or neg
(setq lp (getint "\nPoints per rotation <30>: "))
(cond ((null lp) (setq lp 30)))
(cspiral nt bp cf lp nil nil)
(setvar "cmdecho" ocmd)
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ)
(command ".undo" "end")
)
;;;
;;; Interactive spiral generation
;;;
(defun C:3DSPIRAL (/ olderr ocmd oblp nt bp hg vg sr lp)
(command ".undo" "group")
(setq olderr *error*
*error* myerror)
(setq ocmd (getvar "cmdecho"))
(setq oblp (getvar "blipmode"))
(setvar "cmdecho" 0)
(initget 1) ; bp must not be null
(setq bp (getpoint "\nCenter point: "))
(initget 7) ; nt must not be zero, neg, or null
(setq nt (getint "\nNumber of rotations: "))
(initget 7) ; sr must not be zero, neg, or null
(setq sr (getdist bp "\nStarting radius: "))
(initget 1) ; cf must not be zero, or null
(setq hg (getdist "\nHorizontal growth per rotation: "))
(initget 3) ; cf must not be zero, or null
(setq vg (getdist "\nVertical growth per rotation: "))
(initget 6) ; lp must not be zero or neg
(setq lp (getint "\nPoints per rotation <30>: "))
(cond ((null lp) (setq lp 30)))
(cspiral nt bp hg lp sr vg)
(setvar "cmdecho" ocmd)
(setvar "blipmode" oblp)
(setq *error* olderr) ; Restore old *error* handler
(princ)
(command ".undo" "end")
)
(defun C:3s ()
(C:3dspiral))
;;;
(princ "\n\tC:SPIRAL and C:3DSPIRAL loaded. ")
(princ "\n\tStart 3DSPIRAL command with 3S")
(princ)
enjoy  |
|
| Back to top |
|
 |
rogerlagarde
Joined: 28 Aug 2005 Posts: 1
|
Posted: Sun Aug 28, 2005 6:44 am Post subject: |
    |
|
i'm new, this is my first post... this is also my problem  |
|
| Back to top |
|
 |
|