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

Fixed G-code #4488

Merged
merged 4 commits into from
May 28, 2019
Merged

Fixed G-code #4488

merged 4 commits into from
May 28, 2019

Conversation

TannerReynolds
Copy link
Contributor

@TannerReynolds TannerReynolds commented Apr 7, 2019

  • Changed from data to programming -> CNC Programmers create gcode files that instruct machines where to move and what to do
  • Gave a color (#ff4d6b)
  • Added a commonly used file type for CNC programming (.cnc)

Description

G-code files are instructions written or generated by CNC/machine programmers to instruct machines where to move and what to do (Spindle speeds, move speed, feedrate, tooling, etc.) on a line-by-line basis. As a CNC/Machine programmer, I can tell you that they are not data files, just like any other high level language, they are written instructions to be interpreted by the machine. I have also included a file type that is commonly used for CNC programming.

Checklist:

  • I am associating a language with a new file extension. (Not new to GCode programming, but new to Github)

    • [?] The new extension is used in hundreds of repositories on GitHub.com Because it is currently not a programming language w/color, I cannot see the repository count. I do see thousands of gcode files with this extension, though.
    • I have included a real-world usage sample for all extensions added in this PR:
    • I have included a change to the heuristics to distinguish my language from others using the same extension. (While syntax is mostly the same, different machinery use different syntax, this language is a hard one to detect using heuristics)
  • I am adding a new language.

  • I am fixing a misclassified language

    • I have included a new sample for the misclassified language:
    • I have included a change to the heuristics to distinguish my language from others using the same extension.
  • I am changing the source of a syntax highlighting grammar

  • I am updating a grammar submodule

  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.

- Changed from `data` to `programming` -> CNC Programmers create gcode files that instruct machines where to move and what to do
- Gave a color (#ff4d6b)
- Added a commonly used file type for CNC programming (.mpf)
lib/linguist/languages.yml Outdated Show resolved Hide resolved
Tanner added 2 commits April 9, 2019 18:25
cnc is a more widely used file extension than mpf is
Sample CNC program for linguist
@TannerReynolds
Copy link
Contributor Author

@pchaigno I went ahead and fixed the commits/PR comment

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request!

I left a couple comments below.

As a CNC/Machine programmer, I can tell you that they are not data files, just like any other high level language, they are written instructions to be interpreted by the machine.

Are these files written by hand by humans or through a GUI/higher-level language?

lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
@TannerReynolds
Copy link
Contributor Author

TannerReynolds commented Apr 10, 2019

Are these files written by hand by humans or through a GUI/higher-level language?

@pchaigno

Just like html, css, and others, it depends. Small-medium sized manufacturers, hobbyists, people who prefer it, people who need lots of control over the machines, and even some bigger manufacturers have people who write all the code themselves. Usually manufacturers that require a large volume of different code to be written daily, and that have lots of money, will opt-out for some sort of generator, that is easier to teach, but far more expensive to use. Otherwise people generally tend to prefer hand writing the code, due to added control over the machines. Bigger manufacturers that create large volume of the same product will also opt for hand written code. Bigger manufacturers thay create large volumes of custom products per day (countertop fabricators, for example) will want to not hand write code, or they will generate a base using a GUI, and hand edit the code. I for one know how to do both, and decide on whether I'm going to code it myself, or use CAM to do it, on a use-by-use basis. I apologize if anything doesnt make much sense, I'm trying my best to explain how the G-code programming world works, as thos sort of programming is very different from traditional programming

Copy link
Contributor Author

@TannerReynolds TannerReynolds left a comment

Choose a reason for hiding this comment

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

Addressed concerns @pchaigno

@stale
Copy link

stale bot commented May 18, 2019

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the Stale label May 18, 2019
Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

LGTM, but would probably need other opinions on the change to type: programming.

@stale stale bot removed the Stale label May 18, 2019
@pchaigno pchaigno requested review from Alhadis and lildude May 18, 2019 16:36
Copy link
Collaborator

@Alhadis Alhadis left a comment

Choose a reason for hiding this comment

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

LGTM. 👍 I'm not familiar with G-code, but I've also seen people writing it out by hand, so this amendment is justified.

@lildude lildude merged commit 7805848 into github-linguist:master May 28, 2019
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants