Blog

A Chat with an AI CAD Designer via ChatGPT - Tech Briefs

Everyone is talking about it, and maybe you’ve even tried it. The release of OpenAi’s ChatGPT has unleashed a wave of renewed interest in artificial intelligence (AI). It can perform intriguing tasks like write a contract in seconds instead of hours or even write your kid’s term paper (not recommended). Perhaps one of its most interesting capabilities is that it can write snippets of code, and that’s extremely powerful for code dabblers who are familiar with the concepts but just don’t code enough to keep their skill set fresh.

To be honest, as of early 2023 the program is not ready for primetime. Often, the service is down, and there appears to be some sort of performance throttling, so your mileage may vary depending on when you try it. It will make false statements with full confidence. That said, it gives a fascinating glimpse into the possibilities that will be unlocked over the next few years as the technology is iterated and improved. Primer Purification Instrument

A Chat with an AI CAD Designer via ChatGPT - Tech Briefs

This language-based AI will surely affect professions like teachers, writers, and programmers, but how will it affect 3D CAD design and 3D printing — my livelihood?

My thoughts instantly turned to Blender. Blender is powerful, open-source 3D design software. Though it was primarily designed for generating animation and renderings, the program supports STL files that can be used for 3D printing. Blender is not widely used because the interface is not intuitive and much of the functionality is locked behind menus and hotkeys. However, Blender accepts and can execute Python code. Python is a popular programming language that can permit users to, among many other things, interface with Blender, which can then turn Python code into an STL file. So, I wondered, can I use ChatGPT to create Python code for Blender? Can I just tell ChatGPT in plain English what I want, and it can tell Blender (via Python code) what to do?

The phrasing I used was “Create me a blender script to create a 3D CAD of a _______.”

ChatGPT creates a code snippet I could copy and paste into Blender’s text editor. The last step is to simply run the code.

I asked it to create a CAD of a cube. Success! Next, I asked it to create a CAD of an elephant skull. Not so successful. OK, so ChatGPT’s capability to create 3D CAD is somewhere between a cube and a skull. But where?

Blender natively understands basic shapes like cubes, cylinders, cones, and spheres. ChatGPT can make a 3D CAD of an object with a simply defined shape like a ball or rod, and you can even give it dimensions. If you give it a shape with a little more logical depth like a pipe, it makes the attempt but doesn’t quite succeed. It initially created a solid cylinder, but also added a modifier to allow the Blender user to easily add a bend. When asked to make the pipe hollow, it knew to create two cylinders and to Boolean out the inner, smaller cylinder to make the pipe hollow, but it didn’t quite execute properly. If you have the patience to comb over the Python code you may find the error, or you can even ask ChatGPT to fix the issue, and it often does.

Users with more knowledge of Blender’s terminology can get further. Learning to speak the language of Blender for the ChatGPT prompts can enable it to generate very complex shapes. Complex arrays, random distributions, and fractal shapes are all possible. Just a basic knowledge of Blender’s available primitives and modifiers goes a long way. Primitives are basic 2D and 3D shapes like cubes, cones, circles, and curves; modifiers are functions that can be added to a geometry to transform it, and many modifiers are very powerful.

Since ChatGPT will take the previous conversation in context, you can build up a part conversationally with it. For example, first you can ask it to write a code to create a sphere, and after that’s done, ask it to update the code to change the diameter. This works well for one or two modifications to the code, but I found ChatGPT would start losing track with too much complexity. Considering the program was not designed for this function, it performed surprisingly well and one day it could become a very powerful tool.

The experience gives a peek into a future where you might have a conversation with an AI CAD drafter and your part is designed in real time as the conversation progresses. ChatGPT is already able to conceptually understand how to build up 3D designs from basic concepts, so very soon it may be possible to ask AI to create a CAD of a more useful shape like a custom Y fitting for a pipe.

