Skip to content

Instantly share code, notes, and snippets.

@heynicejacket
heynicejacket / GetMapShapeArea.jsx
Last active August 9, 2021 08:41 — forked from bryanbuchanan/GetShapeArea.jsx
Script to find the area of map shapes in Adobe Illustrator, scaled to a hex grid for worldbuilding.
/*
Save this file with a jsx extension and access from the File > Scripts menu
Currently, this assumes your map utilizes a 24 mile hex. This is necessary to have a scale
factor by which to to multiply the area of your map shape to get the area in mi/km.
If your map uses a different scale, select a single hex and run this script. Replace the inches
value with the value in hexAreaInchesMap, select your shape, and run again to get sq mi / km.
By default, this rounds up the mi/km. Km is +/- 1 due to rounding. Will fix later.