G-code is the common name for the widely-used computer numerical control (CNC) programming language defined in EIA-274.
Questions tagged [g-code]
117 questions
0
votes
1 answer
Post-Processing Script Slic3r replace value
I created a script to give me the filament consumption of each Z layer, then I created a new variable "U" to provide me with this data, but I needed this variable to be at the beginning of each layer, where is "U" so I could know the filament…

Antonio
- 3
- 2
0
votes
0 answers
i get always a 0 as a returned value, can anyone help me to extract that value and use it for further calculations ,and thanks
this is the code , i get always a 0 as a returned value, can anyone help me to extract that value and use it for further calculations , i'm new in python espessially software i just need your help and ill be gratefull , thank you very much
from…
0
votes
0 answers
What are A,B,C angles in gcodes of 5 axis cnc machines
I want to know what is the meaning of A, B, C angles in 5 axis g-codes and how to decode them and make transformation matrix of tool tip respect to machine.

gadjet's garage
- 1
- 4
0
votes
1 answer
is there anyway to Generate G-Code from STL file
I am working on a project to generate G-Code for 3D Model in STL Format.
Suggest me how I can do it
Basically this generated G-Code will be used with Milling CNC.

Anil Kumar
- 1
- 3
0
votes
1 answer
How to convert g-code arcs to SVG bezier arcs
I'm trying to work out a way to intrepret g-code into an SVG image. I can imagine to work with coordinates easily to draw straight lines, but I am struggling with arcs. I can't figure out how to interpret the I J system as an arc in…

Pi31
- 25
- 6
0
votes
0 answers
How to send multible g-code comands via pySerial without time-delay
I have a python script that creates a serial connection to my Arduino-Mega (ramps1. 4). I am using the pyserial library, with which I send G-Code commands via the COM. There "Marlin 2.0x" reads the input and acts on any G-Code.
So far everything…

CNord
- 1
0
votes
1 answer
Find, multiply and replace numbers in strings, by line
I'm scaling the Gcode for my CNC laser power output. The laser's "S" value maxes at 225 and the current file scale is 1000. I need to multiply only/all S values by .225, omit S values of 0, and replace in the string for each line. There are…

Gabriel Heater
- 1
- 1
0
votes
1 answer
Algorithm for scaling irregular polygons
A syntax called 'gcode' is used to tell CNC engraving machines how to move.
An example of gcode is as follows :
G00 Z1 F800 (lift z axis by 1mm)
G00 X49.546785 Y-11.48703 F800 (Go to these coordinates at 800mm/m)
G01 Z-0.35 F100 (Penetrate. Lower…

Richard
- 1,070
- 9
- 22
0
votes
2 answers
X,Y coordinate to gcode
I'm working on a computer science project which is a CNC plotter basically all of the methods I see for getting Gcode uses Inkscape. I have already written software to convert Normal images to black and white edges only and I have pulled the…

Okezie Agazie
- 9
- 1
- 4
0
votes
0 answers
Google App Script - TypeError: Cannot read property 'getResponse' of undefined
I'm following a tuturial on how to automatically change filenames on files uploaded through a Google Form. Upon running the script I get the following error:
TypeError: Cannot read property 'getResponse' of undefined
RenameResponses @…

tTownTom
- 11
- 2
0
votes
0 answers
What fields to take into consideration in a .dxf file to obtain an accurate G-Code?
I would like to convert the drawings inside a .dxf file into g-code. There are tools doing that but I would like to code it myself. So, the very first part is to decode the .dxf format.
I downloaded a .dxf file here and opened it in a "text editor".…

Xfce4
- 557
- 5
- 28
0
votes
1 answer
Search .gcode file for string starting with specific letters
I have a file called test.gcode. This file contains the following data:
N100(ROUGH FACE/OD - CNGP-432HP KC5410 )
G00G20G40G54G99X10.0Z10.0T0000
G00T0101
G50S2200
G97S1400M03P11
G96S1200
G00X3.8(X3.7)Z.2M8
Z.03
G1Z.005F.020
X-.07F.01
G00Z.1…

jmarusiak
- 145
- 2
- 13
0
votes
1 answer
Modifying Gcode mid-print in response to sensor feedback for concept printer
I'm developing a concept printer that burns images onto wood using a magnifying glass on an xy plotter. One of my anticipated challenges is an inconsistent print quality as a result of changing lighting conditions (e.g., atmosphere, clouds).
My plan…

Josh Ruchty
- 1
- 1
0
votes
0 answers
Find circle center by 3 points on perimeter - convert C# code into G-CODE
I am new to G-code -
Trying to convert the c# code to G-code syntax -
Finding the center of a circle by 3 points on the perimeter to find the center of a circle.
Trying to convert the c# code to G-code syntax -
Finding the center of a circle by 3…
0
votes
0 answers
is there another way to read stl file in python?
whenever I try to do (from stl import mesh) I got this error: "No name 'mesh' in module 'stl' pylint(no-name-in-module)"
I tried to do this :
pip install stl
pip install numpy-stl
and is there any possible way to convert stl files into G-code…

ahmad
- 1
- 2