{"id":61212,"library":"clipper2","title":"Clipper2","description":"Polygon Clipping and Offsetting","status":"active","version":"2.0.1","language":"cpp","source_language":null,"source_url":null,"tags":["geometry","polygon","clipping","offsetting","2d"],"install":[{"cmd":"vcpkg install clipper2","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(clipper2 CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE Clipper2::Clipper2)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"clipper2/clipper.h","correct":"#include <clipper2/clipper.h>"}],"quickstart":{"code":"#include <clipper2/clipper.h>\n#include <iostream>\n\nint main() {\n    Clipper2Lib::Paths64 subject = {Clipper2Lib::MakePath({0, 0, 100, 0, 100, 100, 0, 100})};\n    Clipper2Lib::Paths64 clip = {Clipper2Lib::MakePath({50, 50, 150, 50, 150, 150, 50, 150})};\n    Clipper2Lib::Clipper64 clipper;\n    clipper.AddSubject(subject);\n    clipper.AddClip(clip);\n    Clipper2Lib::Paths64 solution;\n    clipper.Execute(Clipper2Lib::ClipType::Intersection, Clipper2Lib::FillRule::NonZero, solution);\n    std::cout << \"Intersection has \" << solution.size() << \" polygons\" << std::endl;\n    return 0;\n}","lang":"cpp","description":"Compute the intersection of two polygons"},"warnings":[],"env_vars":null,"search_vec":"'2d':10 'clip':3,8 'clipper2':1 'geometri':6 'offset':5,9 'polygon':2,7","created_at":"2026-06-17T04:42:07.158861+00:00","updated_at":"2026-06-17T04:42:07.158861+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}