Botffy/polyskel

Created Feb 16, 2021 · View the Botffy/polyskel repository page

Straight skeleton implementation in Python

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

3

Lines of Code

90

From

Jun 8, 2015

To

Oct 12, 2020

About Botffy/polyskel

Polyskel is a Python implementation of the straight skeleton algorithm, a computational geometry technique that computes a skeleton structure from polygon input. The algorithm was originally described in a 1998 paper by Felkel and Obdržálek and creates a tree structure representing the medial axis of the input polygon, which has applications in areas like architecture and geography.

The implementation acknowledges its own limitations, as the original algorithm is known to have issues with certain edge cases, though it performs reasonably well on real-world inputs like country contours and floor plans. The library uses the euclid3 library for geometric computations and includes a demo tool that visualizes the skeleton output as an image alongside the input polygon. Users can specify polygons and holes in a text file format, with options for verbose logging and step-by-step visualization during computation.

The project has inspired several ports to other platforms and languages, including a Swift version and a Blender plugin that generates roof structures, indicating its utility in practical applications despite the acknowledged algorithmic limitations.

Share this video

More from Botffy

See all →