An Enhanced ULP for Negative Silkscreen in Eagle CAD

Is There Any Way to do Negative Silkscreen in Eagle CAD ?

In the past, I wondered how Arduino boards have the inverted silkscreen art works. The folks behind Arduino use EAGLE CAD and I know for sure that Eagle doesn’t have any capability to generate inverted silkscreen. So, in the beginning I though it could be done by importing the art works as images using the import-BMP ULP.

Some art works of inverted silkscreen. Image Courtesy of Arduino

The only way to do an inverted/negative form is by using a copper polygon and adding the objects (texts, lines, …etc) in the 41 layer (tRestrict), but the results will be in the copper layer and it will take up a considered area of the PCB.

Until the day I discovered a ULP called negasilk that converts the polygon to 21 layer (tPlace), but there are considered number of problems in this ULP:

  1. All polygons are processed. So you need to delete the unwanted shapes produced from the other functional polygons.
  2. This ULP generates a script file to be executed to finish ULP’s work.

To solve these problems, I made some enhancements to the original ULP:

  1. Only polygon with “NEG_SILK” signal name will be processed.
  2. No need for the script file anymore. The commands will be bypassed directly to the editor.
  3. The output is movable using ‘group tool’. No need for the old approach to move the output (Disable some layers, select group, move group and finally enable the layers back).

In the GIF bellow is a demo for the new ULP


I encountered an execution loop when I used the ULP with a Polygon with zero width. After debugging the root cause, I found that fillings loop member of UL_POLYGON in ULP is causing the loop and after reviewing the ULP manual I found the following statement:

Filling a polygon with zero width may result in enormous amounts of data, since it will be calculated with the smallest editor resolution of 1/320000mm! EAGLE User Language – Version 9.2.0

The easiest solution is to assert execution when polygon width is zero to avoid zero width case which will result a long filling loop.


Exit mobile version