PDA

View Full Version : Get your Helix here!



CADTutor
17th Sep 2002, 12:54 pm
I copy here a message from fuccaro that I rescued from the old message board. This is so useful that I thought it would be great to kick-off this new AutoLISP board.


I send you a short Lisp program to draw a helix. Deleting the line I marked you will get just a helix, but in my opinion, the final line help to put the shape to extrude in right position. For more help, you find me at mfuccaro@hotmail.com

Best luck!

And here is the program



(defun C:Helix1()
(setq nr 30);segments
(setq fi (/ (* 2 PI) nr) i 0)
(setq r (getreal "Radius of helix "))
(setq p (getreal "elevation "))
(setq old (getvar "osmode"))
(command "3dpoly")
(repeat (+ nr 1) (setq x (* r (sin (* i fi)))
y (* r (cos (* i fi)))
z (* i (/ p nr))
)
(command (list x y z))
(setq i (1+ i))
)
(command (list x y (+ z 10)));delete?
(command "")
(setvar "osmode" old)
)


David

fuccaro
11th Nov 2002, 09:49 pm
I vas announced by e-mail, that the lisp program above works fine only if OSNAP is OFF. Is true, please excuse me, but I simplified too much the program, trying to make it short. After the line
(setq old (getvar “snapmode”))
please insert this one:
(setvar “snapmode” 0)
Thanks to Koczka for observations.

Mr T
11th Nov 2002, 10:24 pm
Here is a lisp for 3d spiral type objects

http://pointa.autodesk.com/local/enu/portal/Articles/article.jsp?articleId=15872

HTH

Nick

(non lithssps CAD)

fuccaro
12th Nov 2002, 10:57 pm
Thank you, Mr T for the link. It’s an other approach, to generate surfaces when solids become hard to manipulate. Those are general propose programs, I rewrote the routines in a simple way, for our needs. First, here is a program for draw a helix, or a spiral if elevation (pitch) is set to zero. The number of turns may be real(!) You may set the start and the end radius independently, so conical springs are easy to draw. Negative value is accepted for radius (try this: Rb=10; Rt=-10; elev.=0, turns=2).
I will return with an other program to extrude a shape on a helix path, generating a surface. So stay close!


(defun C:Helcon()
(setq segs 20); segments/turn
(setq spin -1); -1=CW, 1=CCW
(setq ri (getreal "base radius ") rf (getreal "top radius "))
(initget (+ 1 4))
(setq h (getreal "elevation "))
(initget (+ 1 2 4))
(setq tu (getreal "turns "))
(setq old (getvar "osmode"))
(setvar "cmdecho" 0)
(setq fi1 (/ (* 2 PI) segs) i 0)
(setq points (fix (* tu segs))
h1 (/ h points) r1 (/ (- rf ri) points)
s (getpoint "center of base ")
end (list (car s) (cadr s) (+ h (caddr s))))
(setvar "osmode" 0 )
(command "line" s end "")
(command "chprop" "l" "" "c" 1 "")
(command "3dpoly")
(setq i 0)
(repeat (1+ points)
(setq fi (* i fi1) h (* i h1) r (+ ri (* i r1)))
(setq x (* r (cos fi)) y (* spin r (sin fi)))
(command (list (+ (car s) x) (+ (cadr s) y) (+ (caddr s) h)))
(setq i (1+ i)))
(command "")
(setvar "osmode" old))

CADTutor
13th Nov 2002, 10:49 am
Fuccaro

Thanks for the revised lisp file. I just tried it out and it works a treat. I used it to create the path for this extrusion:
http://www.cadimage.net/cadtutor/image5.gif
The solid extrusion is faceted because of the increment between points on the 3D Polyline. Do you think it would be possible to allow the user to set the increment?

Also, it is possible to spline the resulting helix but AutoCAD won't allow an extrusion along a splined 3D Polyline. Has anyone found a way round this?

fuccaro
13th Nov 2002, 12:51 pm
That’s easy to change. In the second program line (marked with a comment) setting the number (20) to a higher value the spring will look better. Yes, it’s possible to ask the user about a lot of things, like the color, the layer, ... I decided to make programs simple to use. But if you wish, just replace the second line
(setq segs 20); segments/turn
with this one:
(setq segs (getint “segments?”))
I feel frustrated, I don’t have possibility to insert images. The new in this program is the possibility to draw a conical helix, and with the number of turns as real. But in your image is just a simple, ordinary cylindrical helix, with exactly 5 turns.
As I promised, I will be back with an other program, to extrude on a helix path other shapes, not just circles. I must just test it, than the world may have it.

