mirror of
https://github.com/atomic14/kicad-coil-plugins.git
synced 2024-10-18 09:06:57 +00:00
minor
This commit is contained in:
parent
63983f723e
commit
88ee5d33b2
3 changed files with 47 additions and 11 deletions
|
@ -21,6 +21,10 @@ Add the plugin to KiCad by symbolically linking it to the `kicad_plugins` direct
|
|||
ln -s ${PWD}/coil_plugin.py ~/Documents/KiCad/6.0/scripting/plugins/coil_plugin.py
|
||||
```
|
||||
|
||||
```bash
|
||||
ln -s ${PWD}/coil_plugin_kicad7.py ~/Documents/KiCad/7.0/scripting/plugins/coil_plugin.py
|
||||
```
|
||||
|
||||
## You can order the PCBs directly from PCBWay (or download the Gerbers) from these links
|
||||
|
||||
The project is still very experimental - so there are no guarantees that these will work or do anything useful...
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
"# how to connect coils\n",
|
||||
"PAD_ENABLE = False\n",
|
||||
"CONNECT_WITH_VIAS = True\n",
|
||||
"CONNECT_STAR_CENTER = False\n",
|
||||
"\n",
|
||||
"# NET Naming\n",
|
||||
"COIL_NET_NAME = \"coil\" \n",
|
||||
|
@ -442,8 +443,17 @@
|
|||
"def appendAt(coils_ref, coil_index, radius):\n",
|
||||
" coils_ref[coil_index].append(pointAt(coil_index, radius))\n",
|
||||
"\n",
|
||||
"def appendArc(tracks_ref, coil_index1, coil_index2, radius, netName):\n",
|
||||
" tracks_ref.append({ \n",
|
||||
" \"net\": netName,\n",
|
||||
" \"pts\": draw_arc(angleAt(coil_index1), angleAt(coil_index2), radius)}) \n",
|
||||
"\n",
|
||||
"def appendViaWithName(coil_index, radius, name):\n",
|
||||
" vias.append(create_via(pointAt(coil_index, radius), name))\n",
|
||||
"\n",
|
||||
"def appendVia(coil_index, radius):\n",
|
||||
" vias.append(create_via(pointAt(coil_index, radius), nameAt(coil_index)))\n",
|
||||
" appendViaWithName(coil_index, radius, nameAt(coil_index))\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"radius_coni_common = RADIUS_CONNECTIONS_INSIDE\n",
|
||||
"\n",
|
||||
|
@ -462,9 +472,7 @@
|
|||
" if radius_points != 0:\n",
|
||||
" pts = [pointAt(c1, radius_points)] + pts + [pointAt(c2, radius_points)]\n",
|
||||
"\n",
|
||||
" tracks_ref.append({\n",
|
||||
" \"net\": nameAt(c1),\n",
|
||||
" \"pts\": pts}) \n",
|
||||
" tracks_ref.append({ \"net\": nameAt(c1),\"pts\": pts}) \n",
|
||||
" \n",
|
||||
" appendAt(coils_top, c1, radius)\n",
|
||||
" appendAt(coils_top, c2, radius)\n",
|
||||
|
@ -503,15 +511,30 @@
|
|||
"\n",
|
||||
"### OUTSIDE CONNECTIONS\n",
|
||||
"# ------------------------------------------------------------------------------------\n",
|
||||
"if 1:\n",
|
||||
" # connects the middle/star point\n",
|
||||
" r = RADIUS_CONNECTIONS_OUTSIDE\n",
|
||||
" r_inc = - 5 * TRACK_SPACING \n",
|
||||
"\n",
|
||||
"if CONNECT_STAR_CENTER:\n",
|
||||
" connect_coils_with_arc(9, 11, tracks_top, r, 0)\n",
|
||||
" appendAt(coils_top, 10, r)\n",
|
||||
" appendVia(10, r)\n",
|
||||
"\n",
|
||||
"elif 1:\n",
|
||||
" for i in range(9,12):\n",
|
||||
" appendAt(coils_top, i, r)\n",
|
||||
" appendVia(i, r)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def appArcViaName(coil_index, ci_, r):\n",
|
||||
" appendArc(tracks_top, coil_index, ci_, r, nameAt(coil_index))\n",
|
||||
" appendViaWithName(ci_, r, nameAt(coil_index))\n",
|
||||
"\n",
|
||||
" relative_offset = 1.0 - 0.06\n",
|
||||
" appArcViaName(9, 9+relative_offset, r)\n",
|
||||
" appArcViaName(11, 11-relative_offset, r)\n",
|
||||
"\n",
|
||||
"if 1:\n",
|
||||
" r_inc = - 5 * TRACK_SPACING \n",
|
||||
"\n",
|
||||
" r += r_inc\n",
|
||||
" connect_coils_with_arc(3, 6, tracks_top, r, 0)\n",
|
||||
"\n",
|
||||
|
@ -554,9 +577,18 @@
|
|||
" appendVia(2, pad_connection_point_x)\n",
|
||||
"\n",
|
||||
"elif CONNECT_WITH_VIAS:\n",
|
||||
" for i in range(3):\n",
|
||||
" appendAt(coils_top, i, RADIUS_CONNECTOR)\n",
|
||||
" appendVia(i, RADIUS_CONNECTOR)"
|
||||
" r = RADIUS_CONNECTOR\n",
|
||||
" for i in range(0,3):\n",
|
||||
" appendAt(coils_top, i, r)\n",
|
||||
" appendVia(i, r)\n",
|
||||
"\n",
|
||||
" def appArcViaName(coil_index, ci_, r):\n",
|
||||
" appendArc(tracks_top, coil_index, ci_, r, nameAt(coil_index))\n",
|
||||
" appendViaWithName(ci_, r, nameAt(coil_index))\n",
|
||||
"\n",
|
||||
" relative_offset = 1.0 - 0.06\n",
|
||||
" appArcViaName(0, 0+relative_offset, r)\n",
|
||||
" appArcViaName(2, 2-relative_offset, r)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ import wx
|
|||
import math
|
||||
|
||||
|
||||
CENTER_X = 150
|
||||
CENTER_X = -150
|
||||
CENTER_Y = 100
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue