Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

adriandieter
Copy link

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
Copy link
Member

hamoid commented Dec 30, 2022

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
Copy link
Author

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 🤔

orx-g-code/build.gradle.kts Outdated Show resolved Hide resolved
orx-g-code/build.gradle.kts Outdated Show resolved Hide resolved
orx-g-code/src/jvmTest/kotlin/TestGenerator.kt Outdated Show resolved Hide resolved
orx-g-code/build.gradle.kts Outdated Show resolved Hide resolved
@adriandieter
Copy link
Author

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
Copy link
Contributor

Vechro commented Jan 27, 2023

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

@edwinRNDR edwinRNDR added question Further information is requested enhancement New feature or request labels Apr 20, 2023
@adriandieter adriandieter marked this pull request as ready for review November 12, 2023 20:48
@adriandieter adriandieter marked this pull request as draft November 12, 2023 20:57
@adriandieter adriandieter marked this pull request as ready for review November 12, 2023 21:01
@adriandieter
Copy link
Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmp -> /tmp ?

generator = basicGrblSetup()

// Set output files to be exported to tmp
// "g" to export g-code.
Copy link
Member

@hamoid hamoid Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"g" -> Press "g" ?

// Export each layer to separate file
layerMode = LayerMode.MULTI_FILE

// Set output files to be exported to tmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmp -> /tmp

layerMode = LayerMode.MULTI_FILE

// Set output files to be exported to tmp
// "g" to export g-code.
Copy link
Member

@hamoid hamoid Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"g" -> Press "g"

@hamoid
Copy link
Member

hamoid commented Jan 23, 2024

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
Copy link
Member

hamoid commented Jan 23, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants