Skip to content

Instantly share code, notes, and snippets.

@AEnMe
Created July 3, 2020 15:04
Show Gist options
  • Save AEnMe/60dd2625d4a3db8e6dabf7b4ceb5c6eb to your computer and use it in GitHub Desktop.
Save AEnMe/60dd2625d4a3db8e6dabf7b4ceb5c6eb to your computer and use it in GitHub Desktop.
Apply this tothe dash of a stroke in th same group as the rectangle
rec = thisProperty.propertyGroup(4).content("Rectangle Path 1");
corner = rec.roundness;
x = rec.size[0];
y = rec.size[1];
myGaps = thisProperty.propertyGroup(1).gap;
diametre = Math.min(corner, Math.min(Math.max(0, x), y) / 2) * 2; // get the corrected curvature
perimetre = (x + y - diametre * 2) * 2 + diametre * Math.PI;
perimetre / Math.round(value) - myGaps;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment