Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACME THREAD

Status
Not open for further replies.

Judge

Mechanical
Joined
Oct 12, 2002
Messages
34
Location
AU
How do I draw a helix (e.g. ACME thread)Solid model with AutoCAD 2000
Judge
 
Judge,

I know that a helix LISP routine exists out there. Maybe you can use that to create the 3d helical path and then use that to extrude the shapes you need to create the ACME thread. I've used that lisp routine a long time ago and can't remember where I got it. I have since lost it. Search the net. Hope this gives you some help.
 
Dear Judge,
The following autolisp program adds a coomand named "H3" to drawing session. It requests you the center, radius, pitche, no. of revolutions, and no. of steps in each revolution to create a 3d helix. If you use the created 3dpoliline as an extrusion path, it will rotate the section around the path. So it is suitable for circular sections. To create 3d helical models with non-circular sections, you have to use the Autodesk Mechanical Desktop or some other parametric modeling applications.


(defun C:h3(/ c r p n nr ps pb pe Beta dBeta z dz vertex )
(setq c (getpoint "\n Center : "))
(setq r (getdist c "\n Radius : "))
(setq p (getdist "\n Pitch : "))
(setq n (getreal "\n No. of revolutions : "))
(setq nr (getint "\n No. of steps in each round : "))
(setq ps '((0 . "POLYLINE") (100 . "AcDbEntity") (67 . 0) (100 . "AcDb3dPolyline") (66 . 1) (10 0.0 0.0 0.0) (70 . 8) (40 . 0.0) (41 . 0.0) (210 0.0 0.0 1.0) (71 . 0) (72 . 0) (73 . 0) (74 . 0) (75 . 0)))
(setq pb '((0 . "VERTEX") (100 . "AcDbEntity") (67 . 0) (100 . "AcDbVertex") (100 . "AcDb3dPolylineVertex") (10 0.0 0.0 0.0) (40 . 0.0) (41 . 0.0) (42 . 0.0) (70 . 32) (50 . 0.0) (71 . 0) (72 . 0) (73 . 0) (74 . 0)))
(setq pe '((0 . "SEQEND")))
(entmake ps)
(setq z 0.0)
(setq dz (/ p nr))
(setq dBeta (/ (* 2 pi) nr))
(setq Beta 0.0)
(while (<= Beta (* n (* 2 pi)))
(setq vertex (list (+ (car c) (* r (cos Beta)))
(+ (cadr c) (* r (sin Beta)))
(+ (caddr c) z)
)
)
(setq pb (subst (append '(10) vertex) (assoc 10 pb) pb))
(entmake pb)
(setq z (+ z dz))
(setq Beta (+ Beta dBeta))
)
(entmake pe)
(princ)
)


:)
Farzad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top