CADTutor
13th Nov 2002, 02:52 pm
You mean like this...

http://www.cadimage.net/cadtutor/image6.gif

...yes, that works a treat too.

Great work Fuccaro, can't wait to test out the extrude routine.

Mr T
13th Nov 2002, 09:47 pm
Cool. But it could be drawn as a cone with an arrayed 'wigwam pole' arrangement on the outside and drawn as a 3D pline ????

Nick

fuccaro
13th Nov 2002, 11:06 pm
Draw a horizontal line from (0,0,0) -this will be the axis of the helix. Draw a shape, most convenient as a polyline. The distance of the shape from the axis will give the radius of the helix. Start the program. When you are prompted about the number of points of the profile, enter the number of vertexes of the shape, if the shape is open. If it's a close one, you must enter number of points+1. Show the points in order, like when you draw the polyline. To close the shape, the last point must be identical with the first one. Here is a limit of the 3Dmesh size, if your surface will be incomplete and program ends with the message "Warning! surface is trimmed", try again decreasing the quality or the number of turns.


(defun C:helsurf ()
(setq fin (getint " surface quality? (20...1 1=best)"))
(setq nr (getint "nr. of points defining the profil?"))
(setq nr (1- nr) tri 0)
(setq oldc (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setq lpa (list (getpoint "\n1 point?")))
(repeat nr
(setq lpa (cons (getpoint "next point?") lpa)))
(setq tu (getreal "\nturns?"))
(setq xx (* 360 tu))
(setq xx (1+ (fix (/ xx fin))))
(if (> xx 255) (setq tri 1))
(setq xx (if (> xx 255) 255 xx))
(command "3dmesh" xx (length lpa))
(setq h (getdist "\n pitch (elevation/turn)"))
(setq old (getvar "osmode"))
(setvar "osmode" 0)
(setq fi 0.0 h (/ h (* 2 pi)))
(repeat xx
(foreach pt lpa
(setq ya (car pt))
(setq za (cadr pt))
(setq z (* za (sin fi)))
(setq x (+ (* h fi) ya))
(setq y (* za (cos fi)))
(command (list x y z)))
(setq fi (+ fi (/ (* pi fin) 180))))
(setvar "osmode" old)
(if (> tri 0) (prompt "\nWarning! surface is trimmed "))
(setvar "cmdecho" oldc))

CADTutor
14th Nov 2002, 10:19 am
Yep, that works too...
http://www.cadimage.net/cadtutor/image7.gif
I have just one criticism of this routine. Why not ask the user to select the profile and have the routine work out the number of points and their coordinates? Obviously, you'd have to stipulate that the profile was formed using a polyline but this would avoid potential errors caused by the user entering the wrong number of points etc.

Otherwise it works as advertised. Thanks Fuccaro.

fuccaro
15th Nov 2002, 11:02 am
Well, I feel that is enough about helix, -unless if someone will post here interesting special requests and I can help. My intention was (and is) to wrote simple programs, easy to understand and -why not- to use as “skeleton” or part in bigger applications. Thanks to David to quick and useful observations. So, se you in other topics!
P.S.
I have 3 reasons to post a picture here:
1 -To practice posting images (I hope it works).
2 -To show the results of a combination of the last two routines.
3 –To show to David, I didn’t missing from school, when lesson about real numbers was (the number of turns is not an integer)

Sorry, it don't works. The image is on my computer. If you wish, make me a visit :evil:
http://www.cadimage.net/fuccaro/screw.jpg
(if the image is not here, try this link:
http://fuccaro.netfirms.com/screw.jpg
And the picture is here, thank you David! :D

fuccaro
30th Nov 2002, 10:12 am
Hello, people!
I was asked if it’s possible to change the sense of the helixes.
The routine named HELCON has a line
(setq spin -1); -1=CW, 1=CCW
If you change it –with any text editor- like this
(setq spin 1); -1=CW, 1=CCW
you will reverse the sense. But I think is more easy to draw the helix as it is, and apply a mirror with the AutoCAD command. If somebody draw more helixes at a time, with different senses, try to change the mentioned line with this one
(setq spin (getint “spin? -1=CW, 1=CCW”))
You will be asked about the spin for every helix.
In the routines HELSURF and HELIX1 you may find the line
(command (list x y z))
and replace
z with (- 0 z)
Happy rendering!

CADTutor
2nd Jan 2003, 11:15 pm
Here's a link sent to me by Michael Beall. Look at the November Lisp of the Month.

Hey, you asked about the helix...

Sometime during January I plan to pull all this helix stuff together and present it as a special tutorial (thanks fuccaro).

superjari
3rd Jan 2003, 12:40 pm
But where is the link?

CADTutor
3rd Jan 2003, 05:01 pm
Duh!

surely you guys can mind read?

OK, here it is anyway http://www.spaug.org/LISP_Index.Html

:D

Mr T
3rd Jan 2003, 11:01 pm
Here is a cool, thorough, tutorial on helixs.

http://www.tenlinks.com/CAD/users/autocad/tutorials/SCREWS/screws3.htm

:shock: :shock:
Cheers
:lol: :lol:
Nick

Mr T
3rd Jan 2003, 11:11 pm
Sometime during January I plan to pull all this helix stuff together and present it as a special tutorial (thanks fuccaro).

Here is a cool, thorough, tutorial on helixs, spirals screw threads etc.

http://www.tenlinks.com/CAD/users/autocad/tutorials/SCREWS/screws3.htm

:shock: :shock:
Cheers
:lol: :lol:
Nick

superjari
4th Jan 2003, 06:07 pm
I think you really want us to go to that page don't you? :wink:

Mr T
4th Jan 2003, 09:58 pm
I wondered why the post was not showing ?

Now I realise that it was on page 2 !!

Oops

Sorry folks

Nick

CADTutor
4th Jan 2003, 11:58 pm
Oh! and I just thought you were trying to push up your member rating by adding multiple posts :wink:

I've deleted any unecessary postings.

fuccaro
6th Jan 2003, 11:59 am
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?

superjari
6th Jan 2003, 05:11 pm
Let's say you want to make a round staircase and want a rail, you need a helix...

fuccaro
7th Jan 2003, 08:11 am
http://www.cadimage.net/fuccaro/spring.jpg
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<0) draw an other pline, “pitch poly” -the variation of the pitch of helix (with blue). Where this second pline is closer to the axis, the pitch is smaller.
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.
http://www.cadimage.net/fuccaro/poly.gif
(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)



&#40;defun distance &#40;r pol&#41;
&#40;setvar "osmode" 0&#41;
&#40;command "._line" &#40;list z 0&#41; &#40;list z r&#41; ""&#41;
&#40;setvar "osmode" 1&#41;
&#40;command "._trim" pol "" &#40;list z r&#41; ""&#41;
&#40;setq ent &#40;entget &#40;entlast&#41;&#41;&#41;
&#40;entdel &#40;entlast&#41;&#41;
&#40;abs &#40;caddr &#40;assoc 11 ent&#41;&#41;&#41;
&#41;

&#40;defun C&#58;Spr&#40;&#41;
&#40;setvar "cmdecho" 0&#41;
&#40;setq hm &#40;getdist &#40;list 0 0 0&#41; "\nhelix axis endpoint"&#41;&#41;
&#40;setq rpol &#40;entsel "\nselect radius polyline"&#41;&#41;
&#40;setq rm &#40;* 1.1 &#40;cadr &#40;getpoint "\ntop of radius poly"&#41;&#41;&#41;&#41;
&#40;setq dpol &#40;entsel "\nselect axial pitch polyline"&#41;&#41;
&#40;setq pm &#40;* 1.1 &#40;cadr &#40;getpoint "\nbottom of pitch poly"&#41;&#41;&#41;&#41;
&#40;command "._plan" ""&#41;
&#40;setq poi &#40;getreal "\nsegments/turn? &#40;3...100&#41;"&#41;&#41;
&#40;command "._zoom" "w" &#40;list -1 pm&#41; &#40;list &#40;+ 2 hm&#41; rm&#41;&#41;
&#40;setq coords nil&#41;
&#40;setq alpha1 &#40;/ &#40;* 2 PI&#41; poi&#41;&#41;
&#40;setq z 0 alp 0&#41;
&#40;setq old &#40;getvar "osmode"&#41;&#41;
&#40;while &#40;<= z hm&#41;
&#40;setq r0 &#40;distance rm rpol&#41;
d0 &#40;distance pm dpol&#41;
x &#40;* r0 &#40;sin alp&#41;&#41;
y &#40;* r0 &#40;cos alp&#41;&#41;
z &#40;+ z &#40;/ d0 poi&#41;&#41;&#41;
&#40;setq point &#40;list z y x&#41;&#41;
&#40;setq coords &#40;cons point coords&#41;&#41;
&#40;setq alp &#40;+ alp alpha1&#41;&#41;
&#41; ;while
&#40;setvar "osmode" 0&#41;
&#40;command "._3dpoly"&#41;
&#40;foreach point coords &#40;command point&#41;&#41;
&#40;command ""&#41;
&#40;command "._zoom" "w" &#40;list 0 &#40;- 0 rm&#41;&#41; &#40;list hm rm&#41;&#41;
&#40;setvar "osmode" old&#41;
&#40;setvar "cmdecho" 1&#41;
&#41;

Mr T
10th Jan 2003, 11:13 pm
Here is a nother tutorial/lisp

http://www.cadalyst.com/solutions/alispsols/0602als/0602als.htm

Nick

Orbit
9th Mar 2003, 04:02 pm
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. :idea:

Thank you for your support and advice

tlyall
15th May 2004, 02:19 am
Hey Fuccaro.. O' wise lisp GURU...lol

Excellent routine this is... here (http://www.cadtutor.net/forum/viewtopic.php?t=1463) 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 :!: :!:

fuccaro
15th May 2004, 06:00 am
Try the HELSURF... or maybe the SPIREX?

hyposmurf
15th May 2004, 09:30 am
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 :roll:

tlyall
15th May 2004, 07:08 pm
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.

CADTutor
15th May 2004, 08:07 pm
The spirex lisp is here (http://cadtutor.net/forum/viewtopic.php?t=477). Shortly to make it to the lisp archive.

tlyall
16th May 2004, 02:00 am
Excellent!... Thanks David,

I'll give it a shot probably tomorrow morning.

Thanks again!

sada nada
28th May 2004, 12:04 pm
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

gid
15th Mar 2005, 12:05 pm
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,

alanie88
20th Jul 2005, 09:24 am
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 o:)

fuccaro
23rd Jul 2005, 02:04 pm
The HELSURF lisp is for cylindrical things like threads. I used a modified form to construct a conical end.

LihtiumOverdosE
18th Aug 2005, 05:33 pm
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? :huh:

Dommy2Hotty
18th Aug 2005, 05:47 pm
woah...35 posts....20,000+ views!

SV1
19th Aug 2005, 12:56 pm
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

fuccaro
24th Aug 2005, 10:22 am
LihtiumOverdosE
Please post here more details about what you need.

SV1
Read HERE (http://cadtutor.net/forum/viewtopic.php?t=1457)
Use Notepad, not Wordpad or other programs. Good luck!

LihtiumOverdosE
24th Aug 2005, 01:23 pm
@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. :)

Jose
14th Sep 2005, 11:23 pm
Fuccaro, would you mind posting the modifed helsurf script you used for the conical end?

The helsurf command works like a charm, but I can't make a conical ended screw.

fuccaro
15th Sep 2005, 05:34 am
Jose
I don't have it any more but I will rewrite it these days. Just I am *very* busy...

Roz
29th Sep 2005, 06:19 am
Hi fuccaro...
Where is the modifyed helsurf lisp routine for the conical end?

and about spirex routine, Did you already change the code to avoid the shape's flatness?
Do you Remember? you wrote: 8)

Ok, probable the first modification will be the rotation of the shape perpendicular to the path to avoid the flatness.
*********************************************
Okay!! :wink:

Note:
Let's share and everyone will conquer. :lol:

ps: Continue the good work...

Ximena
18th Jan 2006, 06:02 am
Hi,

I am new at using AutoCAD for 3D drawings, I'm used to Mechanical Desktop but at work they want me to use AutoCAD. To draw a screw I use (in Mechanical Desktop) a helix and a profile that is perpendicular to this helix and the command "sweep".

http://www.cadimage.net/postimages/mechanicaldesktopscrew.jpg

I found helix.lsp and I used it but I got a bad result because the profile that I extrude using the helix as a path doesn't seem to stay perpendicular to the path :(

http://www.cadimage.net/postimages/autocadscrew2.jpg

http://www.cadimage.net/postimages/autocadscrew.jpg

So, does anyone know what am I doing wrong? :o[/img]

fuccaro
18th Jan 2006, 06:18 am
Ximena

First at all: welcome in the forum!

It is nothing wrong with you; just AutoCAD doesn't let you to controll the twist angle when you extrude along a 3D path.
My advice is: don't draw solid 3D threads. Use simple cilynders and in the 2D drawing add a thin line to show that it is a thread.
For 3D models: revolve the profile and array the resulted solid along the axis. You will get an... "almost thread" (no slope).
Or use surfaces.
It is possible to modell threads as solid, but it is time consuming and you will end up with huge files.

Ximena
19th Jan 2006, 05:09 pm
Thank you fuccaro, I have searched Internet and books trying to do a helix and a thread. :?

I guess I'll revolve the profile and use a "semi-thread". I noticed that if I use a circle as a profile I still have the slope and since it is symmetric there is no twist, so maybe I'll try this things to see what my boss prefers.8)

