{"id":19114615,"url":"https://github.com/aligator/goslice","last_synced_at":"2026-03-10T00:31:10.818Z","repository":{"id":40575085,"uuid":"255122629","full_name":"aligator/GoSlice","owner":"aligator","description":"This is an experimental slicer for 3d printing written in Go also usable as modular slicing lib.","archived":false,"fork":false,"pushed_at":"2023-10-11T08:57:31.000Z","size":8021,"stargazers_count":110,"open_issues_count":11,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T04:43:57.151Z","etag":null,"topics":["3d","3dprint","fdm","gcode","gcode-generation","go","golang","slicer","stl"],"latest_commit_sha":null,"homepage":"","language":"Go","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/aligator.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-04-12T16:20:43.000Z","updated_at":"2024-10-24T15:11:34.000Z","dependencies_parsed_at":"2024-06-19T00:24:38.129Z","dependency_job_id":"8d0b15fe-689b-4c1c-9cce-4e4ba9c921a6","html_url":"https://github.com/aligator/GoSlice","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligator%2FGoSlice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligator%2FGoSlice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligator%2FGoSlice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligator%2FGoSlice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligator","download_url":"https://codeload.github.com/aligator/GoSlice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224944599,"owners_count":17396256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","3dprint","fdm","gcode","gcode-generation","go","golang","slicer","stl"],"created_at":"2024-11-09T04:44:02.873Z","updated_at":"2026-03-10T00:31:10.440Z","avatar_url":"https://github.com/aligator.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![test](https://github.com/aligator/GoSlice/actions/workflows/test.yml/badge.svg)](https://github.com/aligator/GoSlice/actions/workflows/test.yml)\n\n\u003cimg width=\"200\" alt=\"sliced Gopher logo\" src=\"https://raw.githubusercontent.com/aligator/GoSlice/master/logo.png\"\u003e\n\n# GoSlice\n\nThis is a very experimental slicer for 3d printing. It is currently in a very early stage, but it can already slice models:\n\n__Supported features:__\n* perimeters\n* simple linear infill\n* rotated infill\n* top / bottom layer\n* simple temperature control\n* simple speed control\n* simple retraction on crossing perimeters\n* several options to customize slicing output\n* simple support generation\n* brim and skirt\n* custom start- / end-GCode\n\n\u003cimg width=\"200\" alt=\"sliced Gopher logo\" src=\"https://raw.githubusercontent.com/aligator/GoSlice/master/docs/GoSlice-print.png\"\u003e\n\n## For users\n### Use CLI\nProvides a basic command line interface. Just run with `--help` and see the description bellow.\n\nArch Linux / Manjaro:\n[AUR](https://aur.archlinux.org/packages/goslice/)\n```\nyay -S goslice\n```\n\nAll others:  \n\nDownload the latest release matching your platform from here:  \nhttps://github.com/aligator/GoSlice/releases\n\nUnpack the executable and run it in the commandline.  \nLinux / Mac:  \n```\n./goslice /path/to/stl/file.stl\n```\n\nWindows:  \n```\ngoslice.exe /path/to/stl/file.stl\n```\n\nIf you need the usage of all possible flags, run it with the `--help` flag:\n```\n./goslice --help\n```\n\nNote that some flags exist as --initial-... also which applies to the first layer only.\nThe non-initial apply to all other layers, but not the first one.\n\n### Use WebAssembly CLI + GCode viewer\nI created an experimental WebAssembly version.\nJust go to [aligator.dev](https://aligator.dev) and type \n```\ngoslice https://cdn.thingiverse.com/assets/7d/fc/6e/33/fe/3DBenchy.stl\n```\nIt accepts any stl file as link. After slicing it opens a gcode viewer and provides a download link for the gcode in the terminal.  \nNote that the webassebly version is much slower than native.\n\n### Use Web UI (by tobychui)\n[tobychui](https://github.com/tobychui) created a web frontend for GoSlice:  \n[SlicerA](https://github.com/tobychui/SlicerA) (also compatible with [ArOZ](https://github.com/tobychui/arozos))\n\n## For developers\n### Compile\nJust running GoSlice:\n```\ngo run ./cmd/goslice /path/to/stl/file.stl\n```\nTo get help for all possible flags take a look at /data/option.go or just run:\n```\ngo run ./cmd/goslice --help\n```\n\n### Distribute\nIdeally you should have make installed:\n```\nmake\n```\nThe resulting binary will be in the `.target` folder.\n\nIf you do not have make, you can still run the build command manually, but it is not recommended:\n```\ngo build -ldflags \"-X=main.Version=$(git describe --tags) -X=main.Build=$(git rev-parse --short HEAD)\" -o .target ./cmd/goslice\n```\n### How does it work\n[see here](docs/README.md)\n\n### Use as lib\nYou want to\n* Create a slicer but do not want to do everything of it?\n* Extend GoSlice functionality? (Please consider Pull Requests if you created a nice addition :-)\n* Create a new, user-friendly frontend?\n\n-\u003e Then you can do it with GoSlice!  \n\nTo do this you can copy the `goslice/slicer.go/NewGoSlice` function and just pass to GoSlice what you want.  \nYou can add new logic by implementing one of the various handler interfaces used by it.  \nIf you need even more control, you can even copy and modify the whole `goslice/slicer.go` file which allows you to\ncontrol how the steps are called after each other.  \nYou can find an example [here](https://github.com/aligator/dev/blob/main/go/goslice/main.go) where I used that to make GoSlice runnable as Webassembly.\n\n__Handler Interfaces:__  \nHere some brief explanation of the interfaces. For more detailed information just look into the code...  \n(And take a look at [the docs](docs/README.md) where I explained some aspects a bit deeper.)\n* Reader    handler.ModelReader\n  Is used to read a mesh file. GoSlice provides an implementation for stl files.\n\n* Optimizer handler.ModelOptimizer\n  Is responsible for  \n  1. checking the model\n  2. optimizing it by e.g. removing doubles\n  3. calculating some additional information, like the touching vertices etc. which is needed for the next step. The\n     implementation of GoSlice is currently very basic and may have problems with some models.\n\n* Slicer    handler.ModelSlicer  \n  Creates the slices (e.g. layers) out of the model. \n  It then tries to combine all lines to several polygons per each layer.\n  The implementation of GoSlice is again very basic, but it works.\n\n* Modifiers []handler.LayerModifier  \n  This is the most interesting part: Modifiers are called after each other and \n  Calculate things like perimeters, infill, support, ...\n  They add this information as \"Attributes\" which is basically just a map of interface{}.\n  GoSlice already provides several basic modifiers.\n\n* Generator handler.GCodeGenerator  \n  The generator then generates the final gcode based on the data the modifiers added.\n  The implementation of GoSlice is basically a collection of `Renderer` which often just match one modifier.\n  You can provide your own, additional Renderers or even replace existing ones.\n\n* Writer    handler.GCodeWriter  \n  This is the last part, and it basically just writes the gcode to somewhere.\n  You could for example provide a writer which directly sends the gcode to OctoPrint.\n  The default implementation just writes it to a gcode file.\n\n### Contribution\nYou are welcome to help.  \n[Just look for open issues](https://github.com/aligator/GoSlice/issues) and pick one, create new issues or create new pull requests.\n\nFor debugging of the GCode I suggest you to use Cura to open the resulting GCode.\nCura can open it without any problem and I try to add the markings into the GCode which Cura understands (e.g. mark what is infill, perimeter, etc.).\n\n# Credits\n* CuraEngine for the great first commit, which was a very good starting point for research.\n* https://www.thingiverse.com/thing:3413597 for the great Gopher model used as logo. (Original Gopher designed by [Renee French CC BY 3.0](http://reneefrench.blogspot.com/))\n* Go for the great language.\n* All libs GoSlice uses. (just take a look at go.mod)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligator%2Fgoslice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligator%2Fgoslice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligator%2Fgoslice/lists"}