{"id":51022743,"url":"https://github.com/atelierarith/platonicsolidsgenerator.jl","last_synced_at":"2026-06-21T17:01:17.408Z","repository":{"id":359096234,"uuid":"1241229229","full_name":"AtelierArith/PlatonicSolidsGenerator.jl","owner":"AtelierArith","description":"PlatonicSolidsGenerator.jl","archived":false,"fork":false,"pushed_at":"2026-05-20T10:30:59.000Z","size":711,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T14:49:49.271Z","etag":null,"topics":["aigenerated","julia","julialang","makie"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AtelierArith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"terasakisatoshi"}},"created_at":"2026-05-17T05:44:16.000Z","updated_at":"2026-05-20T10:31:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AtelierArith/PlatonicSolidsGenerator.jl","commit_stats":null,"previous_names":["atelierarith/platonicsolidsgenerator.jl"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AtelierArith/PlatonicSolidsGenerator.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FPlatonicSolidsGenerator.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FPlatonicSolidsGenerator.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FPlatonicSolidsGenerator.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FPlatonicSolidsGenerator.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AtelierArith","download_url":"https://codeload.github.com/AtelierArith/PlatonicSolidsGenerator.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtelierArith%2FPlatonicSolidsGenerator.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34618484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aigenerated","julia","julialang","makie"],"created_at":"2026-06-21T17:01:16.350Z","updated_at":"2026-06-21T17:01:17.403Z","avatar_url":"https://github.com/AtelierArith.png","language":"Julia","funding_links":["https://github.com/sponsors/terasakisatoshi"],"categories":[],"sub_categories":[],"readme":"# PlatonicSolidsGenerator.jl\n\n![](./demo.png)\n\nPlatonicSolidsGenerator.jl is a Julia package for generating Platonic solids,\nvisualizing them with Makie.jl, and exporting them as STL files for 3D printing.\n\nThe package is designed for workflows that import STL files into slicers such\nas Bambu Studio. STL coordinates are treated as millimeters. Because STL files\ndo not store unit metadata, slicers should interpret the value passed to\n`bbox_mm` as millimeters.\n\n## Features\n\n- Generate all 5 Platonic solids:\n  - Tetrahedron `:tetrahedron` / `4`\n  - Cube `:cube` / `6`\n  - Octahedron `:octahedron` / `8`\n  - Dodecahedron `:dodecahedron` / `12`\n  - Icosahedron `:icosahedron` / `20`\n- 3D visualization with Makie.jl\n- Binary STL export\n- Maximum bounding-box size control with `bbox_mm`\n- Print-bed placement with `placement=:flat`\n- `write_mesh` API prepared for future 3MF export support\n\n## Provenance\n\nThis project was generated with Codex.\n\n## Installation\n\nTo use this repository as a local package:\n\n```julia\nusing Pkg\nPkg.develop(path=\"/path/to/PlatonicSolidsGenerator.jl\")\n```\n\nTo try it directly from this directory:\n\n```sh\njulia --project=.\n```\n\n```julia\nusing PlatonicSolidsGenerator\n```\n\n## Quick Start\n\n### Export an STL File\n\n```julia\nusing PlatonicSolidsGenerator\n\nwrite_mesh(\"cube.stl\", :cube; bbox_mm=30.0, placement=:flat)\nwrite_stl(\"icosahedron.stl\", :icosahedron; bbox_mm=40.0, placement=:flat)\n```\n\n`placement=:flat` places one face on the xy plane at `z=0` and ensures that all\nvertices have `z \u003e= 0`. This is convenient for STL files that will be imported\ninto slicers such as Bambu Studio.\n\n### Visualize with Makie\n\n```julia\nusing GLMakie\nusing PlatonicSolidsGenerator\n\nfig = visualize_solid(:dodecahedron; bbox_mm=30.0, placement=:flat)\ndisplay(fig)\n```\n\nChoose the Makie backend in the consuming application. Load GLMakie, WGLMakie,\nCairoMakie, or another backend before calling `visualize_solid`.\n\n### Get a GeometryBasics.Mesh\n\n```julia\nusing PlatonicSolidsGenerator\n\nmesh = platonic_solid(20; bbox_mm=25.0)\n```\n\n`platonic_solid` returns a `GeometryBasics.Mesh` that can be passed to Makie's\n`mesh!` and related APIs.\n\n## Placement\n\n`placement` accepts the following values:\n\n- `:center`: The default. Places the solid around the origin. Use this for\n  mathematical visualization and geometry checks.\n- `:flat`: Places one face on the xy plane at `z=0`. Use this for 3D printing.\n\nExample:\n\n```julia\ncentered = platonic_solid(:tetrahedron; bbox_mm=30.0, placement=:center)\nflat = platonic_solid(:tetrahedron; bbox_mm=30.0, placement=:flat)\n```\n\n## API\n\n```julia\nsupported_solids()\nplatonic_solid(kind; bbox_mm=30.0, placement=:center)\nvisualize_solid(kind; bbox_mm=30.0, placement=:center, axis=true)\nwrite_stl(path, kind; bbox_mm=30.0, placement=:center, name=nothing)\nwrite_mesh(path, kind; bbox_mm=30.0, placement=:center, format=:auto, metadata=Dict())\n```\n\n`kind` can be specified as a symbol or by number of faces.\n\n```julia\nplatonic_solid(:cube)\nplatonic_solid(6)\nwrite_mesh(\"solid.stl\", 12; bbox_mm=50.0, placement=:flat)\n```\n\n## 3MF Support\n\n`write_mesh` supports `.3mf` export directly:\n\n```julia\nwrite_mesh(\"cube.3mf\", :cube; bbox_mm=30.0, placement=:flat)\n```\n\nThe output is a spec-compliant ZIP archive containing `[Content_Types].xml`,\n`_rels/.rels`, and `3D/3dmodel.model`. Coordinates are written in millimeters.\n\n## Example\n\nGenerate STL files for all 5 supported solids under `exports/`:\n\n```sh\njulia --project=. examples/generate_solids.jl\n```\n\nGenerated files:\n\n```text\nexports/tetrahedron.stl\nexports/cube.stl\nexports/octahedron.stl\nexports/dodecahedron.stl\nexports/icosahedron.stl\n```\n\n## Testing\n\n```sh\njulia --project=. -e 'using Pkg; Pkg.test()'\n```\n\nThe tests cover:\n\n- The list of supported Platonic solids\n- Symbol-based and face-count-based solid selection\n- Scaling with `bbox_mm`\n- Bottom-face placement at `z=0` with `placement=:flat`\n- Triangle counts and file sizes for binary STL output\n- Explicit unsupported-format errors for `.3mf`\n- Makie visualization smoke tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatelierarith%2Fplatonicsolidsgenerator.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatelierarith%2Fplatonicsolidsgenerator.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatelierarith%2Fplatonicsolidsgenerator.jl/lists"}