fuccaro Posted January 6, 2003 Share Posted January 6, 2003 I received some requests like: "I wish to draw a helix. I find this forum with Lisp routines. How next?" Here are more ways to load lisp routines. For beginners I recommend to fallow this few steps: 1. Open the Notepad on your computer 2. Select (highlight) the program lines in your browser. Press CTR+C to copy it to clipboard. 3. Return to Notepad and press CTR+V to insert the text. 4. Save the file as AnyName.LSP -extension is important 5. Close Notepad and open a new drawing in AutoCAD 6. To load the application in AutoCAD use any of the following methods: - At the Command prompt, type APPLOAD. In the opened new window, navigate until you find the file you just saved. Select it, then press LOAD and CLOSE. - On the TOOLS menu, choose LOAD APPLICATION. Than you continue like above. - Drag the AnyName.LSP programs icon over the AutoCAD window 7. Check the command line (press F2 if necessaries). You will see something like Command: (LOAD "C:/ My Documents/autolisp/AnyName.lsp") C:HELIX1 8. Retain the last word (HELIX1, in this case). It's the name of a new function you may call any time during this session, in this drawing 9. Type this name at the Command prompt. Enter the radius, height etc. as you are prompted. And now it's my turn to ask: somebody please tells me why (almost) anybody wants to draw a helix? Quote Link to comment Share on other sites More sharing options...
Guest superjari Posted January 6, 2003 Share Posted January 6, 2003 Let's say you want to make a round staircase and want a rail, you need a helix... Quote Link to comment Share on other sites More sharing options...
fuccaro Posted January 7, 2003 Share Posted January 7, 2003 Here is a Lisp routine I wrote to draw a spring. The new thing is the possibility to control the diameter and the pitch in each point. Before call the routine, you will need to make some preparations. So, draw the axis of the helix: a horizontal line from (0,0) to right, as long as the helix length is (the green line in the next image). Draw a polyline over this axis (over means greater Y coords). I named this pline "radius poly", is the envelope of the helix (the red pline). Under the axis (Y Now you may type SPR and answer as you are prompted. In the next image I marked with p1...p5 the answers I give to generate the example in the image above. A final advice: the drawing area used by this routine must be clean, work on a new layer and turn off the others. (if the images are missing from here, you may find them on my web page http://fuccaro.netfirms.com Sorry, problems with my web host) (defun distance (r pol) (setvar "osmode" 0) (command "._line" (list z 0) (list z r) "") (setvar "osmode" 1) (command "._trim" pol "" (list z r) "") (setq ent (entget (entlast))) (entdel (entlast)) (abs (caddr (assoc 11 ent))) ) (defun C:Spr() (setvar "cmdecho" 0) (setq hm (getdist (list 0 0 0) "\nhelix axis endpoint")) (setq rpol (entsel "\nselect radius polyline")) (setq rm (* 1.1 (cadr (getpoint "\ntop of radius poly")))) (setq dpol (entsel "\nselect axial pitch polyline")) (setq pm (* 1.1 (cadr (getpoint "\nbottom of pitch poly")))) (command "._plan" "") (setq poi (getreal "\nsegments/turn? (3...100)")) (command "._zoom" "w" (list -1 pm) (list (+ 2 hm) rm)) (setq coords nil) (setq alpha1 (/ (* 2 PI) poi)) (setq z 0 alp 0) (setq old (getvar "osmode")) (while (<= z hm) (setq r0 (distance rm rpol) d0 (distance pm dpol) x (* r0 (sin alp)) y (* r0 (cos alp)) z (+ z (/ d0 poi))) (setq point (list z y x)) (setq coords (cons point coords)) (setq alp (+ alp alpha1)) ) ;while (setvar "osmode" 0) (command "._3dpoly") (foreach point coords (command point)) (command "") (command "._zoom" "w" (list 0 (- 0 rm)) (list hm rm)) (setvar "osmode" old) (setvar "cmdecho" 1) ) Quote Link to comment Share on other sites More sharing options...
Mr T Posted January 10, 2003 Share Posted January 10, 2003 Here is a nother tutorial/lisp http://www.cadalyst.com/solutions/alispsols/0602als/0602als.htm Nick Quote Link to comment Share on other sites More sharing options...
Orbit Posted March 9, 2003 Share Posted March 9, 2003 Here I go again. I have a dream about a spiral and am struggling to make it reality. So far, unsuccesful. Resumee: Using: autocad 2002 Target: spiral Experience:- with Fuccaros help I taught how to use lisp rutines. - used few lisps for spring/ spiral, including the Fuccaros, Davids and Nicks suggestions ( ref. to sites). - i could see that in all the cases my spiral is flat ( in the same plan and the possiblity to extrude an object on it is not available, of course). Rolling eyes:- what am I doing wrong or what am I missing? For sure I am missing something important. Thank you for your support and advice Quote Link to comment Share on other sites More sharing options...
tlyall Posted May 15, 2004 Share Posted May 15, 2004 Hey Fuccaro.. O' wise lisp GURU...lol Excellent routine this is... here THE ORIGINAL HELIX very useful... Problem is I do alot of 3- solid mechanicals and I always have to fudge the threads so that they look somewhat correct. I know there are some other great lisps out there for threads, but I was wondering if this one can be altered to accept other shape. Can the initial HELIX routine be altered so that more than a circle can be used to extrude along the path? If so.. this would make creating threads a snap! YOU DO GREAT WORK MAN Quote Link to comment Share on other sites More sharing options...
fuccaro Posted May 15, 2004 Share Posted May 15, 2004 Try the HELSURF... or maybe the SPIREX? Quote Link to comment Share on other sites More sharing options...
hyposmurf Posted May 15, 2004 Share Posted May 15, 2004 Here is a nother tutorial/lisp http://www.cadalyst.com/solutions/alispsols/0602als/0602als.htm Nick Your link isnt working Mr T.There are many Cadalyst tutorials on that site that bring up the same page cannot be found Quote Link to comment Share on other sites More sharing options...
tlyall Posted May 15, 2004 Share Posted May 15, 2004 Try the HELSURF... or maybe the SPIREX? Thanks Fuccaro... I tried the helsurf, not bad I must say... Problem is it is a mesh... really need a solid lisp. I am still searching the web for the spirex lisp... not much luck yet though. Thannks again for your time. Quote Link to comment Share on other sites More sharing options...
CADTutor Posted May 15, 2004 Author Share Posted May 15, 2004 The spirex lisp is here. Shortly to make it to the lisp archive. Quote Link to comment Share on other sites More sharing options...
tlyall Posted May 16, 2004 Share Posted May 16, 2004 Excellent!... Thanks David, I'll give it a shot probably tomorrow morning. Thanks again! Quote Link to comment Share on other sites More sharing options...
Guest sada nada Posted May 28, 2004 Share Posted May 28, 2004 thank u for every thing it was avery nice descation & helpful Im sorry that Im impoor in that descation one more Q. whats the deffrince between code and commend? thnks to all Quote Link to comment Share on other sites More sharing options...
Guest gid Posted March 15, 2005 Share Posted March 15, 2005 Excellent routine this is... here THE ORIGINAL HELIX very useful... I manage to get the wire frame but could not extrude it, any idea ? refering to http://www.cadtutor.net/forum/viewtopic.php?t=1463, Quote Link to comment Share on other sites More sharing options...
Guest alanie88 Posted July 20, 2005 Share Posted July 20, 2005 hi all, i already uploaded the helix.lisp and it works, thanks! this is to mr. fucarro, how do you make a screw, like the one you posted in this forum. i already made a sample screw but its thread doesn't look like the one you posted... thanks alanie Quote Link to comment Share on other sites More sharing options...
fuccaro Posted July 23, 2005 Share Posted July 23, 2005 The HELSURF lisp is for cylindrical things like threads. I used a modified form to construct a conical end. Quote Link to comment Share on other sites More sharing options...
LihtiumOverdosE Posted August 18, 2005 Share Posted August 18, 2005 I am not welll versed in Lisp and I have a specific need to make an equiangular conical spiral. All of the Lisp scripts I've found are made to generate Archimedean conical spirals but not the logarithmic ones. Is there a simple way to rewrite helix.lsp to produce equiangular conical spirals? Quote Link to comment Share on other sites More sharing options...
Dommy2Hotty Posted August 18, 2005 Share Posted August 18, 2005 woah...35 posts....20,000+ views! Quote Link to comment Share on other sites More sharing options...
Guest SV1 Posted August 19, 2005 Share Posted August 19, 2005 Hi. I am a bit new to all this so i hope this is the correct way to post. I am very interested in the helsurf lisp, i have managed to copy/save etc but when i try to load and run it i get this message in the text window. Command: _appload helsurf.lsp successfully loaded. Command: ; error: bad character read (octal): 21 any help would be much appreciated. thanks Neil Quote Link to comment Share on other sites More sharing options...
fuccaro Posted August 24, 2005 Share Posted August 24, 2005 LihtiumOverdosE Please post here more details about what you need. SV1 Read HERE Use Notepad, not Wordpad or other programs. Good luck! Quote Link to comment Share on other sites More sharing options...
LihtiumOverdosE Posted August 24, 2005 Share Posted August 24, 2005 @fuccaro I am doing a work on equiangular spiral conical antennas. I need a lisp routine pretty much simillar to the existing helix routines except that it should calculate points for equiangular helix and not for archimedean one. All of the input parameters can be pretty much the same except that one should not specify pitch since it will be variable because of the fixed angle. Now as you may have known there are a two most common types of spirals Archimedean and logarithmic. The logarithmic spiral can be distinguished from the Archimedean spiral by the fact that the distances between the arms of a logarithmic spiral increase in geometric progression, while in an Archimedean spiral these distances are constant. So, the main difference between those two are in the way points are calculated. You can find more info on logarithmic spirals here: http://en.wikipedia.org/wiki/Logarithmic_spiral and on logarithmic conical helixes http://www.mathematische-basteleien.de/spiral.htm As for example of the commercial conical log spiral antennas http://www.ets-lindgren.com/pdf/Ant8.pdf TIA for any help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.