{"id":18078737,"url":"https://github.com/intendednull/clipping","last_synced_at":"2025-04-05T20:41:40.838Z","repository":{"id":117824869,"uuid":"398956979","full_name":"intendednull/clipping","owner":"intendednull","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-23T03:26:03.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T22:03:00.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intendednull.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-23T03:01:43.000Z","updated_at":"2021-08-23T03:26:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a725f41-33a1-4bd1-badf-98cfdabc9355","html_url":"https://github.com/intendednull/clipping","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intendednull%2Fclipping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intendednull%2Fclipping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intendednull%2Fclipping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intendednull%2Fclipping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intendednull","download_url":"https://codeload.github.com/intendednull/clipping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399898,"owners_count":20932876,"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":[],"created_at":"2024-10-31T12:15:49.834Z","updated_at":"2025-04-05T20:41:40.818Z","avatar_url":"https://github.com/intendednull.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clipping\n\nEfficient clipping of arbitrary polygons using the Greiner-Hormann algorithm.\nThis implementation is based on this one : \u003chttps://github.com/helderco/univ-polyclip\u003e\n\n# Usage\n\nCargo.toml :\n```\nclipping = \"0.1.0\"\n```\n\nmain.rs :\n```\nextern crate clipping;\n\nuse clipping::CPolygon;\n\nfn main() {\n  // two polygons\n  let poly_a: Vec\u003c[f64; 2]\u003e = vec![[40., 34.], [200., 66.], [106., 80.], [120., 175.]];\n  let poly_b = vec![[133., 120.], [80., 146.], [26., 106.], [40., 90.], [0., 53.], [80., 66.], [146., 0.]];\n\n  // Get the clipping polygons\n  let mut cp_a = CPolygon::from_vec(\u0026poly_a);\n  let mut cp_b = CPolygon::from_vec(\u0026poly_b);\n\n  // clip operation (intersection, union, difference)\n  let cp_ab = cp_a.intersection(\u0026mut cp_b);\n\n  // handle the new polygons\n  for poly_c in cp_ab{\n    println!(\"Cliped polygon : {:?}\", poly_c);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintendednull%2Fclipping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintendednull%2Fclipping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintendednull%2Fclipping/lists"}