Mask Layer - Copper Layer

Is there anyway I can copy all of the Copper Layer traces to the Mask layer to achieve this type of look without doing it manually? https://imgur.com/a/Zh7CL#1a6nq67

I think it can be done with ease at Gerber output level. Just skip F.Mask/B.Mask output and copy F.Cu/B.Cu as F.Mask/B.Mask. Of course it will need the ultra accurate film positioning at PCB house.

1 Like

What are planning to do, have exposed copper?

To get that look you simply request black FR4 with transparent solder mask.

2 Likes

What if I don’t have any soldermask? Also, could I keep my ground zones on the PCB or not?

I’m a bit confused by the combination of this information and your original question. If you don’t have a solder mask you don’t need to copy anything to the mask layer because your fab will not need the mask defined.

I don’t see any reason why not. But i think you did not give all the information we need to make a decision here.
There is no contradiction between having exposed copper and having a ground plane.

1 Like

This script can expose track copper by adding track to mask layer

import pcbnew

def AddMask():
“”“Copy track to mask layer”""

pcb = pcbnew.GetBoard()
count = 0
for track in pcb.GetTracks():
    #Set mask layer
    if type(track) == pcbnew.TRACK:
        if track.GetLayer() == pcbnew.F_Cu:
            maskLayer = pcbnew.F_Mask
        else:
            if(track.GetLayer() == pcbnew.B_Cu):
                maskLayer = pcbnew.B_Mask
            else:
                continue
        trackMask = pcbnew.DRAWSEGMENT(aParent=None, idtype=5)
        trackMask.SetStart(track.GetStart())
        trackMask.SetEnd(track.GetEnd())
        trackMask.SetWidth(track.GetWidth())
        trackMask.SetLayer(maskLayer)
        pcb.Add(trackMask)
        count = count + 1
print('{0} track masks added'.format(count))
1 Like

Where would I use that script?

Save above code to a file named et.py,copy the file to KICAD plugin folder, run python console in pcbnew tools bar,type:
et
et.AddMask()

1 Like

et.py (863 Bytes)

download and copy this file to your KiCAD plugin foler.

e.g:C:\Program Files\KiCad\share\kicad\scripting\plugins

1 Like

Nice trick!

just for reference:

import et
et.AddMask()

Hello,

I’m also trying to do this, have exposed copper tracks and black solder mask around that. I get an error when trying to run the script, maybe because I’m on a mac (?).

import pcbnew

def AddMask():
"""Copy track to mask layer"""

pcb = pcbnew.GetBoard()
count = 0
for track in pcb.GetTracks():
    #Set mask layer
    if type(track) == pcbnew.TRACK:
        if track.GetLayer() == pcbnew.F_Cu:
            maskLayer = pcbnew.F_Mask
        else:
            if(track.GetLayer() == pcbnew.B_Cu):
                maskLayer = pcbnew.B_Mask
            else:
                continue

        trackMask = pcbnew.DRAWSEGMENT(aParent=None, idtype=5)
        trackMask.SetStart(track.GetStart())
        trackMask.SetEnd(track.GetEnd())
        trackMask.SetWidth(track.GetWidth())
        trackMask.SetLayer(maskLayer)
        pcb.Add(trackMask)
        count = count + 1

print('{0} track masks added'.format(count))

Is what I get. I could try doing it on a PC.

could also, I guess, do it manually, but I don’t understand how. Say I put a solder mask over the entire board. Is there a way to “delete” where the mask should be, by drawing lines on int? If so, on what layer? I’ve seen references to such a way of doing this while looking around, but they seem to indicate drawing a solder mask onto the solder mask, which doesn’t make any sense to me.

Any ideas?

(oh, and I can’t see the solder mask in 3d viewer, which isn’t helping).

:-/

What is the point of solder mask if it isn’t going to cover the copper? If it is the appearance you’re after then simply have your board made with black FR4 and clear/transparent solder mask.

The point is to use copper tracks as touch points, for a synthesizer. Basically creating circuits with the fingers, like circuit bending. An example: https://vimeo.com/13127412 (that board obviously doesn’t have a solder mask).

But maybe black FR4 and no mask is the solution.

But, if there is a way to have solder mask all over the board except for the pads and a few tracks (added manually) that might be nice, solder resist is helpful to avoid shorts etc.

You can put a zone on the mask layer where you do not want to have solder mask.

If you want a more complex form (Like the skulls),
you could make your touch points as a special footprint.
Either by using the footprint editor (manual drawing or footprint wizard. The later might only work in nightly), svg2mod or bitmap2component to achieve this.

1 Like

Ok, how? Using the keepout area function?

The form isn’t necessarily that complicated, I could to it with lines (after all, the traces are lines). But I don’t understand how to tell Kicad not to put mask there.

I can’t see the mask in the 3d viewer (at least I think I can’t) which isn’t helping.

Nope a normal zone. (As you would do to make a copper pour. But select the appropriate mask layer instead of selecting a copper layer.)

Make sure you’ve turned on the solder mask in the 3D viewer. You can also change its color. Also, for selectively moving tracks to mask layer, you could use KiCommand. Select the track you want copied, then issue the command:

tracks selected F.Mask todrawsegments

or if you want all tracks, just

tracks F.Mask todrawsegments

within the KiCommand dialog box.

Hi

Ook… I guess I should read the manual. The mask layer defines where the mask shouldn’t be?

At work now, I’ll try kicommand and fiddling around a bit with the 3d viewer. I think I have everything on, but you never know.

yes.

And a few more chars to make the forum happy.