One more question, where can I learn about AutoLISP and how to write lisp programs for AutoCAD? I want to understand the logic that is used, they seem very useful, specially if one has to do one task over and over again.

Ximena :)

NaShOrN
5th Apr 2006, 03:17 pm
mmmkay... I know this is an old post and that I should take a little longer looking up for info but I realy can't get helsurf to work propperly.... I've drawn the line starting from (0,0,0) and ending in (0,0.05,0) to work as the rotation axis. I've drawn a triangle (as a test shape) with coordinates 1(0.026,0.0005,0) 2(0.0265,0,0) 3(0.026,-0.0005,0). When I try to helsurf it it spins on it's centre instead of creating a helix... what am I doing wrong? Thanks in advance for the help and sorry for botherring you folks. errr.. almost forgot.. I'm using ACAD 2006.

ARKLisp
5th Apr 2006, 09:33 pm
Very, very, very interesting...I made similar things in the past years and have included this works inside my "ARKLisp TNT" package, but what I'm wondering now is that AutoCAD 2007 seems to have finalyy solved this kind of problems...and all our works will be putted into the trash...or maybe not!?

ARKLisp :glare:

forurunni
7th Aug 2009, 04:10 pm
i have tried to create a parking ramp
but it's not that much accurate.
i have given outer radios 4.7m and inner radius .9m
i used helix for creating this
at first i created a circle centre of the ramp then given helix radius 2.7m bottom and 2.7m top
& given 2 turn for the height of 8.4m
but when i go to plan view it's not accurate
anyway i used sweep command for creating it's slab

