{"id":15554911,"url":"https://github.com/guangyancai/isoext","last_synced_at":"2025-04-23T19:49:04.072Z","repository":{"id":207023506,"uuid":"705698675","full_name":"GuangyanCai/isoext","owner":"GuangyanCai","description":"GPU isosurface extraction with pytorch support. ","archived":false,"fork":false,"pushed_at":"2025-01-21T10:33:04.000Z","size":227,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T17:48:27.750Z","etag":null,"topics":["cuda","dual-contouring","isosurface-extraction","marching-cubes","nanobind","python","pytorch","thrust"],"latest_commit_sha":null,"homepage":"https://github.com/GuangyanCai/isoext/wiki","language":"Cuda","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/GuangyanCai.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":"2023-10-16T14:19:18.000Z","updated_at":"2025-02-06T02:56:01.000Z","dependencies_parsed_at":"2023-11-26T15:04:16.286Z","dependency_job_id":"60323095-cdb2-4726-97ef-c0326b4476be","html_url":"https://github.com/GuangyanCai/isoext","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"92b6d3d629f2a666f8339ab320b0a6d27e190f81"},"previous_names":["guangyancai/isoext"],"tags_count":6,"template":false,"template_full_name":"GuangyanCai/nanobind_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuangyanCai%2Fisoext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuangyanCai%2Fisoext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuangyanCai%2Fisoext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuangyanCai%2Fisoext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuangyanCai","download_url":"https://codeload.github.com/GuangyanCai/isoext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250504085,"owners_count":21441527,"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":["cuda","dual-contouring","isosurface-extraction","marching-cubes","nanobind","python","pytorch","thrust"],"created_at":"2024-10-02T15:04:27.899Z","updated_at":"2025-04-23T19:49:04.044Z","avatar_url":"https://github.com/GuangyanCai.png","language":"Cuda","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# isoext: Isosurface Extraction on GPU\n[![Documentation](https://img.shields.io/badge/docs-blue.svg)](https://github.com/GuangyanCai/isoext/wiki)\n[![PyPI version](https://badge.fury.io/py/isoext.svg?)](https://badge.fury.io/py/isoext)\n\n## Overview\n\n`isoext` is a high-performance Python library for GPU-accelerated isosurface extraction.\n\n### ✨ Key Features\n\n🔷 **Different Isosurface Extraction Methods**\n- Marching Cubes\n  - `lorensen`: the original marching cubes algorithm from the paper [Marching cubes: A high resolution 3D surface construction algorithm](https://dl.acm.org/doi/10.1145/37402.37422).\n  - `nagae`: the marching cubes algorithm from the paper [Surface construction and contour generation from volume data](https://doi.org/10.1117/12.154567). It uses only rotation to transform the Marching Cubes cases, unlike `lorensen` which uses rotation and reflection. `lorensen` contains ambiguities which results in holes and cracks. This modification removes the ambiguities and produces a closed surface.\n- Dual Contouring\n  - `dual_contouring`: the dual contouring algorithm from the paper [Dual Contouring of Hermite Data](https://dl.acm.org/doi/10.1145/566654.566586).\n- More methods will be added in the future.\n\n🔷 **Flexible Grid Support** \n- Uniform grid for regular sampling\n- Sparse grid for memory efficiency\n- Octree grid is coming soon\n\n🔷 **Developer Tools**\n- Built-in Marching Cubes table generator\n  - All lookup tables used in the library are generated using this tool\n- Rich set of SDF primitives and operators\n  - Create custom SDFs by combining primitives and operators.\n\n## Installation\n\n`isoext` currently requires PyTorch with CUDA support for GPU acceleration.\n\n### Prerequisites\n- [PyTorch](https://pytorch.org/) with CUDA support\n- [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) matching your PyTorch version\n- A compatible C++ compiler (e.g., Visual Studio on Windows, GCC on Linux)\n\n### Install from PyPI\nThe simplest way to install `isoext` is via pip:\n```bash\npip install isoext\n```\n*On Windows, you might encounter compilation errors due to the system’s default limit on maximum path length  (260 characters). You can enable long paths on Windows by following tutorials such as [this one](https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/)*\n### Install from Source\n\n```bash\ngit clone https://github.com/GuangyanCai/isoext\ncd isoext\npip install .\n```\n\n## Quick Start\n\nHere's a simple example to get you started:\n\n```python\nimport isoext\nfrom isoext.sdf import *\n\n# Create grid\ngrid = isoext.UniformGrid([256, 256, 256])\n\n# Create composite SDF shape - a sphere with three orthogonal toroidal holes\ntorus_a = TorusSDF(R=0.75, r=0.15)  # Base torus in xy plane\ntorus_b = RotationOp(sdf=torus_a, axis=[1, 0, 0], angle=90)  # Rotated to xz plane\ntorus_c = RotationOp(sdf=torus_a, axis=[0, 1, 0], angle=90)  # Rotated to yz plane\nsphere_a = SphereSDF(radius=0.75)\nsdf = IntersectionOp([sphere_a, NegationOp(UnionOp([torus_a, torus_b, torus_c]))])\n\n# Evaluate SDF and extract isosurface\nsdf_v = sdf(grid.get_points())\ngrid.set_values(sdf_v)\n\n# Run marching cubes\nprint(\"Running marching cubes\")\nv, f = isoext.marching_cubes(grid)\nprint(\"Writing obj\")\nisoext.write_obj(\"mc.obj\", v, f)\nprint(\"Done\")\n\n# Run dual contouring\nprint(\"Running dual contouring\")\nits = isoext.get_intersection(grid)\npoints = its.get_points()\nnormals = get_sdf_normal(sdf, points)\nits.set_normals(normals)\nv, f = isoext.dual_contouring(grid, its)\nprint(\"Writing obj\")\nisoext.write_obj(\"dc.obj\", v, f)\nprint(\"Done\")\n```\n\n## Documentation\n\nThe documentation is available on the [wiki](https://github.com/GuangyanCai/isoext/wiki).\n\n## Future Plans\n- [ ] Add Dual Marching Cubes.\n- [ ] Other more recent isosurface extraction methods.\n- [ ] Support more libraries such as `numpy` and `jax`.\n\n## License\n\n`isoext` is released under the [MIT License](LICENSE). Feel free to use it in your projects.\n\n## Acknowledgments\nWe use the following libraries:\n* [Thrust](https://developer.nvidia.com/thrust) for GPU computing.\n* [cuBLAS](https://developer.nvidia.com/cublas) and [cuSOLVER](https://developer.nvidia.com/cusolver) for QEF solving.\n* [nanobind](https://github.com/wjakob/nanobind) for Python binding.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguangyancai%2Fisoext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguangyancai%2Fisoext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguangyancai%2Fisoext/lists"}