Fab drawing for only through-hole parts?

In PCBNew, I am looking to produce two separate Fab drawings:

  1. One drawing for through-hole parts
  2. A separate drawing for SMD parts.

Is there a way to do this? Each footprint has a “Fabrication Attribute” that indicates TH or SMD, so the info is there to do it. But I don’t see a way to filter on this attribute in either the Print or Plot dialogs.

I’m using 5.1.9-1

Why do you need this?

I, too, wonder why you need this. Can any EDA package do this and do users in general need this? If not, is this some peculiar workflow which would have some better alternative? What do you want to achieve in the end?

Why do you need this?
I, too, wonder why you need this.

SMD components are assembled to the board in a separate set of steps than the through-hole parts. There are two fab drawings corresponding to two sets of fab steps.Telling what to fab at each fab stage :-).

In the SMD stage, if the PnP makes a mistake, or if following reflow the board fails inspection, the SMD tech needs to consult a drawing with only the SMD components shown, to understand what parts are supposed to be where.

At the TH step, the through-hole parts are manually inserted. The techs that do that need a drawing that shows only the through-hole parts.

Thanks. That is clear, and logical. Still, it is the first time I hear this request. (This may be just me or course.) So another question.
Is it an external assembly house that requests this?
Or do you do assembly internally, and you decided internally that split drawings would be more effective?

Thanks for your interest. This is for a smallish manufacturer that assembles boards in house. There are many dozens of different products, which are built in batches of 10’s or 100’s, sometimes 1000’s, and the products in production vary from day to day or week to week. Each has docs for the manufacturing team, which ideally includes separate docs for the PnP/SMD stage, and for the through-hole stage. Each stage has particular techs or assemblers who need to focus on just their stage, with as little distracting information as possible.

These folks are certainly smart enough that they could deal with a single Fab doc. However it is far easier and faster to understand, and less error prone, to have separate SMD and TH docs that provide just the info needed for those particular stages.

Even if we want to hand-assemble a prototype board, we’ll want a drawing that shows us the SMD parts to be hand placed under a microscope without the distraction of the TH parts, and then later after reflow, we will need to know the TH parts to add. We might mark up a couple of copies of the complete Fab drawing with highlighter pen to get that effect, but it would be better to just get it printed how we want it.

It has occurred to me that I might get the desired effect by using a script to actually delete all the TH or all the SMD parts (from a copy of the PCB file!), and print the two fab docs from that. A bit of a detour, but possibly better than nothing!

That is likely your best and only recourse.

Edit: actually if you add a custom field for smt and/or tht components then you can use InteractiveHtmlBom plugin to generate bom with that field and it can be sorted or filtered out dynamically. You can include fab layer in pcb drawing as well. In most recent version you can choose to group by custom field only.

I’m a bit surprised by the initial reactions from Frederik and eelik.
For me it’s quite logical that SMT and THT can be placed in different parts of a factory, and therefore having different assembly notes for the people involved would be useful feature.

It certainly is a possibility, and a logical choice to think of, but it’s not the only option.

Another possibility is to:

  1. Copy all used footprints to a project specific library.
  2. Move graphics from F.Fab to a user layer. (For either THT or SMT footprints).
  3. Update footprint links in the schematic to use the footprints from your new library.
  4. Update footprints on the PCB.

Once you have the moved the F.Fab stuff to another layer you can of course also add some more graphics (such as a copy of the PCB outline) or text notes to the new layer in Pcbnew.

I do not know of a way to select multiple graphic items in the Footprint editor and then change the layer and this is a bit of a nuisance. The only way that I know that works is to select a single graphic item, then press e to edit it’s properties and set it’s layer. I timed this for a single footprint to test it and it took me 6.5s per line segment on average. You only have to do this once for each unique footprint, not for each instance, so the amount of work required is still limited because graphics for F.Fab is usually quite simple.

Or you do it the old fashioned way:
First print the F.Fab layer a few times, then use a text marker to highlight the required parts and optionally put the paper through a laminator.

I have few times changed my mind how my footprints will use some layers. When moving drawings form one layer to another I used text Find/Replace working for all files in specified directory. So few seconds for all footprints in one library (it probably didn’t worked for subdirectories or I just didn’t serach that option).

If 3D view will be enough for you then there in Preference - Display Options you can separately show/hide through hole and SMD models.

