Rounded Tracks Reloaded ... again: RF Tools for KiCad

Since legacy canvas, has been dropped in KiCAD 5.1, and the status of round tracks seems to moving slowly I started to play a bit with action plugins for RF tools…
Here some RF tools as footprint wizards:

  • Mitered corners
  • Round corners
  • Taper for square track ending or track taper

RF-tools-KiCAD/README.md
RF-tools-KiCAD
.

14 Likes

@maui: OMG, we can’t have them fast enough! Will the DRC know about these shapes? In all honesty, in a RF/μwave design, you’d want significant clearance from the RF traces, much more than the clearance between “normal” traces, so DRC may not be that important. How’s your via stitching going? I’ve seen another via-stitching plugin somewhere in this forum.

Thank you for your hard work! As the panic in Altium’s web site indicates, KiCAD has become a professional grade package!

2 Likes

Awesome !!!

Cloned the repo to ~/.kicad_plugins, but it doesn’t show up in TOOLS > EXTERNAL PLUGINS.

Ever after a “refresh Plugins”.

Two other Plugins - Teardrops and Interactive HTML BOM - work well

KiCad version info appended below.

Application: Pcbnew
Version: 5.1.4-e60b266~84~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 5.0.0-29-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.4.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

You need to put the *.py files in the root of the plug in directory. If there is a folder, it will only search for an __init__.py in it, not other python files.

1 Like

Thanks, I was using the old way to install scripts/plugins.
I have now improved the dir structure…

@Anool, thanks for testing it… I have just updated the repo structure to let users just clone the repo to ~/.kicad_plugins and the wizards will be catch by KiCAD.
Please update the repo and test it again :smiley:

These are footprint wizards and they are available in the footprint wizard menu:
uw-footprint-wizards

1 Like

That was quick. Works as advertised ! :grinning:
Don’t have an immediate use for it, so I’ll let you know when I try it out.

1 Like

Tamper can be used not only for RF user case, but in general when you need to connect wide tracks to narrow pins.

3 Likes

Indexed in the plugins list and the first post is now wiki’d to allow changes past 3 months.

2 Likes

Hi @cflin
DRC will work correctly with these footprints… all are just made as pads, using poly-lines or curves inside a primitive geometry. Those geometries are fully supported in Kv5.
My Miter script has been developed from an original script I found at KiCAD mailing list… unfortunately the message didn’t get many attention and the contribution didn’t get inside kicad code… and after a while I finally decided to revamp the code to align it to kv5.1

My latest commits have been merged by @jsreynaud and his Via Stitching plugin is now updated to work with KiCAD v5.14 latest stable and v5.1 nightly.

I’m working also on other RF tools and I will post some news later on.
M

3 Likes

and few more screenshots



3 Likes

That’s… AWESOME!!
Now I cannot wait to see these options directly in the track routing.
(Actually I have been waiting for a long time)

1 Like

The same was for me … at last since I saw Ben Kempke track rounder
Anyway, because legacy canvas has been dropped and Ben code will never go into KiCAD main branch, I developed an action plugin to hack KiCAD :wink:

Just available here:
RF-tools-KiCAD

4 Likes

and here the solder mask expander:

Just available here:
RF-tools-KiCAD

7 Likes

That soldermask expander can also be useful for power traces that want to be exposed to pick up extra solder to increase the current rating. Nice work, @maui. :smiley:

2 Likes

These are great features, thanks!
Still not fully fledged as the ADS layout tools, but in the right direction.

I wonder if the name is “taper” instead of “tamper”, as the lines used for matching are usually addressed as “tapered lines”.

Thank you for appreciating :smiley:

That was a typo :rofl: … (I’m not a native speaker of English)
It should be fixed now at the repo :smiley:
Thx

2 Likes

I have a lot of questions and comments relevant to this thread.

Looking @Anool’s posting above, I see that the 5.1.4 build for Ubuntu 18.04 has Python3 enabled. Mine, for Ubuntu 16.04, doesn’t (or so “About” claims). Why? Does it mean I need to take the risk of upgrading to Ubuntu 18.04?

I want to point out an ingenious subtlety in @maui’s RF tools: In the schematic, they are used as flags between connected nodes. This circumvents the problem of having a two-port copper “component,” which would require a different net on each port, causing the DRC to flag an error of shorted nets. However, the issue of grounding traces which are “hot” on the other side (which are a significant fraction of the wavelength) persists in RF design. As I mentioned in this forum before, since the DRC only thinks in DC, it cannot accommodate RF design. Take the printed F antenna as an example (look for “PIFA” in wikipedia): The bottom of the F is electrically “hot,” while the end of each arm is grounded. Perfectly understandable in terms of RF, since each dimension is a significant part of a wavelength, but the DRC’s “DC-only” thinking would flag a nonexistent error (shorting to ground). Probably a zero-length component would do, but how would it be visible in the layout? This problem is not unique to KiCAD.

I installed the KiCad action scripts, but only the ViaStitching plugin shows up. Here is my ‘~/.kicad_plugins’ directory structure:

kicad_plugins20191011

And here is the directory structure of ‘~/.kicad_plugins/kicad-action-scripts’:

kicad-action-scripts-20191011

‘ViaStitching’ and ‘CircularZone’ are links to the original subdirectories under ‘./kicad-action-scripts’. All installed plugins except CircularZone show up.

Concerning via stitching, I think it fails to function when I tell it to place vias only within a zone (selecting the last option on the bottom only). Otherwise, it seems to work. In general, if I had a coplanar waveguide (see, for example, https://en.wikipedia.org/wiki/Coplanar_waveguide) and I wanted a “via fence” to ground extending only a certain distance from the hot trace, is there any easy way to do that? It would be something like using the trace to define a path in Inkscape.

Finally, here is the information about my KiCAD 5.1.4:
Application: KiCad
Version: 5.1.4-e60b266~84~ubuntu16.04.1, release build
Libraries:
wxWidgets 3.0.2
libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.15.0-65-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.58.0
OpenCASCADE Community Edition: 6.8.0
Curl: 7.47.0
Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

The latest Debian has both.
hermit@~:locate bin/python
/usr/bin/python
/usr/bin/python2
/usr/bin/python3
hermit@~:ls -la /usr/bin/python
lrwxrwxrwx 1 root root 7 Mar 4 2019 /usr/bin/python -> python2

It defaults to python2 though. I’d say check to see if you have both on your system. If so, then you may be able to work from there.

Just noticed you have python3 scripting = off.

An other small tool:
Trace length caliper

1 Like

@hermit: I do have python3 installed on my system. ‘ls -la /usr/bin/python’ shows me ‘/usr/bin/python -> python2.7’. Yes, I have ‘KICAD_SCRIPTING_PYTHON3=OFF’. I had 5.1.4 installed from the repo (js-reynaud-ubuntu-kicad-5_1-xenial.list); I did not compile it from source. That’ how it came from the repo. Is there a way to change ‘KICAD_SCRIPTING_PYTHON3’ without compiling from source (and selecting it as a config variable before ‘make’ is run?)?

@maui: Wow! I just did a git pull and the track caliper works! One comment: It seems to me that the track caliper and the via stitcher only work in mm and don’t care if I change the units to inches.

Thanks for your great work!

1 Like