Skip to content

Instantly share code, notes, and snippets.

@shspage
shspage / find visual center.jsx
Last active May 18, 2016 13:50 — forked from moluapple/find visual center.jsx
[Illustrator] 寻找不规则形状中心点(find visual center of an irregularly shaped polygon with Illustrator)
(function() {
var doc = app.activeDocument,
lays = doc.layers,
WORK_LAY = lays.add(),
NUM_LAY = lays.add(),
i = lays.length - 1,
lay;
// main working loop
for (; i > 1; i--) {