openrndr / orx

A growing library of assorted data structures, algorithms and utilities for OPENRNDR
https://openrndr.org
BSD 2-Clause "Simplified" License
119 stars 35 forks source link

[orx-g-code] Add g-code tools for pen plotting #285

Open adriandieter opened 1 year ago

adriandieter commented 1 year ago

An extension to generate g-code from compositions, best used in a live coding environment. The intended use is for a pen plotter, but code to drive a laser cutter or other CNC machines could be generated as well. I have used the foundation of this for a while now and tried to wrap everything in an more general and easy to use interface. See the README and demo files on how to use.

Feedback is appreciated ✨

hamoid commented 1 year ago

Oh nice!! :-) I will take a look in the next days. I do have an Axidraw. Do you know if it's compatible? With what kind of devices have you tried your orx?

adriandieter commented 1 year ago

From a quick search it looks like the Axidraw does not speak g-code at all natively 🤷‍♂️ I am using a GkDraw only tested with that. It uses grbl firmware. So I guess any similar Axidraw knockoff plotter would be compatible.

However the implementation should allow for customization to any g-code dialect or device. So a 3d printer fitted with a pen holder would work as well 🤔

adriandieter commented 1 year ago

Thanks @Vechro for the suggestions on the build files! That's where I was a bit lost and didn't know what to follow/what is best practice. Also updated the test files.

I'd like to keep this as a draft for a bit and continue using it with that interface before merging. Just to prevent any bigger changes once merged. Do you think the design of the Plot extension matches other extensions or see anything that could be improved? I am not too happy with how the configuration/setup works.

Vechro commented 1 year ago

Maybe @edwinRNDR can answer that. I can mostly offer advice on the build scripts.

adriandieter commented 8 months ago

I did continue using it a bit since I opened the PR and didn't see any issues with the API so far. Think this is ready to be merged 🤔

hamoid commented 6 months ago

Sorry for the long latency! I'm writing a post in the guide about pen plotters and it motivated me to look into this. It would be good to offer both SVG and g-code.

hamoid commented 6 months ago

Do you think the design of the Plot extension matches other extensions or see anything that could be improved? I am not too happy with how the configuration/setup works.

Maybe @edwinRNDR has now more time to say something about this?