{"id":34200410,"url":"https://github.com/megidd/tetrahedron-table","last_synced_at":"2026-03-12T17:31:10.339Z","repository":{"id":163534096,"uuid":"639010851","full_name":"Megidd/tetrahedron-table","owner":"Megidd","description":"A prerequisite for generating tetrahedra throughout the volume of a 3D model","archived":false,"fork":false,"pushed_at":"2023-10-28T12:34:07.000Z","size":1342,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T20:31:38.245Z","etag":null,"topics":["finite-element-analysis","finite-elements"],"latest_commit_sha":null,"homepage":"","language":"OpenSCAD","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Megidd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"patreon":"Megidd"}},"created_at":"2023-05-10T15:08:15.000Z","updated_at":"2023-07-18T09:27:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"169a31fd-c5f8-45fd-8b35-210777730464","html_url":"https://github.com/Megidd/tetrahedron-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Megidd/tetrahedron-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megidd%2Ftetrahedron-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megidd%2Ftetrahedron-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megidd%2Ftetrahedron-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megidd%2Ftetrahedron-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Megidd","download_url":"https://codeload.github.com/Megidd/tetrahedron-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megidd%2Ftetrahedron-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30435136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"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":["finite-element-analysis","finite-elements"],"created_at":"2025-12-15T18:15:15.598Z","updated_at":"2026-03-12T17:31:10.330Z","avatar_url":"https://github.com/Megidd.png","language":"OpenSCAD","funding_links":["https://patreon.com/Megidd"],"categories":[],"sub_categories":[],"readme":"# Publication\n\nA journal paper is being prepared based on this repository and that PR: https://github.com/deadsy/sdfx/pull/68\n\nIts DOI will be available when ready.\n\n# Input \u0026 output\n\nInput is triangle table. Output is tetrahedron table. The output is filled out manually by going over all the cases from `0` to `255`.\n\n# Background\n\nThere is a source code that generates surface triangles. The isosurface is generated for the iso-value of `0`. The source code uses a table for `2^8=256` possible *inside/outside*, i.e. *negative/positive*, combinations of `8` scalar values at `8` cube corners. The table returns an array. Every `3` consecutive array items would correspond to a triangle. The array items could be from `0` to `11`, pointing to the `12` edges a cube has. Probably this table comes from a published paper in the field of mathematics or computer science:\n\nhttps://github.com/deadsy/sdfx/blob/2d4e9502ec6fe898e8774020882cb8150f16a6a6/render/march3.go#L360\n\n# Objective\n\nI'm trying to adapt the above *marching cubes* source code, and its *tables*, to generate tetrahedra throughout the volume of a 3D model. The code would extract tetrahedra elements with all the non-positive, i.e. `\u003c=0`, values. Non-positive means the 3D space *on* and *inside* the isosurface of the `0` value.\n\n# Question\n\nFor some reason, I cannot find any publication for extracting a tetrahedral mesh *on* and *inside* the isosurface from a three-dimensional discrete scalar field. Maybe I'm not looking at the right places. Am I missing something? Or do I have to come up with the *tables* myself? It looks like a daunting task to me. Let's do it...\n\n# Reference\n\nhttps://github.com/deadsy/sdfx/pull/68#issuecomment-1447714965\n\n# Node numbering\n\nThe node numbering follows the convention of CalculiX solver [documentation](http://www.dhondt.de/ccx_2.20.pdf). Like this:\n\n![Screenshot_20230516_150126](https://github.com/Megidd/tetrahedron-table/assets/17475482/77ad0e34-3908-4c17-a8f6-ad0b7e31453b)\n\n# Example\n\n## Case 0\n\nCase 0 is trivial. No cube corner has zero/negative value. No tetrahedron is generated.\n\n## Case 1\n\nCase 1 result is below. A cube corner has zero/negative value.\n\n![Screenshot_20230516_150554](https://github.com/Megidd/tetrahedron-table/assets/17475482/e7541386-1d5f-48d5-ab0a-aabc7d133143)\n\n## Case 2\n\n![Screenshot_20230516_150614](https://github.com/Megidd/tetrahedron-table/assets/17475482/11ca2f44-6330-471c-867e-e049027cc012)\n\n## Case 3\n\n![Screenshot_20230516_150636](https://github.com/Megidd/tetrahedron-table/assets/17475482/d4fe71a4-91d5-458d-b224-086af1a55d64)\n\n## Case 4\n\n![Screenshot_20230516_150713](https://github.com/Megidd/tetrahedron-table/assets/17475482/58b949c4-a094-49fb-b2ca-6e40a9173aac)\n\n## Case 5\n\n![Screenshot_20230516_150731](https://github.com/Megidd/tetrahedron-table/assets/17475482/70fabcf7-eafc-4783-a149-d414746951cb)\n\n## Case 6\n\n![Screenshot_20230516_150759](https://github.com/Megidd/tetrahedron-table/assets/17475482/e21f6dc9-4a13-4c0a-9322-04729c1ef352)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegidd%2Ftetrahedron-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegidd%2Ftetrahedron-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegidd%2Ftetrahedron-table/lists"}