Can I do a hatched polygon on KiCAD

Hi there!
Put polygons is a good thing for many reasons BUT they will make a bad parasitic capacitance to a chassis which is bad.
One thing which can keep all polygon advantages but low this parasitic effect - make it like a mesh. I saw this frequently on many boards. As I can remember this can be done in old PCAD easy.

However I could not find this setting in KiCAD:

Can anyone point me to the right setting box?

1 Like

Historically KiCad hasn’t supported this feautre, but see here for a start on a work around.

It may be possible that it is coming soon.

2 Likes

you can view the soon to be features as well as submit your own thoughts on what you want to see in Kicad here:

1 Like

Hatched polygons are useful on silkscreen layers - fairly standard as a way of marking mains safety barriers

1 Like

Unfortunately I don’t see it being implemented in the near future. On a technical level this is a fairly involved 2D operation in which a solid region must be offset by a negative amount (this produces the constant width perimeter) and a cutout pattern applied within the offset region. If there are islands or cutouts within the solid region then the outlines of those island/cutouts must be offset by a positive number and used as a cutout mask within the negatively offset perimeter.

At the moment kicad does not have adequate offset algorithms and it also uses polygons described by discrete vertices rather than “edges” which may be linear, circular, or rational basis spline. With good offset algorithms then something can be implemented, although it will be very inefficient given our current polygon modeling. However, the task is certainly not impossible - the PostScript page description language implemented these things over 30 years ago.

2 Likes

I have used that DipTrace import/export workaround few times with good results (see below). Generally you want to do that as the last step, work with normal planes/polygons until the board is finished and then do the conversion to hatched zones.

1 Like

Your idea is fine: but how did you conversed the board to hatched?

Exactly as in the tutorial i wrote some time go, linked by Ldoiron17.
After all the operations the hatched zones are imported as footprints placed on the top and bottom layers. I have written down their coordinates on one of the Eco layers. The reason for that is due to complex shape of the hatched zone, refilling the normal kicad zones (hotkey B) did take long time or occasionally even crashed kicad. It was one of the earlier nightly builds (around 5050). I haven’t tried it with the more present ones. Anyway, every time i need to change something outside the hatched area, refill the solid zones, i move the hatched ones away, do what i need to do, hit the B key and then move the hatched zone footprints back by using the previously noted coordinates. The solid zones are designed to overlap a little bit with the hatched ones.

1 Like

Thanks, PzP!
Now it’s clear!

continuing this discussion, I found in the layout file a line:
(zone (net 5) (net_name GND) (layer F.Cu) (tstamp 5B28C715) (hatch edge 0.508)

There is the section (hatch edge 0.508). Via the GUI I see no way to change the number to 1.4 or whatsoever. What is the meaning of this value ?

It;s the pitch of the hatching, but this is only used for display.

Thanks, Bob ! I looked like a leftover of a try to implement real hatched polygons. So we have to wait for kicad v5 or v6. cheers from Germany.

See also https://bugs.launchpad.net/kicad/+bug/594023

Also https://lists.launchpad.net/kicad-developers/msg34923.html

As a possible workaround, see attached.
Pcbnew uses separate D codes for Fill hatch and Fill outlines, so you can edit that.

To get this, I made the Fill outline wider (0.4mm) and set Fill Mode = Segment.
The Segment fill paints the Hatch with lines, in a grid. Larger Gerber files result, but here that’s useful.

Then, I load into Gerbview to find the D codes used. (Hatch here is D24)
Then, edit
%ADD24C,0.400000*%
to
%ADD24C,0.150000*%

Result:

Hatched_fill_by_Gerber_WidthEdit

To do a strictly correct approach, that may be right.
However looking at the workaround I’ve done above, an idea for a much simpler approach occurs to me.
(it may only appear in Gerber files, but that’s probably tolerable)
When you select Segment Hatch mode, add field to allow the user to select a simple skip-value.
1:1 plots every line, for solid segments
1:2 plots every second segment line, for 50% hatch
1:3 plots every 3rd segment line, for 33% hatch
1:4 plots every 4th segment line, for 25% hatch
You could also allow allow define of that Hatch line width, (<= outline width) to fine-tune the grid.
(that’s what I did in Gerber file)

So that’s two simple numbers the user enters, and the algorithm is a very simple skip-lines one, nothing complex needed :slight_smile:

For those arriving late to the party, hatched zones are now a standard feature in Kicad 6.0 by selecting the fill type “Hatch Pattern” in the copper zone properties.

Which is a good final answer for this old thread.

In general it’s not recommended to drag up old threads on this forum, because KiCad is improving at a quite impressive pace, and old threads often loose their relevance.

I’ll close it now.

2 Likes