KiPadCheck works with nightly, seeking feedback

I continue to update the code on the development (unreleased) version. If anyone notices a capability the want (or asks for one), I’ll be glad to post the version that has that feature. Otherwise, I’ll post code updates less frequently. Let me know if you’re waiting on a specific feature and I’ll be sure to upload the script to GitHub after that feature is complete and ready for testing.

In the development version (unreleased), I have added silk thickness (often called ‘width’), text height, and text aspect ratio checks.


The latest update to nightly includes added Silk Thickness check.

aurabindo on GitHub reported a problem with window sizing on Linux nightly. Anyone else see the same thing? I have attempted a fix, but don’t have a Linux system to test with.

I have 4 machines with all combinations of Windows 64 and Ubuntu 16.04 and 4.0.6 and latest Nightly available. Very sad…:sunglasses:

Lots of machines to test KiPadCheck with? :slight_smile:

Yes, I keep all these dual boot combinations for testing problems on this forum Actual work I use an Ubuntu Nightly.
It would help a lot if your readme explained exactly which layers and files your plugin modifies and more details of how to use it.

I’ll add better description and use details in the next 24 hours. THANKS!

Right now in the nightly, it only modifies (or should only modify) Eco2 if the two entries labeled “debug” are either checked or non-zero.

Objects that fail a check are (generally) selected.

Other than that, a bunch of information is printed in the KiCad main console for each button. It’s mostly self documenting, but I agree more could be written in the help section.

Here’s the new readme (or at least the first part). Let me know what you think.

I’ll integrate it into GitHub in the near future.

 KiPadCheck provides additional basic DRC checks to KiCAD and proviedes lists
 to make tweaking pads easier for drill compliance, silk compliance, and
 stencil creation. It adds a menu item to "Tools" called KiPadCheck which
 brings up a dialog for control. Functions include pad list, drill list,
 drill to drill spacing check, drill to track spacing check, stencil
 aperture check vs. stencil thicknesses, stencil aperture width vs.
 paste type, silk overlap of copper, text width/height/ratio, silk width.

 In Windows, place file in 
 C:\Program Files\KiCad\share\kicad\scripting\plugins\
 In pcbnew, open scripting console (Tools > Scripting Console)
 Type "import kipadcheck".

 If installed in the scripting/plugins folder, installation should occur
 with Tools > External Plugins > Refresh Plugins.
 Otherwise, type "import kipadcheck" in the Scripting Console.
 This installs a menu item in Tools > External Plugins > KiPadCheck.


 Selecting the KiPadCheck menu item brings up the Dialog for control of the

 Fill out the dimension information supplied by your PCB manufacturer to
 check your layout against.

 The following entry items are used in the respective checks.

 Pad Info: Produces output on the KiCad console, no dialog entries used.
 Stencil Info: Produces output on the KiCad console, no dialog entries used.
 Drill Info: Produces output on the KiCad console, the following entries are used.
       Via to Via Spacing, Via to Track spacing
 Silk Info:  Produces output on the KiCad console, the following entries are used.
 Silk to Pad spacing
       Silk Slow Check:
           Enables non-zero silk-to-pad check, and text stroke check.
           If disabled, will only check silk overlap of pad against
           bounding boxes of text.
       Outline Thickness:
           Will draw outlines on Eco2 layer of pads and text that are checked.
           Notably, text strokes are only checked if the text bounding box
           is close enough to require further checking.
       Draw All Outlines:
           Will draw all outlines of pads and text strokes with the specified
           Outline Thickness.
       Silk Minimum Width:
           The minimum line thickness on the silk layer for text and
           graphical items.
       Text Minimum Height:
           The minimum height of text on the silk layer.
       Minimum Text W/H:
           The ratio of text thickness divided by text height must be
           greater than 1 divided by the value in this entry.
           A typical value entered here would be "5" which would represent
           a W/H ratio of 1/5, or 0.2.

Report using latest version on macOS & Kicad nightly.

Pad, Drill and Stencil all working and producing useful metrics in the project pane.
Silk info runs but there are no values shown nor is there any ability to adjust these parameters - see screenshot. Clicking (apart from the buttons) doesn’t allow any values to be adjusted.

1 Like

Is this with the nightly branch? Linux was showing similar (see this Issue).

Unfortunately, I cannot test on MacOS.

Can anyone volunteer to investigate the KiPadCheck / wxPython issue of resizing on MacOS and Linux?

Yes, this is running on a Kicad nightly from a week or two back.
macOS 10.12

I’ve made an ugly hack, could you please try it on MacOS ?

wx Experts, please help in finding the actual problem :smirk:

I’m reworking the interface with wxformbuilder. I’m having a little difficulty because wxformbuilder doesn’t produce exactly compatible python for KiCad. Almost got it working though by modifying the form builder code.

When it’s done, I’ll put it up to test. Any advice for managing branches on GitHub? Or should I put it directly in the nightly branch?

Updated KiPadCheck GUI to use a separate file generated from wxformbuilder.
Please let me know how this affects running on MacOS and Linux. Better?


The distribution is now two files and Both must be placed in the plugins directory.

The is updated as well to be a bit more organized with ABOUT and USE closer to the top.

Feedback welcome!

This works now on nightly / MacOS, incl Pad/Stencil/Drill and Silk with lots of output in the main project window.
I now need to work out some reasonable values now to test properly. What should I be expecting to see in Eco2?

1 Like

Excellent! Glad it works!

Eco2 is written to if either Draw All Outlines is selected or if Outline Thickness is non-zero.
(in all fields, blank and non-valid data are interpreted as zero).

If Outline Thickness is non-zero, then pad outlines and text strokes are drawn that are being checked. The silk to pad check first determines if the text box is close to the pad. If so, then each individual stroke is checked. Those strokes are drawn on the debug layer (currently hardcoded to Eco2) if Outline Thickness is non-zero.

If Draw All Outlines is selected, then the Silk check draws all pad outlines and all text strokes on the debug layer.

Incidently, selecting Slow Check will check against text strokes, while unselected will only check text boxes.

Text strokes, in case it isn’t clear, are the individual line segments that, combined, create the letters.

I hope this helps!

Can confirm it works on linux as well :wink: Thanks!

1 Like

Coming soon in the next release, fixing something I’ve been annoyed by when entering values for DRC: the lack of changeable units. Why do I have to break out a calculator if the manufacturer gives me different units than what the text box uses?

Note the Text minimum Height value. The default value (if no units are specified) is in mm:

But you can enter the value with any of the available recognized units (the list is large).

When you enter the value, it changes the default units for that entry:

The full value and units is retained in the text box for cut and pasting to other boxes, if you need it.

1 Like

KiPadCheck GitHub for nightly 406 has been updated.

You can now select min/max drill size (which are measured against the drill set),
select the drill set from a few different metric and imperial choices,
modify units just by entering them in the boxes,
and modify the debug layer (where object outlines are written if you select debug mode).

Data entry overall is pretty tedious because you have to enter everything by hand every time you open the dialog for the first time in a session. I’ll be adding load/save to a file soon.


This is a screenshot of KiPadCheck on the latest Nightly on Ubuntu16.04, I had to toggle View F9-F11 to get the highlight.

1 Like

Thank you for reporting!!

The toggle view requirement is noted in the main KiCad console window output. I don’t yet know how to fix this. The failing objects have SetSelected() being called on them, but I’m not sure what else is required to get the objects to show themselves as selected when in OpenGL view.