Rotation

Scale








The strings $BED_TEMP and $HOTEND_TEMP will get substituted.

Download

Header

Footer


Documentation

Demo

Disclaimer

This is still alpha software and you should be comfortable proofreading the gcode for sanity checks before running it on your machine!

Overview

This is a way to generate gcode for 3D printing shapes that are defined by a series of curves. The first experiments I did with this idea are documented in this video and were done with a couple of Python scripts and Blender. I wanted a more interactive way to create and preview these objects, so I began work on this program. It is an okay first draft.

The shape is generated by starting with a 2D curve and applying some transformation to it many times. We then stack these curves on top of each other and connect them so they are one continous curve with continuous z travel similar to vase mode. In this program, the transformation is defined by two curves, one for rotation and one for scale. For each layer we generate, we can use its layer index to lookup the corresponding rotation and scale and apply it to the original curve (ie layer 10/100 would use the y value of the point 10% along the length of the curve). An extra line segment is added between layers as the end of the previous layer might not be the same as the start of the next layer.

How to Use

Edit in Draw mode or upload an SVG curve. Play with the scale and rotation curves. Change how many layers you want. Double check your bounding box size. Hit Generate Gcode, right click save link as..., print!

Curve Editors
Click and drag to move points. Double click to add points. Right click to remove points. The rotation and scale curves are catmull rom and don't have bezier handle controls.
Draw Mode
Same controls as Curve Editors. Toggle `Lines?` to use straight lines instead of catmull rom
Generate Polygon
Replaces the curve in the Draw box with an n-sided polygon
SVG Mode
You can upload your own SVG and pick which path to use with the dropdown. I've included a doodle of my own as an example. You might run into unsupported curve types like Ellipse curve.
Generate Gcode
Hit this button when you want to generate gcode. A link will appear which if you click it will open the generated gcode in a new tab. Or you can right click to download it.
Preview Extrude
When enabled, the preview will extrude a circular profile along the path and generate a mesh. This gives it more depth and looks a bit better, but gets slow very quickly even at only ~100 layers. When disabled, the preview is just wireframe lines with no thickness.
Preview Rainbow
When not using `Preview Extrude`, enabling this will color the lines with a nice rainbow gradient. This aids in seeing more depth than just the lines give alone. `By Distance to center` uses the distance from the center as the lerp value in the gradient and `By Layer` uses the z value as the lerp value.
Clamp Distance
Enabling this will prevent a point from moving further than this amount from its previous position in the layer below. This makes it much easier to generate printable object since the layers will stack well. You can play with this value in conjunction with line width to allow steeper angles
Segment Length
After generating the curve, we break it into linear segments that are of this length. A longer length will lose some quality but can remove blobs (see this video)
Bed Size
Currently this only impacts the generated gcode by positioning the median point of the curve on the center of the build plate. The curve drawing box below won't update but the gcode will be different
Line Width
I am not 100% I am calculating the extrusion rate correctly but it seems to work okay in my testing.
Gcode Header
Gcode Footer
These are taken from the output of Cura for an Ender 3. Adjust to your own requirements.