Microwave Toolbar - shape description file experiences or documentation?

I’m trying to write a script to generate traces for microstrip filters for import into KiCad. It looks like the “polynomial shape for microwave applications” tool in the microwave toolbar may make this possible. However, I haven’t found any documentation on the syntax of polynomial shape tool shape description files.

Do any of y’all know of any documentation on the microwave toolbar, or of any examples of shape description files?

I found a snippet of documentation in the KiCad source code,

I don’t yet understand what the XScale and YScale parameters mean, I’ll update the thread if I come up with a working example…

have a look there:
https://lists.launchpad.net/kicad-developers/msg17996.html


please, if you get something working, consider to share the code :slight_smile:
3 Likes

Thanks for the leads, pyopenems looks useful. My goal is to create both openems simulations and kicad polygons, and pyopenems looks easier than what I was planning.

Now that this thread is the top google search result for “kicad microwave shape description file”, here are a few notes on what I’ve figured out so far:

  • The microwave toolbar only seems to work with the canvas set to default (View -> Switch Canvas to Default). With the canvas set to OpenGL or Cairo, clicking on the buttons in the microwave toolbar does nothing. I’m running Linux with KiCad 4.0.2-stable, the behavior might be different on other systems.
  • The XScale and YScale parameters in the polygon file stretch the shape described in the normalized coordinates section. These automatically populate and overwrite anything set in the SizeX and SizeY fields in the polygon shape dialog box. Setting the SizeX and SIzeY fields in the polygon shape dialog box appears to do nothing.
  • Placing a polygon seems to automatically place square pads with a width of the current track size in the lower left and right corners of the shape…

If I come up with anything useful I’ll be sure to open source it.

3 Likes

Following is an example python script to generate a shape file for a stepped impedance filter.

The filter frequency response is untested and probably incorrect, but it serves as an example on how to generate a microwave polynomial shape for kicad:

Here is an example polygon shape file. Note that the filter is mirrored across the y axis so that the pads will be centered on the ends of the filter.

1 Like

Hi @loxodes
please have a look @ ben kempke repo


he has developed a RF branch for some nice RF tricks for kicad you may consider interesting:
(via stitching, via shielding, round trace, net solder_clearance)

https://lists.launchpad.net/kicad-developers/msg19528.html
Maurice
3 Likes

Hi,
IMO the best way to put microwave structures in a design is to assign the critical blocks to a footprint…

Not too long ago I wrote simple script to convert DXF LWPOLYLINE rectangles and CIRCLE entities to a footprint. If you are working with Keysight ADS - the script was written against its DXF exporter. If not, probably any DXF exporter will do:

Even better, I read the latest nightly builds include custom shape pads capability. probably best to use that one.

3 Likes

First I knew about this

Hello, I usually deal with microwaves and I did plenty of planar circuits in CST including export of fabrication data. Now i need some sw which can combine microwaves and ‘standard’ low frequency circuits. So I tried KiCAD. In Pcbnew is Microwave toolbar and in it ‘Create a polynomial shape …’. Syntax of neede file is mentioned above. So I tried simple file with horizontal microstrip line 5x0.5 mm. But imported shape has rounded corners and is larger of about 0.15mm. It looks like edge of imported polygon is created by 0.15mm line. I tried to set zero width of all lines in Dimensions>Text and Drawings but no effect. Do you know ho to avoid this thick outer line?

Unit=MM
XScale=5
YScale=0.5

$COORD
0 0
0 1
1 1
1 -1
0 -1
0 0

$ENDCOORD

I don’t know how to replicate your situation. But if a polygon shape is created and placed into some layer you can open the item’s Properties and change line width to 0.000001. (Why not to 0, I don’t know, it doesn’t let me to do it. In the footprint editor you can create a polygon pad and set line width to 0. It’s not even a real polygon if it has rounded edges!)

Hello, thank you for response.

My procedure is:

  • create new project
  • open Pcbnew
  • Design Rules -> Design Rules -> Global Design Rules -> Minimum Allowed Values -> Min track width (mm): 0.0001
  • on the same panel I define Custom Track Widths to 0.001
  • OK
  • in Pcbnew up-left popup select track with width 0.001mm
  • Preferences -> Show Microwave Toolbar
  • on toolbar select ‘Create a polynomial shape …’, click on working layer (window is shown), hit Read Shape Description File …, select above mentioned text file, OK, place shape to working plane

  • loaded shape has rounded corners and its actual size is 5.15 x 1.15 mm (should be 5 x 1 mm)
  • right click on polygon -> Select Track Width - no effect
  • right click on polygon -> Edit Parameters - no settings of trace width
  • right click on polygon -> Edit with Footprint Editor - no additional setting found

Please, how to avoid round corners and get polygon of required size?