{"id":46006570,"url":"https://github.com/ierror/synaps-cad","last_synced_at":"2026-03-10T14:07:56.606Z","repository":{"id":341025442,"uuid":"1168441553","full_name":"ierror/synaps-cad","owner":"ierror","description":"The AI-powered 3D CAD IDE — edit code, visualize in 3D, and reshape your designs with natural language.","archived":false,"fork":false,"pushed_at":"2026-03-04T12:06:08.000Z","size":6486,"stargazers_count":194,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-05T06:54:44.384Z","etag":null,"topics":["3d-modeling","3d-models","3d-printing","claude","gemini","generative-ai","openai","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ierror.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-27T11:50:15.000Z","updated_at":"2026-03-05T06:33:14.000Z","dependencies_parsed_at":"2026-03-05T03:01:24.621Z","dependency_job_id":null,"html_url":"https://github.com/ierror/synaps-cad","commit_stats":null,"previous_names":["ierror/synaps-cad"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ierror/synaps-cad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ierror%2Fsynaps-cad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ierror%2Fsynaps-cad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ierror%2Fsynaps-cad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ierror%2Fsynaps-cad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ierror","download_url":"https://codeload.github.com/ierror/synaps-cad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ierror%2Fsynaps-cad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30161345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"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":["3d-modeling","3d-models","3d-printing","claude","gemini","generative-ai","openai","rust"],"created_at":"2026-02-28T23:10:46.621Z","updated_at":"2026-03-06T04:01:09.997Z","avatar_url":"https://github.com/ierror.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SynapsCAD\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/splash@2x.png\" alt=\"SynapsCAD\" width=\"260\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  The AI-powered 3D CAD IDE — edit code, visualize in 3D, and reshape your designs with natural language.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Vibe Code your 3D models!\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003e ⚠️ **Early Prototype** — Not all OpenSCAD code will compile correctly yet. Start with simple models and expect rough edges. Bug reports with code snippets that cause issues are very welcome!\n\n\u003cbr\u003e\n\n## See SynapsCAD in Action\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"assets/Screenshot-2026-02-28.png\"\u003e\n    \u003cimg src=\"assets/Screenshot-2026-02-28.png\" alt=\"SynapsCAD Screenshot\" width=\"100%\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nA desktop 3D CAD application that combines an OpenSCAD code editor, a real-time 3D viewport, and an AI assistant. Write OpenSCAD code, compile it to 3D models, visualize them interactively, and use AI to modify your designs through natural language — including context from 3D click interactions.\n\n## Download\n\nPre-built binaries for Linux, macOS (Apple Silicon \u0026 Intel), and Windows are available on the [Releases](https://github.com/ierror/synaps-cad/releases) page.\n\n## Building from Source\n\n### Prerequisites\n\n- **Rust** (stable toolchain)\n- An AI provider API key (e.g. `ANTHROPIC_API_KEY`) for the chat assistant\n\n### Quick Start\n\n```sh\ncargo run\n```\n\n### AI Provider Setup\n\nSynapsCAD uses the [genai](https://crates.io/crates/genai) crate to connect to AI providers — including **local models via [Ollama](https://ollama.com)** for fully offline, private usage (no API key needed). Set the API key for your chosen cloud provider as an environment variable:\n\n| Provider  | Environment Variable |\n| --------- | -------------------- |\n| Anthropic | `ANTHROPIC_API_KEY`  |\n| OpenAI    | `OPENAI_API_KEY`     |\n| Gemini    | `GEMINI_API_KEY`     |\n| Groq      | `GROQ_API_KEY`       |\n| DeepSeek  | `DEEPSEEK_API_KEY`   |\n| Cohere    | `COHERE_API_KEY`     |\n| Fireworks | `FIREWORKS_API_KEY`  |\n| Together  | `TOGETHER_API_KEY`   |\n| xAI       | `XAI_API_KEY`        |\n| ZAI       | `ZAI_API_KEY`        |\n| Ollama    | _(no key needed)_    |\n\n```sh\nexport ANTHROPIC_API_KEY=\"sk-...\"\ncargo run\n```\n\nWhen an env var is set, the UI shows it as active. You can also enter or override the key in **⚙ AI Settings** within the app.\n\nThis opens a window with a 3D viewport on the right and a side panel on the left containing the code editor and AI chat.\n\n### Basic Workflow\n\n1. Write or edit OpenSCAD code in the editor panel\n2. Click **Compile** — SynapsCAD parses and evaluates the code using scad-rs and renders CSG geometry via csgrs\n3. Ask the AI assistant to modify your model — it sees your current code and part labels, and can update the code automatically\n\n## Architecture Overview\n\nSynapsCAD is a single-binary Rust application built on three main pillars:\n\n### Runtime Stack\n\n| Layer            | Technology                                               | Role                                                               |\n| ---------------- | -------------------------------------------------------- | ------------------------------------------------------------------ |\n| Rendering \u0026 ECS  | **Bevy 0.15**                                            | 3D viewport, entity management, frame loop                         |\n| UI               | **bevy_egui** (egui 0.31)                                | Side panel with code editor and chat interface                     |\n| OpenSCAD parsing | [**openscad-rs**](https://github.com/ierror/openscad-rs) | Lossless, resilient OpenSCAD parser                                |\n| CSG rendering    | **csgrs**                                                | Constructive solid geometry — boolean ops, primitives, mesh output |\n| Export           | **lib3mf**                                               | 3MF export with per-part colors; STL and OBJ exported natively     |\n| AI               | **genai**                                                | Unified client for OpenAI / Anthropic / Gemini APIs                |\n| Async            | **Tokio**                                                | Background runtime for AI network calls                            |\n\n### Key Design Decisions\n\n- **Bevy owns the main thread.** The Bevy app loop drives rendering and ECS systems. A separate Tokio runtime is stored as a Bevy `Resource` and used only for spawning async AI tasks.\n\n- **`std::sync::mpsc` bridges async to sync.** Background tasks (compilation, AI streaming) send results through channels. Bevy systems poll with non-blocking `try_recv()` each frame, keeping the viewport responsive.\n\n- **Pure-Rust compilation pipeline.** OpenSCAD code is parsed by `scad-syntax`, evaluated by a built-in AST walker, and rendered to triangle meshes via `csgrs` — no external tools or WASM required.\n\n- **Built-in mesh picking.** Bevy 0.15's `MeshPickingPlugin` provides ray-cast picking via the observer pattern — no external picking crate needed.\n\n### System Pipeline\n\n```\nui_layout_system          — render egui side panel (editor + chat)\n    ↓\ntrigger_compilation_system — if code is dirty, spawn compilation in a thread\n    ↓\npoll_compilation_system    — check if compilation finished, load mesh\n    ↓\nai_send_system             — if chat submitted, spawn AI request on tokio\n    ↓\nai_receive_system          — poll AI response, update chat + code\n    ↓\nadjust_camera_viewport     — resize 3D viewport to account for side panel\n    ↓\norbit_camera_system        — process mouse/keyboard input for 3D navigation\n    ↓\nzoom_to_fit_system         — auto-frame model after compilation\n```\n\n## Keyboard Shortcuts\n\n| Action               | Key   |\n| -------------------- | ----- |\n| **Toggle gizmos**    | `G`   |\n| **Toggle labels**    | `L`   |\n| **Keyboard shortcuts** | `?` |\n\n## 3D Viewport Navigation\n\nSynapsCAD uses **Blender-style** camera controls:\n\n| Action          | Control                                               |\n| --------------- | ----------------------------------------------------- |\n| **Orbit**       | Middle mouse button drag _or_ Right mouse button drag |\n| **Pan**         | Shift + Middle mouse button drag                      |\n| **Zoom**        | Scroll wheel, `+`/`-` keys                            |\n| **Move focus**  | `W`/`A`/`S`/`D` or Arrow keys                         |\n| **Front view**  | `1`                                                   |\n| **Back view**   | `2`                                                   |\n| **Right view**  | `3`                                                   |\n| **Left view**   | `4`                                                   |\n| **Top view**    | `5`                                                   |\n| **Bottom view** | `6`                                                   |\n| **Isometric**   | `7`                                                   |\n\n## Contact\n\n[@boerni@chaos.social](https://chaos.social/@boerni)\n\n## License\n\nGPL v3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fierror%2Fsynaps-cad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fierror%2Fsynaps-cad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fierror%2Fsynaps-cad/lists"}