• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Guest,  We want to wish You and Your Family a Healthy, Happy Thanksgiving! Click the "X" at the top right corner to remove this notice)
  • PLEASE: Read the FORUM RULES BEFORE registering!


G-Code for a chess piece

Like what you see?
Click here to donate to this forum and upgrade your account!


Registered Member
Sep 14, 2017
Hello everyone,
I am doing a project at my uni which is making a chess piece using CNC machine. I need to design the shape of the chess and write a g-code for it. This g-code will be used for turning and milling machine with X Z axis. I have done my design, it looks simple but I am stuck at writing g-code. I need some help. Could anybody please help me to write a g-code for it? Thank you very much.



Active User
Active Member
Oct 14, 2014
Gcode is HIGHLY machine specific. Nobody can give a you a plug'n'play Gcode in most cases, unless they have the identical machine and control.


H-M Supporter - Premium Member
H-M Supporter-Premium Member
Feb 1, 2015
Creating g code for machining a piece depends on a lot of additional factors, including the machine, choice of material, and choice of tooling. You have given the forum a simple 2D drawing which doesn't even explicitly state whether the drawing is a projection of a round part (assumed from your comments) or a part cut from a piece of plate.

I am assuming that since you state this is a university project, that it is either meant to be a learning experience or a test. Looking for shortcuts to complete the requirements for a project is a poor way to learn and a less than ethical way to take a test. I would expect that your instructor has provided you with the necessary tools to understand the coding process. If I were in your position, I would use those tools to understand the process and create some simple g code to validate my understanding. Once the simple code is understood, I would go on to more complicated projects. IMO, the proper way to use this forum as a resource is to create your code and ask the forum members for an evaluation.

All of your machining can be accomplished with simple G01, G02, and G03 moves. You will need to reference your part, select your tooling, determine tooling offsets, and determine feeds, speeds, and order of operations. You will also probably want to break the machining into multiple passes; one or more roughing passes and a finishing pass. You most likely will need to have at least one tool change as well. Desired surface finish is also a consideration.

Good luck with your project.


Hobby Machinist since 2010
H-M Supporter-Premium Member
Feb 27, 2014
The only think I will add this forum can still be a great help. The best way to access that help is to ask specific questions. For instance, when you started to learn to write the GCode, where did you get stuck? Was was it about G-Code that was confusing? asking questions like this will likely result in multiple answers and the result is that you can learn from the experience. If you just want someone to write G-Code for you. You might try a local machine shop but be sure to bring your wallet.
5 [7]