{"id":26828441,"url":"https://github.com/botffy/polyskel","last_synced_at":"2025-04-30T04:34:01.780Z","repository":{"id":33774291,"uuid":"37431512","full_name":"Botffy/polyskel","owner":"Botffy","description":"Straight skeleton implementation in Python","archived":false,"fork":false,"pushed_at":"2020-10-12T18:03:20.000Z","size":246,"stargazers_count":81,"open_issues_count":9,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T12:33:47.866Z","etag":null,"topics":["geometry","skeletonization","straight-skeleton"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Botffy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-14T22:09:43.000Z","updated_at":"2025-03-20T02:36:10.000Z","dependencies_parsed_at":"2022-09-21T00:20:24.298Z","dependency_job_id":null,"html_url":"https://github.com/Botffy/polyskel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Botffy%2Fpolyskel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Botffy%2Fpolyskel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Botffy%2Fpolyskel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Botffy%2Fpolyskel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Botffy","download_url":"https://codeload.github.com/Botffy/polyskel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251642798,"owners_count":21620363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geometry","skeletonization","straight-skeleton"],"created_at":"2025-03-30T12:30:45.946Z","updated_at":"2025-04-30T04:34:01.729Z","avatar_url":"https://github.com/Botffy.png","language":"Python","readme":"[![Gittens](http://gittens.r15.railsrumble.com//badge/Botffy/polyskel)](http://gittens.r15.railsrumble.com/gitten/Botffy/polyskel)\n\n# Polyskel\n\n\u003cimg src=\"doc/example.png\" alt=\"A straight skeleton\"/\u003e\n\nThis is a Python 3 implementation of the straight skeleton algorithm as described by Felkel and Obdržálek in their 1998 conference paper [Straight skeleton implementation](doc/StraightSkeletonImplementation.pdf).\n\nThe algorithm itself is fairly dated, and shown to be incorrect for certain input polygons.\nThis implementation is a bit crap, and does not really attempt to fix the algorithm.\nIt works kinda okay for most real-life input (for example country contours or floor plans).\n\nFor a modern and excellent overview of the topic please refer to Stefan Huber's excellent [Computing Straight Skeleton and Motorcycle Graphs: Theory and Practice](https://www.sthu.org/research/publications/files/phdthesis.pdf).\n\n## Installation and prerequisites\n\nYou will need Python 3.8.1.\nDownload the repo and install using pip: `pip install -r requirements.txt`.\nWe use `euclid3` for geometry computations, and the demo uses `Pillow` to display the images.\n\n## Demo\n\nUse `demo.py` for a demonstration.\nThe demo parses an input polygon file, and outputs a tree structure representing the straight skeleton, as well as an image of the polygon with the skeleton.\n\n`demo.py [-h] [--verbose] [--log {DEBUG,INFO,WARNING,ERROR}] \u003cpolygon-file\u003e`\n\n- `-h` show the help message and exit.\n- `--verbose` output an image after every event, marking the current state of the skeleton and the bisectors of all vertices. Do not do this for large polygons\n- `--log` set the lowest log level to display. Polyskel logs events at info level, and further information at debug level.\n- `\u003cpolygon-file\u003e` the text file describing the polygon. The polygon is to be given as a counter-clockwise series of vertices specified by their coordinates. Holes can be specified as a clockwise series of coordinates. A number of example inputs are supplied in the `examples` folder.\n\n---\n\nCheck out [Yongha Hwang's fork](https://github.com/yonghah/polyskel) to see polyskel in [sweet real-life action](https://github.com/yonghah/polyskel/blob/master/Create%20layout%20network%20using%20straight%20skeletons%20.ipynb) \u003c3 \u003c3 \u003c3.\n\nThere is also [a Swift port](https://github.com/andygeers/Polyskel-Swift) available of Yongha Hwang's version.\n\n[bpolyskel](https://github.com/prochitecture/bpypolyskel) is a port for Blender, making [some sweet roofs](https://user-images.githubusercontent.com/613295/94917497-4fd8c800-04b9-11eb-89ba-2f4f47f5b416.png) \u003c3.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotffy%2Fpolyskel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotffy%2Fpolyskel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotffy%2Fpolyskel/lists"}