Greetings.
I am working on a Python library for generating planar inductors that implement the “Compensating Fringe Field Concept” (CFFC) in planar inductors.
I have the geometric part working nicely. My Python code generates a polygon for each layer and via arrays for the layer-to-layer connection.
I would like to turn this into a component with a footprint and a symbol so I can use it as an inductor in a schematic. Where I am stuck is how I can turn this group of polygons and vias into a footprint with two different nets, even though from KiCADs point of view they are the same net due to their interconnections. Is this possible?
FYI, the S expression for the above example is:
(gr_poly
(pts
(arc (start 119.855986 108.30898) (mid 120 110) (end 119.855986 111.69102))
(arc (start 120.841584 111.860122) (mid 100.855648 116.113985) (end 112.424001 99.270404))
(arc (start 112.203637 100.245822) (mid 117.079011 102.936885) (end 119.759107 107.818296))
(arc (start 124.691212 106.972081) (mid 95.002084 110.250035) (end 124.783978 112.53653))
(xy 130 112.5)
(xy 130 107.5)
(xy 124.783978 107.5)
) (layer "F.Cu") (width 0) (fill solid) (tstamp a4ffb6fb-64d5-4d73-84be-1f05d35873ad))
(gr_poly
(pts
(arc (start 112.203637 100.245822) (mid 117.079011 102.936885) (end 119.759107 107.818296))
(arc (start 120.735018 107.600126) (mid 107.845081 120.786859) (end 101.011008 103.659809))
(arc (start 101.828189 104.23619) (mid 106.178069 100.759175) (end 111.713172 100.147841))
(arc (start 112.692928 95.243708) (mid 107.061474 124.709353) (end 113.183308 95.341673))
) (layer "In1.Cu") (width 0) (fill solid) (tstamp cd5d29fc-a6e1-4a4d-b532-471b1576c202))
(gr_poly
(pts
(arc (start 101.828189 104.23619) (mid 106.178069 100.759175) (end 111.713172 100.147841))
(arc (start 111.884489 99.162625) (mid 119.144735 116.113413) (end 100.705978 115.883975))
(arc (start 101.550889 115.349068) (mid 100 110.000626) (end 101.55022 104.65199))
(arc (start 97.392679 101.872549) (mid 122.470093 118.336473) (end 97.6706 101.456822))
) (layer "In2.Cu") (width 0) (fill solid) (tstamp a4804c09-0749-45d6-bb35-129de9b8f59f))
(gr_poly
(pts
(arc (start 101.550889 115.349068) (mid 100 110.000626) (end 101.55022 104.65199))
(arc (start 100.705242 104.117189) (mid 119.14397 103.885442) (end 111.885845 120.837139))
(arc (start 111.714405 119.851945) (mid 106.179226 119.241303) (end 101.828911 115.764833))
(arc (start 97.671669 118.544721) (mid 122.46905 101.661967) (end 97.393696 118.129028))
) (layer "In3.Cu") (width 0) (fill solid) (tstamp f2400a37-a851-405c-98c8-195d44ee2da9))
(gr_poly
(pts
(arc (start 111.714405 119.851945) (mid 106.179226 119.241303) (end 101.828911 115.764833))
(arc (start 101.011802 116.341316) (mid 107.843731 99.213411) (end 120.735318 112.398531))
(arc (start 119.75938 112.180483) (mid 117.079895 117.062229) (end 112.204858 119.753902))
(arc (start 113.185142 124.657929) (mid 107.059633 95.291015) (end 112.694774 124.755954))
) (layer "In4.Cu") (width 0) (fill solid) (tstamp 20e429e2-59ad-45eb-80e0-d48c0bda5189))
(gr_poly
(pts
(arc (start 119.855986 111.69102) (mid 120 110) (end 119.855986 108.30898))
(arc (start 120.841584 108.139878) (mid 100.855648 103.886015) (end 112.424001 120.729596))
(arc (start 112.203637 119.754178) (mid 117.079011 117.063115) (end 119.759107 112.181704))
(arc (start 124.691212 113.027919) (mid 95.002084 109.749965) (end 124.783978 107.46347))
(xy 130 107.5)
(xy 130 112.5)
(xy 124.783978 112.5)
) (layer "B.Cu") (width 0) (fill solid) (tstamp 609db913-e2c1-495c-9284-7e7572abdad1))
(via (at 119.730034 113.67239) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 011f00bc-c5eb-4d66-b8bb-510e4c185370))
(via (at 106.482605 119.787131) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 019e1c82-1925-4b6c-bb65-d9ac2049fc06))
(via (at 103.896594 118.420714) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 031270e7-4f3f-44ae-b073-78fbc88947f3))
(via (at 115.448201 101.14127) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 09813a00-d247-4fb3-b004-658c1958ce94))
(via (at 119.729574 106.326392) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 09c0cfe8-6817-49de-95ae-541a32c8c899))
(via (at 103.89554 101.580049) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 0a13caee-078d-473f-8716-f7efcc5a9ea9))
(via (at 102.429554 117.130803) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 0c4ad334-c12b-46e7-a927-19bff15ea322))
(via (at 101.792511 103.612737) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 164d15ee-cde1-4b10-b076-2a30ae85e830))
(via (at 113.696687 119.720828) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 1eb5ec64-3441-4d1d-ac12-26fe9e48582d))
(via (at 111.298047 99.681324) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 21dbed16-fca9-45f8-9cd3-07db4b86e76c))
(via (at 107.417331 120.074216) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 22cb1945-8c76-419b-af18-bf005b2e3606))
(via (at 118.870956 104.571727) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 24599c70-cf3e-41ed-8994-81c69eab21a0))
(via (at 109.345513 99.620614) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 2b31d973-88db-42b3-ba65-f15ed73f29b1))
(via (at 118.322719 116.236373) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 2e9a8939-8922-46ab-bc98-93b498dde3f7))
(via (at 117.70023 116.990455) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 3140ebae-b995-4cad-be4b-c8a5aff01ca7))
(via (at 100.961119 115.143795) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 31d464f6-a0d6-468e-b22e-9784e6fa37ad))
(via (at 108.374889 120.272245) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 366ee3ea-79fb-4fae-9f26-9a0159ccb0be))
(via (at 106.48138 100.213309) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 36fdab42-e769-4c14-b837-fb296b0cbaf5))
(via (at 110.323209 99.605024) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 3a34e0e0-8e92-4436-a6f4-ae9a511ed7bb))
(via (at 100.51798 114.272153) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 3b540331-c047-4e1b-8061-e856b85a122e))
(via (at 112.76614 99.974609) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 3bd2ec3b-3e53-4a84-b64d-1e3d57d614e6))
(via (at 101.793311 116.38829) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 43e63b6f-81a9-4cbc-8bbe-a004572ecc2d))
(via (at 110.32451 120.394936) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 4e37ec87-42a4-4016-a9ef-0d0d38093839))
(via (at 102.428662 102.870144) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 4ff50873-1ed1-4034-a8fe-fe87657dd866))
(via (at 120.031584 107.256404) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 564f15d3-b8a8-4825-b6c4-ce323029425b))
(via (at 116.256107 101.692105) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 599e0253-5b1a-4abc-bbe9-e2d8d6ea86ad))
(via (at 117.699355 103.008581) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 59e7fbd2-7536-46db-a887-6c8e1ea0a802))
(via (at 118.871635 115.427162) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 5e7f1d00-5c15-445a-a35d-8c79ee2d8fc1))
(via (at 109.346812 120.379467) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 63fcb9ce-86de-4168-bd6a-e9ebecde0643))
(via (at 119.341554 105.428856) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 68c81a5f-fa55-4394-b81b-8e4332a2bcfc))
(via (at 119.342126 114.569975) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 6aed0b71-78a9-4f55-b9c2-f03b91845df3))
(via (at 100.158661 113.362745) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 70e9ae9d-a73a-4ea0-b751-3a6622019f35))
(via (at 99.886037 107.577655) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 72b7d5db-274f-4655-8085-370c62e16832))
(via (at 111.299338 120.318513) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 7548d7a0-c764-43d3-92ad-94eac9dec113))
(via (at 117.008709 102.316382) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 78d02e26-c917-44aa-9e39-66a2f9ed3402))
(via (at 114.593301 119.33068) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 799a66a6-1530-470d-a4cf-490bd0cac575))
(via (at 116.257147 118.307112) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 82dd9e77-8c9a-4260-b3c8-5ff1294ef470))
(via (at 99.703241 108.538236) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 862e9d3a-d00c-4e35-a1f3-b8523c0b3875))
(via (at 105.578972 119.413528) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 9151fefd-d3de-49cf-94d8-fe4330a7587f))
(via (at 104.71442 118.95671) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp 98becf28-0133-4a8a-864f-9048c984cb35))
(via (at 112.767395 120.025045) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp a0abf128-a82c-4aa5-922c-06600cf9e100))
(via (at 114.592133 100.668745) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp a416710c-f834-4a3a-9fb0-60b4304c4b37))
(via (at 113.695471 100.278709) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp a540dc06-c358-4619-ae45-f9a72e463559))
(via (at 115.44931 118.858049) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp abd2cd4c-1bad-4b27-9e30-67be3bb0c0ed))
(via (at 105.577794 100.587025) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp b07ba23b-27ee-4f74-8b57-b8481ca8e3dc))
(via (at 99.611529 110.48956) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp b38c9d13-1c4f-4b36-b4b5-67483ffb06f0))
(via (at 107.416071 99.926108) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp b64f64ea-1101-4f22-99c9-87501e6f47a7))
(via (at 118.321938 103.762585) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp b7c67eb0-1f2e-440c-9406-155f69025ec7))
(via (at 99.703424 111.463052) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp bbb27d6e-f371-4ab9-b17f-cb4a1f500114))
(via (at 108.373603 99.727959) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp cd888993-3483-4537-9dc3-95ac6f14806d))
(via (at 103.132721 117.81028) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp cdcd612c-614b-48c1-9d8f-3a1ae57d224e))
(via (at 99.88634 112.423611) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp ce76a8be-ca19-44f0-aeb2-db7e495f1812))
(via (at 100.158241 106.638486) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp ce7cd09b-2d82-4e85-b5f6-63cd561a1869))
(via (at 100.517445 105.729034) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp d0aa2c12-a001-4e93-833c-a47a8ecd081e))
(via (at 120.031927 112.742341) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp e0f3579c-6fdf-429b-aaee-332e2298efa8))
(via (at 117.009671 117.682741) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp e329ddbb-b4ea-4f81-bf4f-3ab914f8ab49))
(via (at 100.960475 104.857337) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp f0edea53-2845-4206-b940-1f39bd75a5c5))
(via (at 104.7133 101.043952) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp f3c931a6-892e-476e-8221-626be8b9c781))
(via (at 99.611468 109.51174) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp f6d461e6-2ad3-4c4e-9a80-3f5924ce1842))
(via (at 103.131743 102.190579) (size 0.8) (drill 0.4) (layers "F.Cu" "B.Cu") (free) (net 0) (tstamp f9a6cd8e-e24b-4706-a403-f28d61b14c69))