← Back

ofxGCodePlotter

github.com/CarstenHoyer/ofxGCodePlotter · @CarstenHoyer
OF 0.10 3D / Point Cloud Algorithms

An ofPath-to-GCode converter addon that turns 2D vector paths into single-layer GCode for pen plotters and CNC machines.

1 0 Last commit 7y ago Created 7y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

feature/shortest-path 1 commit ahead · last commit 7y ago

README

ofxGCodePlotter

ofxGCodePlotter is an "ofPath to GCode" converter. It is currently very alpha and misses a lot of functionality.

ofxGCodePlotter will _never_ be a GCode library. I personally only use it for converting ofPaths in 2D into one layer GCode.

Usage

Install the addon like any other openFrameworks addon. ofxGCodePlotter uses ofxCubicBezierToBiarc to convert cubic bezier curves to arcs - so that addon will also be pulled in.

Next copy the example config file and adjust the settings as needed.

Then create an instance of ofxGCodePlotter like so: ofxGCodePlotter gcode = ofxGCodePlotter('path/to/config', width, height);.

Feed it with a vector of ofPaths: vector<GCodePath> paths = gcode.generate(shapes);

Print to the console: ``gcode.print(paths);

Limitations / Roadmap

Shortest path Print filled paths (hatching). Cut paths under a filled path. Do not print off canvas content. Inject a tool.

Liability

If you use this addon with your CNC machine things may break (including your machine). That is not my responsibility. See LICENSE.txt.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Get this addon

HTTPS
SSH