Created
February 13, 2021 00:49
-
-
Save borismus/abd5d5240618fb842adacbefcbcaddf8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBoundingBox(folded) { | |
const points = folded.vertices_coords.map(p => [p[0], p[1]]); | |
const boundary = ear.polygon(points); | |
return boundary.enclosingRectangle(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment