anyway to create a coil that is in a ring? that is create a coil and then twist it in a circle so that the ends meet?

Reply to
Loading thread data ...

I adapted my MathCurve macro just for you. Please visit

formatting link
Public Const pi As Double = 3.14159265358979

Dim p() As Double Sub main() Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc

'formulas and values below are for a toric coil 'variables. remember that length units are METERS! r0 = 0.1 ' main torus radius r1 = 0.01 ' recondary torus radius n = 10 ' number of revolutions m = 8 ' number of points per revolution

ReDim p(3 * m * n + 3)

For u = 0 To 2 * pi Step 2 * pi / (n * m) r = r0 + r1 * Cos(n * u) p(i) = r * Cos(u) 'x p(i + 1) = r * Sin(u) 'y p(i + 2) = r1 * Sin(n * u) 'z i = i + 3 Next u

Part.Insert3DSketch Part.CreateSpline (p) Part.InsertSketch2 True End Sub

Reply to
Philippe Guglielmetti


find a mail with attachment of the coil. It that what you want buddy?


Reply to

What a gentleman!! Folks, give the man a hand. You're a real credit to the newsgroup, Philippe. When I get some money I'm gonna buy some of your add-ins. Uhh . . . but don't hold your breath, fella. I'm unemployed at the moment.


Philippe Guglielmetti wrote:

Reply to

Totally! I was going to post something similar. I've definitely benefited numerous times from your postings. Thank you!

Cheers. Mike Wilson

Reply to
Mike J. Wilson

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.