Petra Sancta

petrasancta-exhibitA script for Adobe Illustrator producing infill hatching patterns for a digital engraving machine using traditional engraving techniques.

Modern CAD/CAM engraving machines are so abstracted from the original craft of engraving, users may never have read up on historic techniques and hence end up “reinventing the wheel”. This script provides an alternative approach letting users familiar with illustrator skip the engineer-centric CAM software stage to fill areas and instead to think in traditional practitioner terms.
Heraldry was a system producing “coats of arms”, unique symbolic designs on shields, to identify individuals, families, corporations and states. These arms where composed of “tinctures” a system of colours designed to be easy quickly distinguish. When engraving these designs on metal a number of hatching schemes exist to translate tinctures to patterns, one such pattern was the Petra Sancta.
Firstly download the zipped files and decompress these files into a folder. Of these files look first at PetraSanctaTinctures.png, this image details the tinctures and their associated hatchings. provides a colour swatch for illustrator, to use this create an illustrator file, enable the swatches windows (Windows->Swatches) and open this file (left bottom button->Other Library->>Open). Fill your shapes with these colours and design as usual, when finished select one or more pieces of artwork you wish to convert and run the script (File->Scripts->Other script->petraSancta.jsx->Open). This should prompt you for the separation you desire between hatched lines, change this if you desire then press ok, after a moment a new layer should appear with your hatched lines.
This script was coded by myself as part of a collaboration with Philip Luscombe ( It is available under the MIT license (see LICENSE.txt) so feel free to tweak and redistribute the code. I must acknowledge Pomax’s fantastic Bezier curve algorithm resource at, for reminders on maths and algorithms that make this code work.

Academic Publications:

Luscombe, P. & Thomas, J. (2014) Connoisseurship in Digital Engraving: The Petra Sancta Script. All Makers Now 2014, 10-11th March 2015, Falmouth, United Kingdom

Luscombe, P. & Thomas, J. (2014). The Petra Sancta Script: Connoisseurship in digital engraving. In K. Bunnell & J. Marshall (Eds.), All Makers Now: Craft Values in 21st Century Production, International Conference Proceedings, Autonomatic Research Group, Falmouth University, 10/11 July 2014 (pp. 85 – 90). Falmouth University, ISBN 978-0-9544187-9-3