[orx-g-code] Add g-code tools for pen plotting - #285
Conversation
|
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? |
|
From a quick search it looks like the Axidraw does not speak g-code at all natively 🤷♂️ 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 🤔 |
450d39f to
f49bbc9
Compare
|
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. |
|
Maybe @edwinRNDR can answer that. I can mostly offer advice on the build scripts. |
a1d93ac to
0dce010
Compare
|
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 🤔 |
| extend(plot) { | ||
| generator = basicGrblSetup() | ||
|
|
||
| // Set output files to be exported to tmp |
| generator = basicGrblSetup() | ||
|
|
||
| // Set output files to be exported to tmp | ||
| // "g" to export g-code. |
| // Export each layer to separate file | ||
| layerMode = LayerMode.MULTI_FILE | ||
|
|
||
| // Set output files to be exported to tmp |
| layerMode = LayerMode.MULTI_FILE | ||
|
|
||
| // Set output files to be exported to tmp | ||
| // "g" to export g-code. |
|
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. |
Maybe @edwinRNDR has now more time to say something about this? |
|
Any news? Would be a cool feature |
|
Are you familiar enough with OPENRNDR @linde9821 to give it a try and report back your impressions? You would need to build a local snapshot of OPENRNDR and ORX, including this PR. You wouldn't need the openrndr-template, as you could use the demos under this ORX. |
|
@hamoid Sorry but Iam not familiar enough with OPENRNDR |
|
No problem. Do you have a device or software that reads g-code to test? |
|
Thanks for the review and sorry for the late response. Lost the focus on this. I'll look into your suggestions and might change the interfaces a bit. |
- add kotlin-multiplatform conventions plugin with id - Composition & CompositionDrawer moved to orx - Segment renamed to Segment2D - use oshai instead of mu KotlinLogging - remove runtimeOnly(libs.slf4j.simple) dependencies
|
Nice to hear @adriandieter :) Let me know if you need any feedback. I've been adding a |
Adds GeneratorContext class to make composition traversal more flexible. Improves options for custom Gcode generators.
It is replaced by the BasicGrblGenerator.
0dce010 to
86c5770
Compare
|
@hamoid implemented my changes and added some demos and documentation. This makes it much easier to customize how the g-code is generated. Also got it working with my existing projects, so should be good to go 🙌 |
hamoid
left a comment
There was a problem hiding this comment.
Looking good. Only left some minor comments.
|
Thanks for the review and approval! Can we merge this soon? It's been open for so long and it would be nice, to have it closed done 🙏 |
|
Hey this looks super neat! apologies for taking so long for merging it in. @adriandieter would you like me to add you to the openrndr organization and allow you to create branches for orx-g-code? |
|
@adriandieter Finally merged :-) Some small issues in the readme:
|
|
@edwinRNDR sure, sounds good! |
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 ✨