{"id":21279147,"url":"https://github.com/jgphilpott/polyslice","last_synced_at":"2026-03-14T06:08:54.643Z","repository":{"id":225977987,"uuid":"543203998","full_name":"jgphilpott/polyslice","owner":"jgphilpott","description":"Where three.js intersects the physical world, slice your creations into life!","archived":false,"fork":false,"pushed_at":"2026-03-13T09:34:29.000Z","size":16720,"stargazers_count":51,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-13T16:21:28.112Z","etag":null,"topics":["fdm","fdm-3d-printing","gcode","gcode-generation","slice","slicer","slicing"],"latest_commit_sha":null,"homepage":"https://jgphilpott.github.io/polyslice","language":"CoffeeScript","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/jgphilpott.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["jgphilpott"],"custom":["https://www.buymeacoffee.com/jgphilpott"]}},"created_at":"2022-09-29T15:52:35.000Z","updated_at":"2026-03-13T09:34:32.000Z","dependencies_parsed_at":"2024-11-21T10:20:25.520Z","dependency_job_id":"05e920c9-cf59-4586-9e03-b8d815b740b8","html_url":"https://github.com/jgphilpott/polyslice","commit_stats":null,"previous_names":["jgphilpott/polyslice"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jgphilpott/polyslice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgphilpott%2Fpolyslice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgphilpott%2Fpolyslice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgphilpott%2Fpolyslice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgphilpott%2Fpolyslice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgphilpott","download_url":"https://codeload.github.com/jgphilpott/polyslice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgphilpott%2Fpolyslice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30488971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T03:54:44.308Z","status":"ssl_error","status_checked_at":"2026-03-14T03:51:34.988Z","response_time":57,"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":["fdm","fdm-3d-printing","gcode","gcode-generation","slice","slicer","slicing"],"created_at":"2024-11-21T10:20:05.355Z","updated_at":"2026-03-14T06:08:51.369Z","avatar_url":"https://github.com/jgphilpott.png","language":"CoffeeScript","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"183\" height=\"183\" src=\"./imgs/logo-lowpoly.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/jgphilpott/polyslice/actions\"\u003e\u003cimg src=\"https://github.com/jgphilpott/polyslice/actions/workflows/tests.yml/badge.svg\" alt=\"Polyslice Tests\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://badge.fury.io/js/@jgphilpott%2Fpolyslice\"\u003e\u003cimg src=\"https://badge.fury.io/js/@jgphilpott%2Fpolyslice.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Polyslice\n\nAn AI powered [slicer](https://en.wikipedia.org/wiki/Slicer_(3D_printing)) designed specifically for the [three.js](https://github.com/mrdoob/three.js) ecosystem and inspired by the discussion on [this issue](https://github.com/mrdoob/three.js/issues/17981). The idea is to be able to go straight from a three.js mesh to a machine usable [G-code](https://en.wikipedia.org/wiki/G-code), thus eliminating the need for intermediary file formats and 3rd party slicing software.\n\n[Polyslice](https://jgphilpott.github.io/polyslice) is designed to streamline and automate the 3D printing workflow. Whether you're designing models in three.js or loading existing STL, OBJ, or other 3D files, Polyslice can process them and generate machine ready G-code. With built-in support for popular printers/filaments and the ability to send G-code directly to your 3D printer via [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API) or [serialport](https://www.npmjs.com/package/serialport), the entire design-to-print workflow becomes seamless and programmable. It can work in both a web browser or Node.js environment, this makes 3D printing more accessible and eliminates the friction of using multiple tools.\n\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\u003cem\u003eClick the image below to watch the demo video on YouTube:\u003c/em\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=V2h3SiafXRc\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/jgphilpott/jgphilpott/main/imgs/social/light/youtube.png\" alt=\"Polyslice Demo Video\" width=\"72\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n### Node.js\n\n#### Install\n\n```bash\nnpm install @jgphilpott/polyslice\n```\n\n#### Import\n\n```javascript\n// CommonJS\nconst THREE = require(\"three\");\nconst { Polyslice, Printer, Filament, Loader, Exporter } = require(\"@jgphilpott/polyslice\");\n\n// ES module\nimport * as THREE from \"three\";\nimport polyslice from \"@jgphilpott/polyslice\";\nconst { Polyslice, Printer, Filament, Loader, Exporter } = polyslice;\n```\n\n### Browser\n\nFor browser usage, use the ES module-compatible bundle:\n\n```html\n\u003cscript type=\"importmap\"\u003e\n{\n    \"imports\": {\n        \"three\": \"https://unpkg.com/three@0.183.2/build/three.module.min.js\",\n        \"@jgphilpott/polyslice\": \"https://unpkg.com/@jgphilpott/polyslice/dist/index.browser.esm.js\"\n    }\n}\n\u003c/script\u003e\n\n\u003cscript type=\"module\"\u003e\nimport * as THREE from \"three\";\nimport { Polyslice, Printer, Filament, Loader, Exporter } from \"@jgphilpott/polyslice\";\n\u003c/script\u003e\n```\n\nThe ESM browser bundle (`index.browser.esm.js`) is designed for browser `import`/`importmap` usage, while the script-tag bundles (`index.browser.js` and `index.browser.min.js`) are legacy IIFE builds that expose a global `Polyslice` (along with `Printer`, `Filament`, `Loader` and `Exporter`) for direct `\u003cscript\u003e` usage.\n\n## Quick Start\n\nHere is a simple example to get you started:\n\n```javascript\n// Require THREE, Polyslice, Printer and Filament (omit for browser)\nconst THREE = require(\"three\");\nconst { Polyslice, Printer, Filament } = require(\"@jgphilpott/polyslice\");\n\n// Create the printer and filament objects\nconst printer = new Printer(\"Ender3\");\nconst filament = new Filament(\"GenericPLA\");\n\n// Create the slicer instance with the printer, filament and other configs\nconst slicer = new Polyslice({\n  printer: printer,\n  filament: filament,\n  infillPattern: \"triangles\",\n  infillDensity: 30,\n  testStrip: true,\n  verbose: true\n});\n\n// Create a 1cm cube (10mm x 10mm x 10mm)\nconst geometry = new THREE.BoxGeometry(10, 10, 10);\nconst material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });\nconst cube = new THREE.Mesh(geometry, material);\n\n// Slice the cube and generate the G-code\nconst gcode = slicer.slice(cube);\n```\n\n**To run this example locally follow these steps:**\n\n1) Clone the Polyslice repo: `git clone git@github.com:jgphilpott/polyslice.git`\n2) Navigate into the repo directory: `cd polyslice`\n3) Install the node modules: `npm install`\n4) Compile the code: `npm run compile`\n5) Run the example script: `node examples/scripts/quick-start.js`\n\n## Features\n\nPolyslice provides a comprehensive set of features for the 3D printing workflow:\n\n| Feature | Description | Documentation |\n|---------|-------------|---------------|\n| 🚀 **Direct three.js integration** | Work directly with three.js meshes and scenes | [Examples](docs/examples/EXAMPLES.md) |\n| 📁 **File format support** | STL, OBJ, 3MF, AMF, PLY, GLTF/GLB, Collada | [Loaders](docs/loaders/LOADERS.md) |\n| 📝 **G-code generation** | Full set of G-code commands with configurable precision | [G-code](docs/slicer/gcode/GCODE.md) |\n| 📊 **Print statistics** | Automatic calculation of filament usage, material weight, and print time | [G-code](docs/slicer/gcode/GCODE.md) |\n| ⚙️ **Printer profiles** | 44 pre-configured printer profiles | [Printer Config](docs/config/PRINTER.md) |\n| 🧵 **Filament profiles** | 35 pre-configured filament profiles | [Filament Config](docs/config/FILAMENT.md) |\n| 🔲 **Infill patterns** | Grid, triangles and hexagons patterns (more coming) | [Infill](docs/slicer/infill/INFILL.md) |\n| 🧱 **Wall generation** | Configurable wall thickness | [Walls](docs/slicer/walls/WALLS.md) |\n| 🎨 **Skin layers** | Top/bottom solid layers with exposure detection | [Skin](docs/slicer/skin/SKIN.md) |\n| 🏗️ **Support structures** | Automatic support generation | [Support](docs/slicer/support/SUPPORT.md) |\n| 🔗 **Build plate adhesion** | Skirt, brim, and raft support for first-layer stability | [Adhesion](docs/slicer/adhesion/ADHESION.md) |\n| 📊 **Progress feedback** | Real-time progress callbacks for long slicing operations | [API](docs/api/API.md#progress-feedback) |\n| 🔌 **Serial streaming** | Send G-code directly to printers | [Exporters](docs/exporters/EXPORTERS.md) |\n| 📏 **Precision control** | Optimize file size with configurable precision (20-30% reduction) | [G-code](docs/slicer/gcode/GCODE.md) |\n| 🌐 **Universal** | Works in Node.js and browsers | [API](docs/api/API.md) |\n\n## Documentation\n\nFor detailed documentation, see the [docs folder](docs/README.md):\n\n- [API Reference](docs/api/API.md) - Complete API documentation\n- [Examples](docs/examples/EXAMPLES.md) - Practical usage examples\n- [Development Guide](docs/development/DEVELOPMENT.md) - Contributing and development\n- [Tools](docs/tools/TOOLS.md) - G-code visualizer and sender\n- [Mesh Complexity](docs/slicer/MESH_COMPLEXITY.md) - Performance guidelines for complex meshes\n\n## Contributing\n\nContributions are welcome! Please feel free to [Open an Issue](https://github.com/jgphilpott/polyslice/issues) or submit a [Pull Request](https://github.com/jgphilpott/polyslice/pulls).\n\n## License\n\nMIT **©** [Jacob Philpott](https://github.com/jgphilpott)\n","funding_links":["https://github.com/sponsors/jgphilpott","https://www.buymeacoffee.com/jgphilpott"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgphilpott%2Fpolyslice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgphilpott%2Fpolyslice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgphilpott%2Fpolyslice/lists"}