{"id":44664284,"url":"https://github.com/ifilot/pytessel","last_synced_at":"2026-02-15T00:14:57.383Z","repository":{"id":62583958,"uuid":"326733997","full_name":"ifilot/pytessel","owner":"ifilot","description":"PyTessel is a Python package for tessellating 3D scalar fields into isosurfaces via the marching cubes algorithm, suitable for scientific visualization and mesh generation.","archived":false,"fork":false,"pushed_at":"2025-12-21T10:58:40.000Z","size":10984,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-23T00:59:19.798Z","etag":null,"topics":["isosurface","marching-cubes","marching-cubes-algorithm","tesselation"],"latest_commit_sha":null,"homepage":"https://ifilot.github.io/pytessel/","language":"C++","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/ifilot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-04T15:55:36.000Z","updated_at":"2025-12-21T10:58:24.000Z","dependencies_parsed_at":"2023-01-22T07:17:08.193Z","dependency_job_id":"b2215666-fa3f-4f45-ba11-03f891f2d8c9","html_url":"https://github.com/ifilot/pytessel","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"73b664a5811854a016a0134ffae21d758c206fae"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ifilot/pytessel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifilot%2Fpytessel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifilot%2Fpytessel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifilot%2Fpytessel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifilot%2Fpytessel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifilot","download_url":"https://codeload.github.com/ifilot/pytessel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifilot%2Fpytessel/sbom","scorecard":{"id":482101,"data":{"date":"2025-08-11","repo":{"name":"github.com/ifilot/pytessel","commit":"1d3fdb7416cb4a302ae8fc96b28e35d420a3f531"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_conda.yml:1","Warn: no topLevel permission defined: .github/workflows/build_wheels.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/docs.yml:12","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_conda.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_conda.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_conda.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_conda.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_conda.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_conda.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_conda.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_conda.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_conda.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_wheels.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/build_wheels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/ifilot/pytessel/docs.yml/master?enable=pin","Warn: containerImage not pinned by hash: doc.Dockerfile:1: pin your Docker image by updating nginx:latest to nginx:latest@sha256:33e0bbc7ca9ecf108140af6288c7c9d1ecc77548cbfd3952fd8466a75edefe57","Warn: pipCommand not pinned by hash: .github/workflows/build_conda.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/build_wheels.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:31","Info:   0 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build_wheels.yml:65"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T16:53:55.427Z","repository_id":62583958,"created_at":"2025-08-19T16:53:55.427Z","updated_at":"2025-08-19T16:53:55.427Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29461560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"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":["isosurface","marching-cubes","marching-cubes-algorithm","tesselation"],"created_at":"2026-02-15T00:14:56.775Z","updated_at":"2026-02-15T00:14:57.378Z","avatar_url":"https://github.com/ifilot.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTessel\n\n[![CI](https://github.com/ifilot/pytessel/actions/workflows/build_wheels.yml/badge.svg)](https://github.com/ifilot/pytessel/actions/workflows/build_wheels.yml)\n[![PyPI](https://img.shields.io/pypi/v/pytessel?color=green)](https://pypi.org/project/pytessel/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pypi)](https://pypi.org/project/pytessel/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n## Purpose\n\nPyTessel is a Python package for constructing isosurfaces from 3D scalar fields\nusing the marching cubes algorithm. It is designed for scientific visualization,\ncomputational geometry, and mesh generation workflows. While PyTessel was\noriginally developed for rendering molecular orbitals, it is flexible enough to\ntessellate arbitrary scalar fields.\n\n![isosurface](img/isosurface.png)\n\n## Installation\n\n```\npip install pytessel\n```\n\n## Getting started\n\nThe example below constructs an isosurface of a three-dimensional Gaussian function.\nThe resulting surface is written to `test.ply`, which can be viewed using tools\nsuch as:\n\n* `ctmviewer` (Linux)\n* `3D Viewer` (Windows, free via Microsoft Store)\n* Blender, MeshLab, etc.\n\n```python\nfrom pytessel import PyTessel\nimport numpy as np\n\ndef main():\n    pytessel = PyTessel()\n\n    # Generate a regular grid\n    x = np.linspace(0, 10, 50)\n\n    # Grid ordering:\n    # z is the slowest-moving index, x is the fastest-moving index\n    grid = np.flipud(\n        np.vstack(np.meshgrid(x, x, x, indexing='ij')).reshape(3, -1)\n    ).T\n\n    R = [5, 5, 5]\n    scalarfield = np.reshape(\n        np.array([gaussian(r, R) for r in grid]),\n        (len(x), len(x), len(x))\n    )\n\n    unitcell = np.diag(np.ones(3) * 10.0)\n\n    vertices, normals, indices = pytessel.marching_cubes(\n        scalarfield.flatten(),\n        scalarfield.shape,\n        unitcell.flatten(),\n        0.1\n    )\n\n    pytessel.write_ply('test.ply', vertices, normals, indices)\n\ndef gaussian(r, R):\n    return np.exp(-(r - R).dot(r - R))\n\nif __name__ == '__main__':\n    main()\n```\n\n## Isosurface quality\n\nThe script below demonstrates how grid resolution affects surface quality. Six\nisosurfaces of an icosahedral metaball are generated using grids of:\n\n* `10×10×10`\n* `20×20×20`\n* `25×25×25`\n* `50×50×50`\n* `100×100×100`\n* `200×200×200`\n\nEach surface is exported as a .ply file and rendered using [Blender](https://www.blender.org/).\n\n```python\nfrom pytessel import PyTessel\nimport numpy as np\n\ndef main():\n    \"\"\"\n    Build 6 .ply files of increasing quality\n    \"\"\"\n    pytessel = PyTessel()\n\n    for nrpoints in [10, 20, 25, 50, 100, 200]:\n        sz = 3\n\n        x = np.linspace(-sz, sz, nrpoints)\n        y = np.linspace(-sz, sz, nrpoints)\n        z = np.linspace(-sz, sz, nrpoints)\n\n        xx, yy, zz, field = icosahedron_field(x, y, z)\n\n        unitcell = np.diag(np.ones(3) * sz * 2)\n        isovalue = 3.75\n\n        vertices, normals, indices = pytessel.marching_cubes(\n            field.flatten(),\n            field.shape,\n            unitcell.flatten(),\n            isovalue\n        )\n\n        pytessel.write_ply(\n            f'icosahedron_{nrpoints:03d}.ply',\n            vertices,\n            normals,\n            indices\n        )\n\ndef icosahedron_field(x, y, z):\n    \"\"\"\n    Produce a scalar field for icosahedral metaballs\n    \"\"\"\n    phi = (1 + np.sqrt(5)) / 2\n    vertices = [\n        [0, 1, phi], [0, -1, -phi], [0, 1, -phi], [0, -1, phi],\n        [1, phi, 0], [-1, -phi, 0], [1, -phi, 0], [-1, phi, 0],\n        [phi, 0, 1], [-phi, 0, -1], [phi, 0, -1], [-phi, 0, 1]\n    ]\n\n    xx, yy, zz = np.meshgrid(x, y, z)\n    field = np.zeros_like(xx)\n\n    for v in vertices:\n        field += metaball(xx, yy, zz, v[0], v[1], v[2])\n\n    return xx, yy, zz, field\n\ndef metaball(x, y, z, X0, Y0, Z0):\n    \"\"\"\n    Single metaball function\n    \"\"\"\n    return 1 / ((x - X0)**2 + (y - Y0)**2 + (z - Z0)**2)\n\nif __name__ == '__main__':\n    main()\n```\n\n![Icosahedral metaballs](img/metaballs_3x2.png)\n\n## Gallery\n\n### Stanford Bunny\n\n![bunny](img/bunny.png)\n\n### Gyroid surface\n\n![gyroid](img/gyroid.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifilot%2Fpytessel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fifilot%2Fpytessel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifilot%2Fpytessel/lists"}