pcb-rnd knowledge pool

 

The noexport attribute

noexport by Tibor 'Igor2' Palinkas on 2019-08-26

Tags: howto, noexport, zero, width, thickness, outline, copper, keep, away

node source

 

 

Abstract: How to use the noexport attribute, which replaces the "zero width line" workaround. Other alternatives for use cases where noexport is not appropriate.

 

Bad practice: zero width

An old bad practice from the PCB days is to draw some line and arc objects with a width (thickness) of zero but clearance non-zero. This way most exporters won't draw a visible object but the clearance is still applied. There are boards out there which use this workaround to cut out holes from polygons.

This is bad practice: a faithful exporter will export the object. Even if it is looks like invisible it might be there. This would cause problems with some of the vector exports unless there is a special casing in the exporter code for zero width objects.

Polygon holes

It is possible to draw explicit polygon holes (cutouts). This does not require extra objects or clearances and will work with all exports. The drawback is that it is not possible to draw round corners easily.

Layer compositing

On non-copper layer groups it is also possible to use negatively drawn layers to cut out from polygons (and other positively drawn objects). This method does not depend on clearance and uses the true thickness of the object.

It is done by creating two layers in the layer group and turning the second layer into a sub (subtracted, negative) layer. The thin draw or wireframe draw mode helps a lot making the negatively drawn objects visible

The noexport attribute

A drawing primitive that has the noexport attribute (with any value) is marked on the screen with an overlay X mark and is not exported to any of the graphical exports. A noexport: exportername attribute will inhibit the object only from the named exporter (e.g. noexport:png will make the object disappear from the png export but not from any other exports). Multiple noexport: exportername can be used.

This can be used to have the clearance side effect applied to the polygons of the same layer, without the objects causing the clearances appearing in the export. They still appear on screen (with clear marking of noexport) to make editing easy.

A typical application is copying the board outline to copper layers to get a copper keep-away from the edge of the board.

A less typical application is placing special align markers and other fabbing related objects marked with noexport:gerber. This way professional fabbing won't add these while the same board home etched will have these helpers.

Doc layers

In theory the noexport attribute could be used for placing on-screen documentation. This is bad practice and is not recommended. The proper solution for on-screen documentation is creating extra doc layers which are then not exported.

The risk of noexport

The main risk is with copper noexport objects. They do contribute to galvanic connection mapping, thus they do contribute to the netlist checks. It is very easily possible to draw a board on which pcb-rnd reports all nets are completed but then exported with broken nets because some of the copper objects are noexport.