pcb-rnd knowledge pool


(Ab)using pcb-rnd for generic 2d vector drawing

abuse_drawing by Tibor 'Igor2' Palinkas on 2019-11-12

Tags: howto, 2d, drawing, vector, graphics, editor

node source



Abstract: While pcb-rnd is not the perfect 2d drawing program, for some applications it may be more convenient than some popular alternatives. This short node demonstrates how it can be done.


When it is worth doing this

How to do it

pcb-rnd does not enforce having any physical layer. So the most straight-forward way to (ab)use pcb-rnd for documentation drawing is having a layer stack that consists of only one documentation layer group with different layers for the different colors (and/or for different drawing layers).

Since the lihata file format is designed for easy text editing, such a template board can be small and well structured. For example this template offers 7 colored layers with 3 different pens.

Exporting to any format needs the cam syntax (but not cam jobs) because normally direct exporters will tend to follow the physical stackup and ignore doc layers. For example exporting to svg from the command line:

	pcb-rnd -x svg --cam "foo.svg=top-doc" foo.lht

The svg part can be replaced with any other format. For GUI exporting the same foo.svg=top-doc should be entered in the cam field.