Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Utility to create G-Code for drilling, milling and text engraving from a simple JSON input file.
The generator can generate G-Code for:
Rectangles and Circles are done in a spiral rough cut and a last fine cut.
WARNING: USE AT YOUR OWN RISK!
Please learn a little bit of G-Code (it is easy) to understand what you are doing: https://www.reprap.org/wiki/G-code
I.e. have a look at M3
/M5
/G2
/G21
/G92
/G0
/G1
/G2
/G3
sudo npm install --global gcode-gen
IMPORTANT: all files start with G92 to zero the coordinates from the current position. You must remove it from the output if you want a different behavior.
Example:
gcode-gen examples/A-Z0-9.json > examples/A-Z0-9.gcode
BTW: CAMotics is a great tool toto review the G-Code in 3d
IMPORTANT: all files start with G92
to set the current position as zero coordinates.
Move the tool to the desired (0,0) point, and move the z-axis down, so the tool touches the surface slightly. (Hint: i use s sheet of thin paper - if I can't move it any more, it is OK ;-)
Use your favorite G-Code sender tool - I use GRBL Controller
{
"PrjName": "Example",
"ToolDia": 3.0,
"SafeHeight": 3,
"CutSpeed":200,
"SpindleSpeed":1000,
"z": -2.5,
"passes": 4,
"Template": {
"AudioCh": [
{ "type": "Circle", "x":10, "y": 10, "r":10, "descr":"a circle },
]
},
"DoTemplates": [
{ "Template": "Test", "x": 0.0, "y": 0.0, "descr":"Test" }
]
}
JSON explained:
Each object can have a "descr" text, which is used in a comment.
See examples folder for more JSON examples.
The "text can be capital letters, numbers, space and a "-". Text can be rotated and/or mirrored.
{
"PrjName": "Text Rotation Example",
"ToolDia": 3.0,
"SafeHeight": 3,
"CutSpeed":200,
"SpindleSpeed":1000,
"fontZ": -0.05,
"Template": {
"TextRot": [
{ "type": "Text", "x":0, "y": 0, "text":" - ACBD-", "size":4, "dir": 45, "descr":"Text 90° mirrored" },
{ "type": "Text", "x":0, "y": 0, "text":" - ACBD-", "size":4, "dir":180, "mirror": true, "descr":"Text 90° mirrored" }
]
},
"DoTemplates": [
{ "Template": "TextRot", "x": 0.0, "y": 0.0, "descr":"Test" }
]
}
You can modify, extend the fonts or create your own fonts:
Clone the repo locally and edit gcode-gen.js
and modify the functions initArialNormal
or initArialSmall
.
You can use the gCodeABC.js
helper script to generate fonts from an Inkscape G-Code export.
FAQs
Ganerate G-Code from JSON input
We found that gcode-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.