Place "Lots" of Vias / drills automatically for light transmission

Hey all,

I want to experiment with using standard PCB features as tools for light transmission or manipulation. One of the basic things I want to try is to place “very many” drills and/or vias as light pathways.

Is there a way to turn, e.g. all points in an imported DXF or SVG into a bulk collection of drills or vias? I have several possible parametric tools to create the graphic file, but hoping to avoid placing 1000s of vias manually.

Can SKIDL do this?

This is one fairly quick way to get many holes.

  1. Create a New Footprint
  2. Add One Pad with it set to NPTH Hole and Pad size as desired
  3. Copy the Pad and Place, say 10 of them in a row
  4. Copy that Row of Pads and place in the same row
  5. Copy the full Row and Place below to get another Row
  6. Repeat… Can Copy and Paste many rows to fill up a desired area…

Using 0.5mm Hole and 0.5, Pad, This took me about 50 seconds!!!
Naturally, you can Copy & Paste a bazillion holes in one-fell-swoop :grinning:

This seems fine for uniform holes, and for testing the ideas. But not for parametrically spaced, or otherwise tesselated by some sort of algorithm generated elsewhere.

The files are text based so you can have that ‘algorithm generated elsewhere’ place them?

you can have a look at the code of the python action plugin for via fencing, now included in kicad RF tools


RF-tools-KiCAD/via_fence_generator
1 Like

If I create them someplace else as text, KiCAD will be able to parse and render them as part of the overall layout? That would probably work fine as long as the generated drills/vias could be part of items that were placed conventionally via pcbnew.

I meant to convey the Kicad files are text based. They are that way so you can work with them.

1 Like

Thanks, I’ll bet that this RF tool gets me pretty close to the goal!

Understand. So as long as I edit in the manner of the required syntax, the extra features will show right up…

The plugin system allows updating of the files directly while still under KiCADs control? Or is it a process before/after manipulation in KiCAD?

Guess I need to go read about the plugin API

Recently I experimented a bit with the “replicate layout” script in Pcbnew. I could run the script directly in Pcbnew, and as many times as needed during modifying the PCB.

The “replicate layout” script is not what you want, but it does show that scripts directly in KiCad work (at least for me, not every KiCad version has scripting enabled) and that the script can interact with the board in a mix and mash relationship as needed.

1 Like

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