dzimmanck / python-planar-magnetics

Create HF planar inductors/transformers programmatically and generate KiCad s-expressions or dxf files.
Apache License 2.0
29 stars 2 forks source link

Feature: Add support for spirals with non-integer turns #9

Open dzimmanck opened 2 years ago

dzimmanck commented 2 years ago

When creating a winding that spans multiple layers, it is often useful to be able to generate spirals which have a non-integer number of turns. For example, if I wanted to create a 5 turn coil over 2 layers, then I would want to have 2.5 turns on each layer. Even in designs that technically have an integer # of turns, it is necessary to over-rotate each layer in order to create some overlap between spirals on different layers for placing via arrays to connect layers.

dzimmanck commented 2 years ago

I have a prototype of this somewhat functional. I think the code can be simplified a lot, and the polygon smoothing code does not work with these spirals for some reason. Here is what a 2.5 turn spiral looks like.

Figure_1

HJFSTX commented 1 year ago

@dzimmanck Do you have the half-turn code available to post?

dzimmanck commented 1 year ago

Greetings @HJFSTX,

I have not worked on this code in a while. I just pushed my my current code to feature/issue-9-fractional_turns. I was having issues with the code that was responsible for smoothing the corners.

HJFSTX commented 1 year ago

@dzimmanck,

Thanks much. I'll check it out.

iliatzou commented 2 weeks ago

@dzimmanck Wow this code is really helpful! But I saw it doesn't make only half a turn. What should change to be able to have a 0.5 turn?