I've been following some of the section sweep experts on this forum and I've been able to reproduce the following so far.
This is a two layer winding using a curve generated by cylindrical equations as the base for the sweep profile. The equations are:
All of the above is taken directly from this post One method to make wound springs I only reproduced what had been done and put the coil reversal condition in it.
How do I take the next step and go from a winding with a round core to one with an irregular shape? I'd like to wrap two layers of a coil around a pill shaped mandrel.
The graph will look a lot like your mandrel profile. Remember this is a radial setting.
The graph horizontal represents duration (0 to 1 as trajpar is also 0 to 1) and the vertical represents your actual radius.
So if the graph looks like your mandrel with an offset accounting for the wire thickness.
p.s.... the example uses 16 as a horizontal measure. Note that trajpar is also multiplied by 16 in the sweep relations.
Some of this just takes getting use to.
If you use trajpar inside a sin or cos function, then you have to remember to multiply trajpar by 360 (degrees) so you get the full sweep of the wave.