I don’t understand your line of thinking. This is for selecting components to appear in a fabrication drawing printout, based mostly on the PCB F.Fab layer. So I 'm not sure how InteractiveHtmlBom relates to that. The PCB footprints already have a built-in “Fabrication” attribute (SMD, Through-hole or Virtual), which, in principle, should allow a script to select one type or the other.

Nice suggestion, thanks for suggesting it. Unfortunately, what that does is turn on and off the 3D models, but not the footprints and their annotations. Also the result is a “photographic” image, rather than a line drawing, so doesn’t copy very well. So it’s interesting functionality, but not quite what I’m looking for, I think.

Thanks for concurring that there’s a point to my quest :-).

I appreciate your detailing how to create a revised library that splits the Fab details to different User layers. That would be quite laborious and error prone. If I went down that path, I would write some scripts to help. But I think if was going to do consider that, then instead I might as well write the two scripts to delete the sets of components I want to hide, and not mess with the libraries.

However, it’s good to at least be aware that it could be done via the libraries.

Since 2005 we use contract manufacturer to assemble our PCBs in batches of 50 or 100 and I, the same as @Frederik, first time hear this request. I think they simply assemble SMD elements using P&P (KiCad .pos) file (there are only SMD elements) and then add THTs. So they can’t miss SMD elements having them listed in P&P file, and THTs are bigger and there are only few of them at our PCBs so looking at 3D view is enough to not miss any of them I think.
In any case, they never asked for separate documentation for THT and SMD.
The problem can be important for someone manually assembling SMD elements. But who nowadays produces even short series like this?
Before using outsourcing we had a semi automatic (manually driven) machine to place elements at PCB. So once entered ‘program’ then was watching over you so that you did not miss anything. We used it even for batch of 5 pcs.
If you use someone who 100% manually assembles SMDs at PCBs in batches of 100’s then you should change the subcontractor.

That is why I said “If 3D view will be enough…”

We did it with some extra work.
I must say it was with a board which had a few components.
We replicated the fab layer for each footprint of our own library.

Fab layer was replicated on Eco1.user for the smd components and on Eco2.user for the THT ones.

If you are mounting components on both side maybe this trick doesn’t work.

InteractiveHtmlBom provides pcb drawings with fab layer, that’s where it helps. So the question is how to split footprints into smt and tht, a custom field will help with that. Latest version of plugin (from github) can group by any field and not group by value and footprint as usual so you will get your split that way.

Well, as I mentioned, the product manufacturer in this case IS the PCB assembly builder, and we’re pursuing the separate fab drawings because it helps the assembly personnel work better.

Sounds parallel to our workflow. For the PnP components the issue in production is not that someone will place the components by hand (except possibly for a prototype). The issue is that following PnP and reflow, occasionally a problem may be identified, and then docs are needed specifically for the SMD components. However the bigger issue is the manual insertion of the through-hole components. Yes, many of these are so big you can’t miss them. However, it’s still worth having a plain line drawing that has the TH parts and only the TH parts. Plus a plain old line drawing is more convenient for the assemblers to write on, should they wish to add their own notes, which often happens.

I’m not sure where you got the idea that we might not be using PnP for production, since I mentioned PnP more than once.

Regardless, I do appreciate you pointing out the SMD/TH capability of the 3D viewer, that could indeed come in useful.

OOOOhhhh, I get what you’re saying now! I mistakenly thought that InteractiveHtmlBom was an interactive Bom (list) in Html format. :slight_smile: But you’ve prodded me to look at github and see the demo, and how it shows a picture of the board, and cross-references BoM to components on the board by clever highlighting. Very cool, and a neat piece of work! And the all-in-one-html-file is a very helpful feature.

For the line drawing I’m looking to produce, after a quick read and experiment, I do see how adding a field to the components and to the BoM table would allow filtering based on that field. However, I didn’t see how to get the filter (or other) capability to show/hide groups of components on the drawing, only how to limit the items shown in the BoM table. That is a very useful capability for the interactive view, but does not seem to be the path to the line drawing I want to produce?

You have multiple options here:

  1. Generate 2 separate boms using blacklist variant feature. Choose the field where you entered smt/tht and then blacklist one or the other. On this screenshot for illustration purposes i have Comment field selected
  2. Generate 1 combined bom but choose only your custom field for grouping, deselect footprint and value fields for grouping. In that case bom will only have 2 rows with all tht and all smd components. Then highlighting one of the rows will highlight all tht or all smd parts.

Edit: to be clear neither of these will make actual fab drawings for smd/tht parts disappear from the picture but it will make highlighting all of one or other easy.