pcb-rnd knowledge pool


Generating visual difference of boards

visual_diff by Tibor 'Igor2' Palinkas on 2020-06-16

Tags: howto, visual, difference, board

node source



Abstract: Determining the small difference between two versions of a board may be non-trivial. The data model is complex enough that a diff(1) on the board file (in whatever format) may not give a direct answer. A small shell script distributed with pcb-rnd provides a visual solution to this problem.

  The script is called pcb-rnd-svg. The easiest way to use it is:

pcb-rnd-svg vis-comp brd1.lht brd2.lht

which will result in an svg file that contains the first board file in the background, faded, and all objects that differ between the two boards highlighted in red and blue (colored by the version of the object in either file):

visual difference with differing objects highlighted

The test boards used for the above diff are brd1.lht and brd2.lht .

The tool can be used on any file format pcb-rnd can load. The resulting svg file has the differing objects on the bottom, in a separate group, which makes it easy to hand-edit the file to remove them obe-by-one to unravel complicated situations.

The same script has a --help and a few other options, designed to provide similar diffs for CLI use and automated tests.