{"id":18582276,"url":"https://github.com/ubpa/uhemesh","last_synced_at":"2025-04-10T11:36:04.091Z","repository":{"id":108165539,"uuid":"234897675","full_name":"Ubpa/UHEMesh","owner":"Ubpa","description":"an elegant, high-performance and user-friendly halfedge data structure","archived":false,"fork":false,"pushed_at":"2021-01-22T14:47:49.000Z","size":189,"stargazers_count":82,"open_issues_count":4,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T20:38:10.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ubpa.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}},"created_at":"2020-01-19T12:35:59.000Z","updated_at":"2024-12-16T12:13:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e35116b-1bd8-4aa1-a980-9e65ad0a4729","html_url":"https://github.com/Ubpa/UHEMesh","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ubpa%2FUHEMesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ubpa%2FUHEMesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ubpa%2FUHEMesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ubpa%2FUHEMesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ubpa","download_url":"https://codeload.github.com/Ubpa/UHEMesh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"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-11-07T00:10:23.598Z","updated_at":"2025-04-10T11:35:59.080Z","avatar_url":"https://github.com/Ubpa.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n __    __   __    __   _______ .___  ___.  _______     _______. __    __  \n|  |  |  | |  |  |  | |   ____||   \\/   | |   ____|   /       ||  |  |  | \n|  |  |  | |  |__|  | |  |__   |  \\  /  | |  |__     |   (----`|  |__|  | \n|  |  |  | |   __   | |   __|  |  |\\/|  | |   __|     \\   \\    |   __   | \n|  `--'  | |  |  |  | |  |____ |  |  |  | |  |____.----)   |   |  |  |  | \n \\______/  |__|  |__| |_______||__|  |__| |_______|_______/    |__|  |__| \n```\n\n# UHEMesh\n\n\u003e **U**bpa **H**alf-**E**dge **Mesh** \n\n⭐ Star us on GitHub — it helps!\n\n[![repo-size](https://img.shields.io/github/languages/code-size/Ubpa/UHEMesh?style=flat)](https://github.com/Ubpa/UHEMesh/archive/master.zip) [![tag](https://img.shields.io/github/v/tag/Ubpa/UHEMesh)](https://github.com/Ubpa/UHEMesh/tags) [![license](https://img.shields.io/github/license/Ubpa/UHEMesh)](LICENSE) \n\nan elegant, high-performance, user-friendly halfedge data structure\n\n## Feature\n\n- Elegant: store **topology** only\n- High-performance: **cache-friendly** \n- User-friendly: you can custom **Vertex, Edge, Polygon and Half-Edge** class\n\n## Usage\n\n### default Vertex, Edge, Polygon and Half-Edge class\n\n```c++\n#include \u003cUHEMesh/HEMesh.h\u003e\n#include \u003cvector\u003e\nint main() {\n    std::vector\u003csize_t\u003e indices = {0,1,2,0,2,3};\n    Ubpa::HEMesh\u003c\u003e mesh(indices, 3);\n    // ...\n}\n```\n\n### custom Vertex, Edge, Polygon and Half-Edge class\n\n```c++\n#include \u003cUHEMesh/HEMesh.h\u003e\n#include \u003cvector\u003e\nusing namespace Ubpa;\n// forward declaration\nclass V;\nclass E;\nclass P;\nclass H;\nusing Traits_VEPH = HEMeshTraits\u003cV, E, P, H\u003e;\n// custom vertex, edge, polygon and half-edge class\nclass V : public TVertex  \u003cTraits_VEPH\u003e { /*...*/ }\nclass E : public TEdge    \u003cTraits_VEPH\u003e { /*...*/ }\nclass P : public TPolygon \u003cTraits_VEPH\u003e { /*...*/ }\nclass H : public THalfEdge\u003cTraits_VEPH\u003e { /*...*/ }\nint main() {\n    std::vector\u003csize_t\u003e indices = {0,1,2,0,2,3};\n    HEMesh\u003cTraits_VEPH\u003e mesh(indices, 3);\n    // ...\n}\n```\n\n## Documentaion\n\nWe have no documentaion.\n\nYou can read source code ([include/UHEMesh](include/UHEMesh)) and [example](src/test/00_basic/main.cpp) for more details.\n\n## Tips\n\n- customed class `T` should `std::is_default_constructibl` \n\n- you can get vertex, edge, polygon and halfedge type by `HEMesh\u003c...\u003e::V/E/P/HE` \n\n- use `Empty*_*` type if you don't need to custom some class, see [Empty.h](include/UHEMesh/Empty.h) for more details.\n\n  \u003e **example** \n  \u003e\n  \u003e if you just need to custom vertex and polygon, then you can do like this\n  \u003e\n  \u003e ```c++\n  \u003e class V;\n  \u003e class P;\n  \u003e using Traits_VP = HEMeshTriats_EmptyEH\u003cV, P\u003e;\n  \u003e class V : public TVertex \u003cTraits_VP\u003e { /*...*/ }\n  \u003e class P : public TPolygon\u003cTraits_VP\u003e { /*...*/ }\n  \u003e \n  \u003e int main() {\n  \u003e     std::vector\u003csize_t\u003e indices = {0,1,2,0,2,3};\n  \u003e     HEMesh\u003cTraits_VP\u003e mesh(indices, 3);\n  \u003e     // ...\n  \u003e }\n  \u003e ```\n\n- boundary polygon is `nullptr` or use `HEMesh\u003c...\u003e::P::IsBoundary(polygon)` to avoid literal value\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubpa%2Fuhemesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubpa%2Fuhemesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubpa%2Fuhemesh/lists"}