AI & 3D Printing: The Latest Experiments

AI can assist with tasks in a broad range of fields, including 3D printing. Read on to see how AI & 3D printing are slowly becoming the norm!

Artificial intelligence (AI) tools are increasingly finding their way into various sectors, including the realm of 3D printing. From 3D model creation to the printing process, AI has the potential to revolutionize the way we approach additive manufacturing. It can be utilized at various stages of 3D printing, including 3D model finding, generation, and improvement. It might also be able to assist in G-code generation, creation of Klipper macros, and monitoring prints.

While the possibilities are exciting, it’s essential to recognize that AI tools are still in the initial stages of development. Although real-life use cases do exist, achieving fully functional pieces directly from the AI backend remains challenging. Additionally, it’s crucial to view AI tools not as replacements for human labor but as valuable assistants that reduce workload and enhance the quality of human work. With those level-sets in mind, let’s walk through the diverse recent applications of AI tools in the field of 3D printing.

ChatGPT & 3D Printers: The Latest Experiments

An Early Experiment

A novel way to combine ChatGPT and 3D printers
A novel way to combine ChatGPT and 3D printers (Source: 3d_printer_stuff via TikTok)

In early 2023, a fun experiment created some buzz in social media. Basically, a student asked ChatGPT to write their homework, then used a 3D printer to write out the AI-generated text, bringing it into the physical world manuscript style. In this particular case, ChatGPT was not used directly in the 3D printing process per se but, as you can see, it was indeed a main character in the case.

Unless the assignment was to submit responses generated by ChatGPT, this is squarely cheating, but it does show not only the diverse uses of AI tools like ChatGPT but also their integration into workflows involving CNC machines. While this example illustrates a casual use of an AI tool that overlaps with 3D printing, can AI tools be used to improve the craft of additive manufacturing itself? Let’s take a peek!

3D Models & Modeling

The sections below explores how AI might be used to assist in 3D modeling or the steps that precede the process of 3D printing.

ChatGPT & 3D Printers: The Latest Experiments

Finding Models

Search results from a print-in-place whale shark model
Search results from a print-in-place whale shark model (Source: Guilherme Schendel via All3DP)

Some companies are using AI to make your search for 3D models faster and more precise, primarily by finding models that bear similarity to the ones you’ve liked. Users can search for models based on descriptions, keywords, or even images.

CGTrader is one of the companies that’s already offering these solutions. Their AI Similar Models feature uses the “CLIP model”, which the company explains is a function that finds 3D models for you based on the ones you’ve liked.

Although not exclusively for 3D printing but showing a glimpse of what we may see more of in the future, Asset Ovi is a platform for finding 3D assets for gaming, AR, VR, and other use cases. Based on Neural Search, you can just upload a 3D model to search for similar ones or click on an existing model to find other models like it.

While promising, these tools are at an early stage of development. Asset Ovi is, at the time of writing, a Beta version. We gave it a spin and found that searches didn’t return the content we were looking for. For instance, we uploaded a print-in-place whale shark model and got everything but other shark or fish results.

ChatGPT & 3D Printers: The Latest Experiments

Generating Models

There are AI-generated models for Vr and gaming purposes, but what about for 3D printing?
There are AI-generated models for Vr and gaming purposes, but what about for 3D printing? (Source: Meshcapade)

Can you use ChatGPT to generate 3D models? The answer is, you can try. ChatGPT is a Large Language Model (LLM) that’s used to generate text in natural language but has the power to create scripts or computer code. For that, if we acknowledge that an STL file is a sequence of code that software reads and interprets as a 3D model, ChatGPT indeed could generate an STL file by the user inputting a description of the object you want to create.

Andre Sink tried this and shared his experiment on YouTube. Although interesting, the results are not exactly what we would expect. The experiment reminds us of Adam Savage’s book Every Tool’s a Hammer. To use ChatGPT to create an STL, while theoretically feasible, is not what the tool was designed for. To be productive, one should use a hammer as a hammer and a wrench as a wrench, so what about AI tools specifically designed to generate 3D models?

They exist, and one example is Zoo. It’s a free tool trained for mechanical applications. Basically, you input a description of what you need to design, and it delivers a downloadable 3D model. And this isn’t the only tool, as you can see in our article on AI tools for generating 3D models.

ChatGPT & 3D Printers: The Latest Experiments

Improving Models

AI generative design can go beyond human imagination
AI generative design can go beyond human imagination (Source: Autodesk)

Okay, so what about improving 3D models? This is where the generative design features of software suites come in. Generative design focuses on using artificial intelligence algorithms to generate and optimize designs. Fusion and Creo, among other software tools, already have these features.

