How to get pin count and board size for assembly?

Hi!
I wonder if there is some way to get board info? (SMD pins count, THT pins count, board size). I usually need it when I make an assembly order.
Is it some tool I missing, or I should go through python scripts?

If you look at the bottom of the screen in Pcbnew, you will see someting similar to:
image

Boardsize is easy to measure in 3 ways:
1). by putting the cursor on an edge, and then press the space bar, which sets thedifferential coordinates to zero, Then move the mouse cursor to the other side and look at the coordinates.

2). Pcbnew / Inspect / Measure.
3). Pcbnew / Place / Dimension (Put these on your Fab. Layers).

1 Like

In Pcbnew select ‘Inspect | List Nets’. From there you can run a report as well.

1 Like

I dump question - 107 Pads is it mean SMD + THT? How do I map number to SMD, and THT ? This is what the assembler house count for quote.
I use to count THT by indirectly look in the drill hole plot / report with the option of THT/no-THT thing (This is from my memory, so it will not be exactly).

Select ‘Plot | Generate Drill, Files’ actually shows the exact numbers.

1 Like

If you can use python action plugin,
I made some

here the updated script that will count TH and SMD pads separately from the pcb modules, when generating the position files:
action_menu_positions.py

1 Like

It does not get picked up by 5.1.2

HI Jos! Thanks for answer, but are plated pads and non-plated pads not like SMDs and THTs? Anyway, I have in some PCB both THTs and SMDs and that’s what I get:image

Oh, yes. I use Kicad 5.1.2. Is it broken in 5.1.2. release?

Hi Maui!
If it’s impossible to get through kicad common GUI, I would go to python scripts. Thanks for sharing.

As it says. It’s a hole count.

It looks like If you were to subtract the plated pads from the sum of the inspect list nets pad count that’sthe smd pad count. There does not seem to be a tool to get those numbers explicitly in an easy way.

Kind of strange unless something is amiss.

  • where did you put the script, to be parsed by kicad?
  • could you post your full kicad version info?
  • could you open the ‘action_menu_positions.py’ file in a text file to check if the download is correct?

EDIT: I tested it and it is fine both on Win and Linux
.

Application: pcbnew
Version: (5.1.2)-2, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: GCC 8.2.0 with C++ ABI 1013

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

There has been some discussion about adding this on the bug tracker, https://bugs.launchpad.net/kicad/+bug/1817232. I would suggest clicking the option for “This bug affects me” to let the devs know you want this added.

I keep custom plugins in ~/.kicad_plugins

iBOM, and freerouting as they come out of git clone, for instance do get recognised in that location.

Application: kicad
Version: 5.1.2-f72e74a~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 4.15.0-51-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.3.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

I see you have Python3 enabled. @maui does your script support Python3?

yes, I tested on Mint w/ py3

Have you checked under ‘Tools’ menu, ‘External Plugins’, ‘Generate PPOS output’?
Please consider that my plugin doesn’t get an extra button on pcbnew as iBOM gets.
Moreover you need to copy the ‘action_menu_positions.py’ file to your plugins folder ‘~/.kicad_plugins
.



@jos, is the file action_menu_positions.py located in the root of the folder ~/.kicad_plugins? If you simply clone the repository into that folder the plugins will not appear since they will be inside a subfolder. Single file plugins like this one must be in the root folder. Any folders in that directory will only be searched for complex plugins, which are loaded using a _init_.py file.

Thanks for pointing out that little obstacle. A simple link inside the ‘root folder’ did the trick.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.