friends somebody suggest the correct method for doing this here i attach my dwg file

Beezer
11th May 2011, 02:06 am
I am sure glad I found this site. Just the topic I am having problems wrapping my head around.
BTW..... Hi everyone.. I'm new to the forum. :)

When it comes to AutoCad 3D modeling I am a complete newbie. I am currently working on a project where I need to cut a helical slot in a cylinder which will become a cam. The cylinder will be stationary but there are other parts that will rotate inside the cylinder that will have cam followers on them that will follow the cam slot cut in the cylinder. Now it has been suggested to me to create the slot in the cylinder that I have already create the model for that I will need to create a helix and extrude along the helix path. Then subtract the helix model from the cylinder model. I am just not sure how to do this and could use alittle input.

Also I am having abit of trouble getting the codes for Helsurf and Helcon shown in this topic to work. I have copy'n pasted them into Notepad and saved them as .lsp, but when I load them into Autocad and try to run them I keep getting "Unknow command" error. I am not positive but I think it might have something to do with the &#40 at the beginning of each code line. Is this suppose to be a " ( " instead?

This is a image of the part I need to draw. Just not sure how to draw the slot.
It's hard to see but the slot has 2 straight sections. One at the top and one at the bottom.

Thanks :)
27520

Lee Mac
11th May 2011, 02:10 am
Hi Beezer, and Welcome to CADTutor :)

Since this thread is 9 years old, the code has gotten a little corrupted following server changes etc. so you will need to perform a find and replace:


Replace With
&#40; (
&#41; )
Lee

Beezer
11th May 2011, 02:14 am
Thanks Lee. I had a feeling it was that, since I compared the codes that didn't work with the ones that did and that seemed to be what was different. :)