Fab drawing for only through-hole parts?

I didn’t read you very carefully. I just supposed that having pictures with only SMD are not important when you prepare programs for PnP machine as probably you just use PnP file. So what for it could be necessary? Answer according to my imagination is then you need it when you assemble elements manually looking at picture. I have never took place in real assembling PCBs. We had a semi automatic machine but it was located 200km far from place I am working.

I was not criticizing gwidesman’s request, nor casting doubt on the logic behind it. Quite in the contrary.
I was interested to know why, in what context, he needed these two drawings, as this is the first time I hear this request, and I believe it is not very commonly done. Not common is not the same as stupid.

2 Likes

Same here. They may be pros for implementing this kind of feature, although also cons. Especially plotting (gerber files) is meant to be machine readable and to describe the whole content of the design and it’s questionable if it should allow selective plotting (it would lead to endless options to satisfy all workflows).

In 5.99 it’s possible to choose to print according to the Appearance manager Objects visibility, which is huge improvement for some workflows. Unfortunately it’s not possible to show/hide SMD/THT footprints separately, let alone certain footprint Fab layers, but it’s possible to hide THT pads.

Is this project of any use? You can specify the components you wish to show but it looks like you would have to define the components separately.

I think that this is one of those task that fits KiBot however I have null experience with the plugin and I do not know its current status, maybe @set could chime in to clarify a bit, but give it a try, it looks quite capable.

From the github page:

The current implementation of the filters allow to exclude components from some of the processing stages. The most common use is to exclude them from some output. In the future more advanced filters will allow modification of component details.

  • exclude_smd : [boolean=false] KiCad 5: exclude components marked as smd in the PCB.
  • exclude_tht : [boolean=false] KiCad 5: exclude components marked as through-hole in the PCB.

Mmm… somehow it seems that @set is not able to post here (!?):

Kibot definitely looks pretty interesting. However, relating to the task at hand, from the docs it appears that exclude_smd and exclude_tht apply to outputs such as BOM, but not to the pdf_pcb_print function, as that lacks an exclude_filter option. Indeed, I think Kibot’s ability to produce PCB line drawing output is limited to simply operating Kicad’s print function and supplying Kicad’s dialog box options. But I could be misreading the Kibot docs.

Hi @gwideman !

pdf_pcb_print can be affected by variants and variants can use filters.

Current behavior is to mark excluded components with a cross.

Here is an example I use for the regression tests:

image

Applying a filter like this:

# Example KiBot config file
kibot:
  version: 1

variants:
  - name: 'default'
    comment: 'Default variant'
    type: ibom
    variants_blacklist: T2,T3

outputs:
  - name: 'pdf_default'
    comment: "PCB print w/variant"
    type: pdf_pcb_print
    options:
      variant: default
    layers: F.Fab

You get:

image

As you can see we don’t remove the modules, just mark them with a cross. The main idea for this is to indicate which components we won’t to be soldered.

Hi @set! Thanks for weighing in. I’m not sure what to conclude from your message. Are you saying that the variant functionality places X’s but does not do what I want, which is to hide components? Or are you saying that the variant functionality can be used to hide components by setting some option? (Or maybe by modifying some code?)

I’m a bit wary of using variant to show/hide SMD/THT components, because we also have actual product variants for which the variant feature would be useful, and that would seem to result in a confusing multiplication of combination variants.

Thanks for your comments.

Current behavior is to just cross the components, only removed in the 3D output.

To hide components in the print output we need to add code.

And yes, it could become messy if you also use variants for other purpose. In particular if you then want to mark with a cross.

The best way could be adding an option to the print output.

BTW, an example to cross SMD, THT or virtual components could be:

# Example KiBot config file
kibot:
  version: 1

filters:
 - name: 'no smd'
   type: 'generic'
   comment: 'Remove components with smd attribute'
   exclude_smd: true

 - name: 'no tht'
   type: 'generic'
   comment: 'Remove components with through-hole attribute'
   exclude_tht: true

 - name: 'no virtual'
   type: 'generic'
   comment: 'Remove components with virtual attribute'
   exclude_virtual: true

variants:
  - name: 'default'
    comment: 'Default variant'
    type: kibom
    dnf_filter: 'no tht'

outputs:
  - name: 'pdf_default'
    comment: "PCB print w/variant"
    type: pdf_pcb_print
    options:
      variant: default
    layers: F.Fab

Thanks for clarifying, @set.

Hi @gwideman !

If you have some patience and want to experiment: I added an option to the pdf_pcb_print output. The name is hide_excluded and you can use it like this:

# Example KiBot config file
kibot:
  version: 1

filters:
 - name: 'no smd'
   type: 'generic'
   comment: 'Remove components with smd attribute'
   exclude_smd: true

 - name: 'no tht'
   type: 'generic'
   comment: 'Remove components with through-hole attribute'
   exclude_tht: true

 - name: 'no virtual'
   type: 'generic'
   comment: 'Remove components with virtual attribute'
   exclude_virtual: true

variants:
  - name: 'default'
    comment: 'Default variant'
    type: kibom
    exclude_filter: 'no tht'

outputs:
  - name: 'pdf_default'
    comment: "PCB print w/variant"
    type: pdf_pcb_print
    options:
      variant: default
      hide_excluded: true
    layers: F.Fab

I tried it for a PCB with the following F.Fab:

And got:

Where J1, J3-12 and U4 were removed, which are THT components.

FWIW, my work uses separate THT / SMT drawings as we have several SMT lines where we basically start with paste, blank boards, and reels of parts on one end, and out the other end comes boards with the SMT parts already reflowed and inspected.

These boards then go across the plant to the stuff lines where the THT parts are loaded before running them through wave solder. I believe the software we use to produce these prints is CircuitCAM.

1 Like

Wow @set, that’s very generous of you to go to the effort of adding that feature! I can’t jump on adopting Kibot absolutely immediately, but this looks very promising for what I’ll need to do in coming weeks.

A couple of points though:

  1. I see that your revision excluded the smd Fab graphics, but appears to have left in place the Fab texts. How would one get rid of those?

  2. This method proceeds by excluding a set of components. But when creating the SMD-specific or THT-specific docs, we probably want to proceed by including only specific sets of components. For example, include board outline + THT components, and omit all else. (No need printing fiducials, mounting holes etc and their Fab captions.)

You may well have intended the demo you posted as a sample of how, in Kibot, to get items to appear or hide on the drawing, and perhaps the code you implemented is an example of how to implement other variations on the same idea. If that path is feasible for someone capable in Python but new to Kibot (ie: me), then thanks for the example. My comments above really contribute only if you had in mind to implement something like this as an ongoing feature.

Graham

I didn’t include the text yet. But will do if the option is useful.

Filters can be combined and negated. So you can write a filter that excludes everything but XXX components. The outline of the board is a layer, so you can just select this layer and *.Fab.

If you can’t get what you want we can see what’s needed. I add features as peoples finds gaps in the filters/variants mechanism. The idea is to cover all the useful uses.

1 Like

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