News for hackers. Stuff that matters.
Re:Show HN: Lasergist.com – Your custom design in pure, lase... by kevin_thibedeau on Monday December 07, 2015 @06:17PM (#10693539)
A quick hack would be to render the outlines to a bitmap. Apply a suitable edge detector that handles filled and unfilled geometry the same and then count active pixels for a ballpark estimate.

With vectors imported into a common data structure you just need to convert curves to line segments with enough segments to maintain a reasonable approximation and then add up their lengths. Cairo and Anti-grain geometry can do the heavy lifting for you there. Anti-grain has example code for doing this adaptively.

There are no comments on this comment yet.