delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/04/22/10:00:42

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 22 Apr 2017 16:05:13 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: [geda-user] [pcb-rnd] user editable mask layer
Message-ID: <alpine.DEB.2.00.1704221533530.27212@igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com

Hi all,

before the previous release I made a feature poll on the pcb-rnd mailing 
list to see which potential new feature is the most popular. The one that 
would provide user editable mask (and later paste) layer won. This feature 
is a long-wanted one, the oldest request I could dig up is from 2004:

https://www.mail-archive.com/geda-user AT seul DOT org/msg02581.html

Now, after a bit more than 12 years, we have a working prototype in 
pcb-rnd svn (also in the next stable release around end of May):

https://archive.org/details/editmask

http://igor2.repo.hu/tmp/e3.svg

It's not some ugly hack for this specific case, but a generic new way of 
combining logical layers, removing the previous hardwired assumption about 
the polarity of the mask layer.



Technical background & future directions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As seen on the video, the mask layer group can host layers. Layers have 
two new property:

1. whether the layer is user drawable or automatically generated

2. whether the layer is positive rendered or negative rendered

When the core needs to draw the mask, it iterates through the list of 
layers in that group. If the first layer is  negative, it draws a big 
rectangle fill over the board. Then it just applies each layer: positive 
layers put on soldermask, negative layers remove (cut out) soldermask.

If a layer to be rendered is an user layer, the objects are drawn 
normally. If it is "auto", the group-specific logic is executed: for the 
mask group, it's the usual "pins and pads modify the mask" code.

Any combination of the flags work. To invert the whole mask, 
just start it with a positive layer instead of a negative one:

http://igor2.repo.hu/tmp/e4.svg

This means the user can chose from two policies: the original "soldermask 
everywhere, then I'll make cutouts over the traces/sections where I don't 
want soldermask"; or the "put soldermask only within these regions" by 
drawing them on the first positive layer.

It is also possible to omit the auto layer, in which case there won't be 
any pin/pad generated mask.

Also note that these are per group; the bottom and the top mask group 
doesn't need to have the same number of layers or the same structure. E.g. 
it's possible to have the usual negative-auto layer on top for smd parts 
and no-auto on the bottom with a large manual rectangle that covers every 
pin/via/pad with soldermask.

It's possible to use all drawing primitives on the user defined mask 
layers: lines, arcs, text and polygons (even polygon holes). Everything 
works as expected. There's no specific limit on + and - layers a mask 
group can list.

Currently the gtk/gdk HID, the lesstif HID, the png, gerber, ps and svg 
exporters have full support for the new feature. The gtk/gl HID works for 
the most common cases but will require some more work until it fully 
supports the editable mask.

Next steps will be:

- finishing hids/exporters, a lot of testing

- apply the same logics on the paste layer: this means manually placed 
paste anywhere and/or manually removed paste from where the auto-layer put 
it for a pad

- apply the same logics on the silk layer: silk already combines 
auto-generated objects with user objects; the new feature would be that 
the user can override (erase) some auto-generated elements or turn off the 
auto-generation for a silk layer group or invert the silk layer.

- this will also provide a possibility for inverse text on silk: just draw 
a rectangle on a positive silk layer then write text over it on a later 
negative silk layer - the text will show up as a cutout.

Testers are welcome. Join today, be part of the pcb-rnd community, affect 
what is implemented tomorrow.

Best regards,

Igor2

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019