here:

http://www.cambam.co.uk/forum/index.php?topic=4209.0PS... Bob L... this will cut pipe threads, too! <G>

(no leadins/outs yet, but it could be made to have them)

Lloyd

PS... there was a bug that made the start point of the helix the first step in, instead of the real start point.

(bug was in the original 'boingy') It's fixed there, and here:

'//////////////////////////////////////////////////////////////////////////////

'

' Conic Helix.vbs

' CamBam vbscript

' With credits to 10 Bulls for the idea from "Boingy"

'

dim turns as single

dim start_diameter as single

dim end_diameter as single

dim depth_increment as single

dim strAnswer as string

dim direction as single

sub main

start_diameter=val(Inputbox ("Smaller diameter? "))

end_diameter=val(Inputbox ("Larger diameter? "))

turns=val(Inputbox("Number of turns? "))

depth_increment=val(Inputbox ("Depth change per turn -- negative =-Z, or down "))

direction=val(Inputbox("Direction to turn -- -1=CCW, 1=CW"))

direction=direction*-1

dim p as polyline = MakeConicHelix()

doc.add(p)

end sub

function MakeConicHelix as polyline

dim start as single = 0 ' in radians

dim finish as single = turns*2*pi '30*pi ' in radians

dim steps as single = 500 ' number of steps

dim radius as single = start_diameter/2

dim startz as single = -1*depth_increment*turns

dim endz as single = 0

dim radius_step as single = (end_diameter-start_diameter)/(steps*2)

dim x as single = 0

dim y as single = 0

dim z as single = startz

dim th as single = start

dim dt as single = (finish-start)/steps*direction

dim dz as single = (endz-startz)/steps

'// Get the drawing ready to draw

dim p as Polyline = new Polyline

'// Play da loop

for i as short = 0 to steps

x = radius * math.cos(th)

y = radius * math.sin(th)

p.Add(x,y,z)

radius=radius+radius_step

z = z + dz

th = th + dt

next i

MakeConicHelix = p

end function