How To Convert 3D Models to GCode
2023-09-25 | By Maker.io Staff
Converting an existing 3D model created with CAD software or an artistic program like Blender to machine-readable GCode is a vital step in manufacturing 3D-printed components. As modeling software and 3D printers use different file formats to represent the same data, the conversion process involves a few steps, and this article outlines the most important ones while also providing you with some essential tips and tricks for enhanced prints.
Download or Export the 3D Model
Many design tools store the 3D model information in a custom file format, often not exchangeable between different programs. Therefore, you must first convert the 3D model they created to a file format the slicer program can understand, typically STL. While the exact steps vary depending on the program used, the overall process is similar across different programs. To begin, you should load the 3D model into your modeling tool and select all parts you want to export before clicking the export option in the program:
This image shows that only one of the two keychain tags was selected for export, and it also highlights the export option of the program used for creating the models.
Once done, you should then select an appropriate target file format. STL is a good choice, as a large number of different modeling and slicing programs support it:
In your program, only export the relevant parts and then store the result as an STL file.
Import the Model in the Slicing Program
Before converting the STL to GCode, you must install a slicer program. There are many options to choose from, but selecting the one endorsed by the manufacturer of your 3D printer is typically a good idea to maximize compatibility between the hardware and the software. In this instance, I used Cura, as it’s the one supported by my printer’s manufacturer, and the slicer also functions well with many other brands and models.
Regardless of the slicer you chose, import the previously created STL file by selecting the appropriate option in the slicer software:
Use the import option in the slicer program to load the previously exported STL file.
Adjust the Model’s Position, Rotation, and Scale
You can sometimes dramatically improve the print quality of the finished component or reduce the print tme by reorienting a model so that the print head doesn’t have to travel farther than necessary. In addition, you should ensure that the largest flat surface of the model touches the print bed to maximize bed adhesion. Advanced slicing software typically tries to auto-adjust the placement and rotation of models to minimize print time and maximize model contact with the bed. However, sometimes, it fails to recognize the best settings, and you may want to adjust model alignment in the software before slicing.
Use the built-in options to orient the imported model to maximize print bed adhesion and minimize print times and overhangs.
Adjust the Slicer Settings
The slicer settings influence how long the print process takes, and the level of detail you can expect in the finished part. Depending on the program, you can choose from several hundreds of options, which are usually best left unchanged unless you know what you’re doing. Most slicing programs offer beginners a range of quick options that let them select one of multiple presets, which typically influence the print time and quality. Higher quality settings increase the time needed for manufacturing while yielding higher detail levels in the finished print. Conversely, low-quality settings decrease the time required for printing, simultaneously leading to more coarse-looking results.
This screenshot summarizes the most important settings for beginners, which include the resolution (the layer height), the infill density and pattern, the wall thickness, and whether or not the slicer should create supports.
Convert the STL Model to GCode
Once all the settings are correct, you can start the conversion process by clicking the slice option in your program. The slicer software then breaks down the model into individual layers according to the previously selected quality settings, before creating the GCode that you can send to your 3D printer. Once done, most slicers display a preview of the generated layers and an option to store the generated GCode on your computer together with an estimate of how long the print will take:
Once the slicer finishes the conversion, makers can store the created GCode file on their computer or an external storage medium.
Verify the Printer Settings and Start the Print
Finally, you can start printing using the newly generated GCode file. If the slicer program supports the printer you use, you can typically kick off the process from within the program when connecting the printer to the computer. If that’s the case, verify that you set up the printer correctly in the program before starting manufacturing. In all other cases, you should export the generated code and store it on a removable drive, such as a USB stick or SD card, which you can plug into your printer to start the printing process.
Summary
Nowadays, converting a 3D model to a GCode file that 3D printers can understand is as easy as clicking a few buttons. You should start by downloading the slicer program of your choice, which is usually dictated by what your printer supports.
Then, export the 3D model you want to print to a file format the slicer understands. Usually, STL is a good choice. You can then export the model from your modeling program and import it to the slicer.
Next, align the model on the print bed to maximize bed adhesion and minimize print times. In addition, you should choose the correct print quality settings in the slicer and verify that your printer settings are correct before starting the slicing process, which ultimately converts the STL file to GCode.
Finally, you can either start the print from within the slicer program, if your printer supports it, or export the generated GCode and transfer it to the printer manually.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.