{"id":16831493,"url":"https://github.com/nonoesp/voxel2gcode","last_synced_at":"2025-04-11T04:33:20.336Z","repository":{"id":69996414,"uuid":"66647594","full_name":"nonoesp/Voxel2GCode","owner":"nonoesp","description":"🕸 Transform geometric objects and voxel-based models into 3D-printable G-code instructions.","archived":false,"fork":false,"pushed_at":"2018-10-30T17:05:54.000Z","size":1823,"stargazers_count":32,"open_issues_count":1,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-25T02:40:18.222Z","etag":null,"topics":["digital","digital-fabrication","dynamo","fabrication","grasshopper","monolith","printing-3d","rhinocommon"],"latest_commit_sha":null,"homepage":"https://nono.ma","language":"C#","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/nonoesp.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}},"created_at":"2016-08-26T12:54:10.000Z","updated_at":"2024-12-14T00:27:46.000Z","dependencies_parsed_at":"2023-03-11T07:41:42.522Z","dependency_job_id":null,"html_url":"https://github.com/nonoesp/Voxel2GCode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonoesp%2FVoxel2GCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonoesp%2FVoxel2GCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonoesp%2FVoxel2GCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonoesp%2FVoxel2GCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonoesp","download_url":"https://codeload.github.com/nonoesp/Voxel2GCode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345202,"owners_count":21088231,"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":["digital","digital-fabrication","dynamo","fabrication","grasshopper","monolith","printing-3d","rhinocommon"],"created_at":"2024-10-13T11:44:03.845Z","updated_at":"2025-04-11T04:33:20.277Z","avatar_url":"https://github.com/nonoesp.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voxel2GCode\n\n*A set of workflows to transform geometric objects and voxel-based models into 3D-printable G-code instructions.*\n\n![Material Gradients with Monolith](docs/img/main-header.jpg)\n\n`Voxel2GCode` is a project which aims for a flexible, customizable workflow for 3D printing, which started as part of the **Material Gradients with Monolith** project by [Nono Martínez Alonso](http://nono.ma) while working with the Autodesk Generative Design Group, during the summer of 2016.\nThe project facilitates the generation of custom printing and slicing workflows, in an effort to simplify the delivery of instructions to 3D printers and the fabrication of artifacts from geometric objects and voxel-based models with low cost multi-material 3D printers.\n\n[Tweet this](https://twitter.com/intent/tweet?text=Voxel2GCode%20transforms%20geometry%20%26%20voxel-based%20models%20into%203D-printable%20instructions%20w/%20%23gh3d%20@DynamoBIM%20github.com/nonoesp/Voxel2GCode%20by%20@nonoesp).\n\nIn a nutshell, Voxel2GCode provides five tools:\n* Voxel2GCodeCore as a standalone .NET library.\n* Voxel2GCodeRhinoCommon for scripting with C# using RhinoCommon.\n* Voxel2GCodeGH as a Grasshopper for Rhino plugin.\n* Voxel2GCodeDesignScript for scripting with C# using DesignScript.\n* Voxel2GCodeDynamo as a Dynamo package.\n\n## Download\n\n* [Voxel2GCode.zip](http://gettingarchitecturedone.com/files/Voxel2GCode.zip)\n* The voxel utilities of V2G require you to install [Monolith](http://monolith.zone/download), everything else should work fine without it.\n\n![Material Gradients with Monolith](docs/img/161117-artifacts.gif)\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Reference](#reference)\n* [Basic Usage](#basic-usage)\n\n## Installation\n\n### Voxel2GCode for Grasshopper and RhinoCommon\n\n* Copy and paste all files inside the `Voxel2GCode for Grasshopper` into your Grasshopper components folder -- accessible via `Grasshopper \u003e File \u003e Special Folders \u003e Components Folder`.\n* (In case you want to use the voxel components you'd have to install [Monolith](http://monolith.zone/download).)\n\n### Voxel2GCode for Dynamo and DesignScript\n\n* Open a new Dynamo document.\n* Under the nodes tab, click on `Import`, and select the `Voxel2GCode for Dynamo.dll` library.\n* (In case you want to use the voxel components you'd have to install [Monolith](http://monolith.zone/download).)\n\n### Voxel2GCodeCore.dll\n\n* You can use the `Voxel2GCodeCore.dll` library, for instance, as a reference in your C# project, or to script inside Grasshopper components.\n* (In case you want to use the voxel components you'd have to install [Monolith](http://monolith.zone/download).)\n\n## Reference\n\n### Voxel2GCodeCore\n\nA .NET library to write G-code instructions from geometric objects.\n\n* V2GModel\n* V2GPath\n* V2GSettings\n* V2GSlice\n* V2GState\n\n#### Primitives\n\n* V2GPoint\n* V2GLine\n* V2GCurve\n* V2GVoxelPoint\n\n#### Printables\n\nGeometric objects augmented with printing metadata.\n\n* V2GPrintable\n* V2GPrintPosition\n* V2GPrintPolyline\n\n#### Instructions\n\n* V2GInstruction\n* V2GMovement\n* V2GPrintSegment\n\n#### Utilities\n\n* V2GGeometry\n* V2GMath\n* V2GPrint\n* V2GVoxel\n\n### Voxel2GCodeRhinoCommon\n\nA .NET library for RhinoCommon-specific functions of Voxel2GCode. It subclasses and expands classes of the Core library to use specific RhinoCommon functions.\n\n* V2GRhinoCurve\n* V2GRhinoGeometry\n\n### Voxel2GCodeGH\n\nA Grasshopper for Rhino plugin.\n\n#### G-code\n\n* Construct PrintPoint\n* Construct PrintPolyline\n* Construct Printer\n* Construct Printing Settings\n* Construct Printer\n* *PrintingBoundaries (TODO)*\n* *Export G-code (TODO)*\n* Extract PrintPolylineData\n\n#### Slicer\n\n* Sort Curves\n* Get Bounding Frames\n* Get Slice Planes\n\n#### Voxel\n\n* Construct VoxelPoint\n* Get VoxelCurvePoints\n\nImplementation of Voxel2GCodeLib for Grasshopper.\n\n### Voxel2GCodeDesignScript\n\nA .NET library for DesignScript-specific functions of Voxel2GCode.\n\n* V2GDesignScriptCurve\n* V2GDesignScriptGeometry\n\n### Voxel2GCodeDynamo\n\nA ZeroTouch Dynamo package.\n\n* PrintPoint\n* PrintPolyline\n* PrintPolylineData\n* Printer\n* PrintSettings\n* Export  \n\u0026nbsp;\n* CurveSort\n* CurveSinusoidalPoints\n\n## Basic Usage\n\nHere are a few examples on how to use the library for scripting, with Grasshopper for Rhino, and with Dynamo. More in detail examples are being developed.\n\n### Voxel2GCodeCore\n\n#### Printing A Polyline\n\n```csharp\n// Create a printer\nV2GState printer = new V2GState();\n\n// Create a printable model\nV2GModel model = new V2GModel();\n\n// Create a list of points to hold positions\nList\u003cV2GPoint\u003e positions = new List\u003cV2GPoint\u003e();\n\n// Add positions\npositions.Add(new V2GPoint(25.0, 40.0, 0.0));\npositions.Add(new V2GPoint(30.0, 45.0, 0.0));\npositions.Add(new V2GPoint(35.0, 40.0, 0.0));\n\n// Create a printable polyline\nV2GPrintPolyline printPolyline = new V2GPrintPolyline();\nforeach(V2GPoint position in positions) {\n  Print(position.ToString() + \" \" + position.X);\n  printPolyline.AddPrintPosition(position);\n}\n\n// Append the printable polylines as paths to the model\nmodel.AppendAsPath(printPolyline);\n\n// Create a StringBuilder to store G-code\nSystem.Text.StringBuilder sb = new System.Text.StringBuilder();\nmodel.GenerateGCode(sb, printer);\n\n// Create a string with G-code\nstring GCode = sb.ToString();\n```\n\n#### Create a Printer with Custom Settings\n\n```csharp\n// Create a printer\nV2GState printer = new V2GState();\n\n// Create printing settings\nV2GSettings settings = new V2GSettings();\n\n// Override some parameters\nsettings.T0Temperature = 220.0;\nsettings.BedTemperature = 80.0;\nsettings.ZOffset = 0.5;\nsettings.Retraction_Length = 0.3;\n\n// Attach the settings to the printer\nprinter.SetSettings(settings);\n```\n\n### Voxel2GCodeGH\n\n#### Printing A Polyline With Custom Settings\n\n![Voxel2GCodeGH Polyline Workflow.](docs/img/160826-grasshopper-workflow.png)\n\n#### Extract Gradient and Contour Curves From A Monolith Vol File\n\n![Voxel2GCodeGH Voxel Workflow.](docs/img/160824-grasshopper-voxel-workflow.png)\n\n![Lemon — Contour and Gradient Curves with Voxel2GCode](docs/img/160824-contour-curves-filter-800px.gif)\n\n### Voxel2GCodeDynamo\n\n#### Printing A PolyCurve\n\n![Voxel2GCodeDynamo PolyCurve Workflow.](docs/img/160816-dynamo-workflow-polycurve.png)\n\n## Sample Files\n\nGrasshopper and Dynamo sample files will be posted soon.\n\n## Acknowledgements\n\nThe development of Voxel2GCode was sponsored by [Autodesk Inc](http://www.autodesk.com/), as part of a summer research residency project in Boston, 2016. Please take a look at the [detailed list of acknowledgments](docs/Acknowledgments.md).\n\nVoxel2GCode was created and is maintained by [Nono Martínez Alonso](http://nono.ma).\n\n## License\n\nVoxel2GCode is licensed under the [MIT license](LICENSE).\n\n## Me\n\nI'm [Nono Martínez Alonso](http://nono.ma) (nono.ma), a computational designer and architect with a penchant for simplicity.  \nI tweet at [@nonoesp](http://www.twitter.com/nonoesp) and write at [Getting Simple](http://gettingsimple.com/). If you use Voxel2GCode, I would love to hear about it. Thanks!\n\n## Contributing\n\nIn its early stages, Voxel2GCode sets a base structure for growth and flexibility. Any kind of contribution or collaboration is welcome. If you are interested in playing around with this library [shoot me a tweet](https://twitter.com/intent/tweet?text=Hi%20@nonoesp,%20I%27ve%20seen%20Voxel2GCode%20and%20your-message-here.).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonoesp%2Fvoxel2gcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonoesp%2Fvoxel2gcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonoesp%2Fvoxel2gcode/lists"}