In many cases, generative design is used to improve designs for specific materials and manufacturing processes. Common applications include consolidating designs to reduce the overall number of parts and components, reducing the weight of parts in order to use the minimum amount of material necessary for the part to be as effective as possible, and increasing performance by designing stronger parts and components.

In general terms, users apply geometric, manufacturability, and performance constraints to the model, and the software automatically outputs multiple design solutions. This pushes the boundaries of 3D modeling, allowing for design beyond the human imagination and the development of manufacturing-ready solutions that would not be otherwise considered.

When it comes to Autodesk’s Fusion, the generative design workspace has been part of the software for a while. To generate outcomes, however, you’ll need either tokens or the Fusion Simulation Extension. For a simple yet illustrative use case of the possibilities of generative design, check out this optimization made to a shelf bracket.

3D Printing

The following sections will cover AI features to improve the process of 3D printing itself.

ChatGPT & 3D Printers: The Latest Experiments

Generating G-Code

An attempt to print a calibration cube made from ChatGPT-generated G-code
An attempt to print a calibration cube made from ChatGPT-generated G-code (Source: 3D Musketeers via YouTube)

Conversion tools have been used to create G-code for a while. So, could we use ChatGPT to write G-code? What if we try to prompt something like “create a G-Code to 3D print a 20 x 20 x 20 mm cube with 20% infill for my Ender 3 running Marling firmware”? Some have tried and shared their results – just check out this experiment by the YouTuber 3D Musketeers.

As you see from the image above, we’re still some steps away from success. ChatGPT can’t generate very long outputs, unlike the G-code we usually get from our slicers. Be aware that, even though you may receive something very similar to G-code from the ChatGPT prompt above, trying to print it might be dangerous and could result in personal injury or damage to your printer.

ChatGPT & 3D Printers: The Latest Experiments

Writing Klipper Macros

AI tools are being widely used for code writing
AI tools are being widely used for code writing (Source: Guilherme Schendel via All3DP)

Much like the use case above, automating the development of Klipper Macros through AI might be possible in the near future. In fact, quite a bit of code may be AI-generated or written with AI assistance. When GitHub Copilot was launched for individuals in June 2022, more than 27% of developers’ code was generated by it. Today, that number is 46% across all programming languages – and in Java, that jumps to 61%.

Klipper macros are a collection of commands and sequences that can be used to perform repetitive tasks on your 3D printers. They’re mainly used to customize your bed leveling operation, loading and unloading filament, or heating and cooling your printer’s element for example.

Browsing through the 3D printing forums, we can see some controversy about this topic. To write a Klipper macro is a tough task and to make one with little effort is very attractive. Advanced macro creators who understand the risks involved usually take this as an insult, while some newcomers are ready to try every possible tool that yields fast results.

Outputs from ChatGPT will look very much like a macro but are often wrong and contain bugs that are very hard to spot, especially for inexperienced users. If you want to start to develop macros, the general advice is to start with something that works, then move to more experimental methods. Always verify any results obtained from AI tools, and keep in mind that inputting wrong or unbalanced code instructions on your printer is potentially dangerous for the machine and also for yourself.

ChatGPT & 3D Printers: The Latest Experiments

Monitoring Prints

AI tools could avoid much waste on time and materials
AI tools could avoid much waste on time and materials (Source: eosdapper via Reddit)

3D printers shouldn’t be left operating unattended not only for safety reasons but also for print problems that might occur such as clogged nozzles or parts detaching from the print bed. When this happens midway during very long prints, it’s very disappointing especially given the wasted time and material.

Developers are now finding ways to make self-monitoring 3D printers with the aid of AI, and it’s quickly being implemented across the 3D printing market. The popular remote 3D printing monitoring and control software Obico now boasts AI failure detection features. 3D printer manufacturers are also getting in on the game.

The much-hyped Bambu Labs offers a Spaghetti Detection function. This is a self-monitoring feature that detects what is known as the spaghetti defect. Bambu Labs claims that, as a deep learning tool, it heavily depends on data. So, by joining their experience improvement program, users are helping to improve the detection capability. They also state that, while some false alarms can still happen, the function has already improved from its launch and, by keeping the printer firmware updated, users will benefit from newer versions of the tool.

Prusa Research announced on their podcast in February that they’re developing an AI error detection feature, but it’s in the early stages. Interestingly, they’re using all the printers at their printer farm to collect data and train the AI. Also, Creality’s K1 Max has a built-in AI camera that watches over the printing and will alert in case of an error.

Although these features are currently being implemented to stop or pause printers when defects are detected, we can definitely foresee the next step. Imagine a 3D printer that includes AI-assisted self-calibrating features that adjust temperature, speed, and other settings in order to fine-tune the printing output based on the material or even the model’s geometry. Wow, we’ll just have to wait and see what’s on the 3D printing horizon.

Share your thoughts