It is not hard to imagine AI someday being able to generate even more complex 3D CAD. This experience inspired me to try out other commonly available AI programs, like the 2D image generator Midjourney.

These images were generated with Midjourney. Although they are just 2D images and not actual 3D CAD, the tool can be very useful for ideation and inspiration. Its AI uses a massive bank of reference images and although the designs may be nonsensical or nonfunctional, some are truly impressive and look manufacturable via 3D printing. Again, this AI tool has a conversational component where you can add input to the prompt to steer the output one way or another, but you would not be able to give specific dimensions. If 2D-to-3D CAD software becomes more capable, things could get very interesting very quickly.

I find the conversational quality of ChatGPT the most interesting element, as it works much like the design process for most CAD designers. Regardless of the design software, nearly any part starts with a simple concept such as a cube or 2D sketch, then complexity is added step-by-step until the design is complete.

Once a 3D CAD file has been designed, the existing AI-powered tools that automatically analyze for manufacturability can be used. For example, design verification technologies like automated DfAM, offered at Protolabs, identify thin walls, small gaps, or parts that exceed a printer’s size requirement. This analysis will be especially important as we ramp up AI knowledge during the design phase.

The language-based model of AI already demonstrates the ability to piece together simple ideas into more complex ones. Conceptually, describing the steps to create a 3D CAD of a moderately complex shape like a bicycle frame is not very different from describing the steps to bake a cake, so it is a task language-based AI can knock out of the park. Surely ChatGPT has more access to recipes than 3D CAD files for its training.

Here's an Idea: The Future of AI and Machine Learning in Avionics Systems

Boosting Operational Intelligence with AI

Although it is likely that ChatGPT was not trained on an expansive dataset of native 3D CAD files, if it was it could build the vocabulary and toolkit necessary to describe a complex 3D shape step-by-step, and importantly be able to go back and modify those previous steps based on user feedback.

So, where is all of this heading? The short-term progress will be made by tinkerers who blaze the trail of stitching together existing tools to create expanded capability. Already I am seeing exciting progress made by people who are learning how to use AI to expand their own personal capabilities. That said, it probably won’t be long before the major 3D CAD packages start supporting AI directly. If they want to stay relevant, they have no choice.

If the dataset is sufficient and the training rigorous enough, the entry barrier for anybody to create a custom 3D CAD for 3D printing or another manufacturing process could come down completely. The first parts will be conceptually simple ones, like pipe connections, spacers, and brackets. As the datasets expand, we’ll see more complex shapes like frames, wings, and propellors. However, even with all of this modernization, there will still be a need for people with 3D CAD design skills to interpret and evaluate the data set.

This article was written by Eric Utley, 3D Printing Applications Engineer, Protolabs (Maple Plain, MN). For more information, visit Protolabs.com .

EV Battery Recycling Still Being Defined

4D Printing with Smart Materials

2023 Battery Show North America Opens as Automakers, Suppliers Intensify...

Leaders Optimistic North America Lithium Supply Gap Can be Eliminated

Zinc-Air Batteries: A Cheaper, Safer Alternative to Li-ion Batteries

Hydrogen: A Potential Green Path to Making Chemicals

The Road Ahead: From R-134a to R-1234yf Refrigerants

Accelerating Product Development With the Digital Twin

High-Resolution In-line X-ray Imaging for Lithium-Ion Battery Inspection

Software Solutions for Battery Management System Applications With AUTOSAR

Leveraging Electronics Digital Twins on AWS to Accelerate Software-Defined Vehicle Validation

Choosing a Silicone for Operation in Harsh Thermal Environments

By submitting your personal information, you agree that SAE Media Group and carefully selected industry sponsors of this content may contact you and that you have read and agree to the Privacy Policy.

You may reach us at privacy@saemediagroup.com.

You may unsubscribe at any time.

A Chat with an AI CAD Designer via ChatGPT - Tech Briefs

Oligo Purification Column © 2009-2023 SAE Media Group