Add the ability to use parenthesis comments, as well as shorthand functions for machine stops#75
Open
fake-name wants to merge 8 commits intojminardi:masterfrom
Open
Add the ability to use parenthesis comments, as well as shorthand functions for machine stops#75fake-name wants to merge 8 commits intojminardi:masterfrom
fake-name wants to merge 8 commits intojminardi:masterfrom
Conversation
added 5 commits
January 5, 2022 20:49
… of parenthesis. Added facilities for inserting machine and optional stops, as well as just inserting comments without any associated command.
Contributor
Author
|
I'm tempted to just coerce negative values smaller then the output formatting epsilon to zero. That would fix the weirdness which is outputting -0. |
Contributor
Author
|
Oh, I forgot. there's also facilities in there for moving a 4th axis. Nothing to do with coordinated motion, but |
Collaborator
|
I've merged this PR into https://github.com/xloem/mecode . Tests all pass after I removed some spurious whitespace from the expected output. The repository has automatic pull request merging enabled for the future. |
added 2 commits
February 3, 2026 15:33
`g.teardown()` was failing to close files because the check if it should close an open fd was backwards.
… mode. It probably doesn't handle arcs right.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Effectively the title.
LinuxCNC (and Tormach, as a result) have some fancy gcode features that REQUIRE parenthesis comments. This patch lets you use parenthesis by moving the comment formatting into it's own function.
Also, there are shorthand functions for emitting
M00 (optional comment)andM01 (optional comment)gcode, as well as just inserting a comment as it's own line.Tests are mostly passing. The
test_printercalls seem to require a device to be connected (even withmockinstalled).One of the matrix tests is also failing:
but that just looks like a floating point weirdness that's not /really/ a problem, probably some vague difference in platform math libraries. It does mean that it'd probably be best to allow a epsilon error on the matrix test results, but implementing that would be a major pain (you'd have to parse the generated gcode to extract the actual values).
I also ran into the fact that
efd_pico_pulse.pyhad mixed indentation (spaces/tabs) when trying to run the tests (sidenote:python setup.py testtries to import everything, but didn't actually run any tests). I'm assuming that file hasn't been touched since python 2. Anyways, I fixed that.