{"id":45498367,"url":"https://github.com/mziad-dev/poly_bool_dart","last_synced_at":"2026-02-22T18:01:41.719Z","repository":{"id":56837076,"uuid":"463814625","full_name":"mziad-dev/poly_bool_dart","owner":"mziad-dev","description":"Boolean operations on polygons (union, intersection, difference, xor) (this library is a port for flutter of polybooljs","archived":false,"fork":false,"pushed_at":"2025-09-01T20:54:53.000Z","size":74,"stargazers_count":29,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-20T01:07:35.045Z","etag":null,"topics":["polygon-boolean","polygon-clipping","polygon-clipping-algorithm","polygon-intersection","polygon-union"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mziad-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"ko_fi":"mohammedx6"}},"created_at":"2022-02-26T09:55:43.000Z","updated_at":"2026-01-07T12:34:25.000Z","dependencies_parsed_at":"2024-04-17T13:34:36.523Z","dependency_job_id":"8511e2db-6de6-4a10-a14b-5e4aca728d75","html_url":"https://github.com/mziad-dev/poly_bool_dart","commit_stats":{"total_commits":46,"total_committers":4,"mean_commits":11.5,"dds":0.5,"last_synced_commit":"eef1f704f6af0999a265897f2469766ce313bd8c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mziad-dev/poly_bool_dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mziad-dev%2Fpoly_bool_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mziad-dev%2Fpoly_bool_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mziad-dev%2Fpoly_bool_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mziad-dev%2Fpoly_bool_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mziad-dev","download_url":"https://codeload.github.com/mziad-dev/poly_bool_dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mziad-dev%2Fpoly_bool_dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29721050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["polygon-boolean","polygon-clipping","polygon-clipping-algorithm","polygon-intersection","polygon-union"],"created_at":"2026-02-22T18:01:39.998Z","updated_at":"2026-02-22T18:01:41.702Z","avatar_url":"https://github.com/mziad-dev.png","language":"Dart","readme":"# Polybool\n\n[![pub package](https://img.shields.io/pub/v/polybool.svg)](https://pub.dev/packages/polybool)\n[![likes](https://img.shields.io/pub/likes/polybool)](https://pub.dev/packages/polybool/score)\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/mohammedx6)\n\n\nBoolean operations on polygons: union, intersection, difference, xor.\n\n## Why polybool?\n\nFlutter had **no package** for polygon Boolean operations until now.  \n`polybool` is the **first and only library** in Dart that lets you:\n\n- Combine polygons (union)\n- Find overlaps (intersection)\n- Cut one shape from another (difference)\n- Exclusive regions (XOR)\n\nIf you’ve ever needed polygon clipping in Flutter — for **maps, games, or graphics apps** —  \nthis package saves you from writing complex geometry algorithms yourself.\n\n# Resources\n Note: taken from original libaray polybooljs\n\n* [Demo + Animation](https://unpkg.com/polybooljs@1.2.0/dist/demo.html)\n* [Companion Tutorial](https://sean.cm/a/polygon-clipping-pt2)\n\nThis library is based on:\n  * [polybooljs](https://github.com/velipso/polybooljs) by velipso@, which is based on\n  * [polybool actionscript](https://github.com/akavel/martinez-src) by akavel@, which is based on\n  * an implementation by Mahir Iqbal, which is based on\n  * F. Martinez' (2008) algorithm ([Paper](http://www.cs.ucr.edu/~vbz/cs230papers/martinez_boolean.pdf))[Code](https://github.com/akavel/martinez-src)\n\n## Features\n\n1. Clips polygons for all boolean operations\n2. Removes unnecessary vertices\n3. Handles segments that are coincident (overlap perfectly, share vertices, one inside the other,\n   etc)\n4. Uses formulas that take floating point irregularities into account\n5. Provides an API for constructing efficient sequences of operations\n\n## How to use it\n\n```dart\n    final poly1 = Polygon(regions: [\n      [\n        Coordinate(37.27935791015625, 29.32472016151103),\n        Coordinate(37.122802734375, 29.257648503615542),\n        Coordinate(37.22442626953125, 29.135369220927156),\n        Coordinate(37.36175537109374, 29.221699149280646),\n        Coordinate(37.27935791015625, 29.32472016151103),\n      ],\n    ]);\n\n    final poly2 = Polygon(regions: [\n      [\n        Coordinate(37.104949951171875, 29.159357041355424),\n        Coordinate(37.1722412109375, 29.046565622728846),\n        Coordinate(37.31781005859375, 29.105376571809618),\n        Coordinate(37.20794677734375, 29.216904948184734),\n        Coordinate(37.104949951171875, 29.159357041355424),\n      ]\n    ]);\n\n    final union = poly1.union(poly2);\n    final intersection = poly1.intersect(poly2);\n    final difference = poly1.difference(poly2);\n    final inverseDifference = poly1.differenceRev(poly2);\n    final xor = poly1.xor(poly2);\n","funding_links":["https://ko-fi.com/mohammedx6"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmziad-dev%2Fpoly_bool_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmziad-dev%2Fpoly_bool_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmziad-dev%2Fpoly_bool_dart/lists"}