Text-to-CAD prompt engineering: how to get useful output
The difference between a text-to-CAD prompt that works and one that produces garbage is usually specificity. Here's what I've learned about writing prompts that produce actual parts.
Quick answer
Effective text-to-CAD prompts include: specific dimensions in mm, named geometric features (boss, counterbore, fillet), material context, manufacturing intent, and one part per prompt. Avoid vague descriptions, relative sizing, and multi-part assemblies. More specific prompts consistently produce better geometry.
I spent an embarrassing amount of time last month generating the same bracket over and over with slightly different wording, trying to figure out why some prompts gave me a usable part and others gave me something that looked like the AI had read a description of a bracket written by someone who'd never seen one. The part I wanted was simple. L-shaped, two legs, a few holes, a fillet at the bend. I could model it from scratch in Fusion 360 in eight minutes. But I was stubborn, and I wanted to understand why "make me a bracket" produced junk while a longer, more specific prompt produced something I could actually work with.
What I learned, after about forty prompts and a thermos of coffee I forgot to drink, is that text-to-CAD prompt engineering is mostly about specificity. Not cleverness. Not magic words. Not finding some secret syntax the AI prefers. Just being specific about what you want, in the same way you'd be specific on a drawing or in an email to a machinist. The AI doesn't read your mind. It reads your words. And if your words are vague, your geometry will be vague in exactly the same way.
The text-to-CAD guide covers the tools and technology. This post is about the input side: how to write prompts that produce parts worth importing.
Why prompts matter more in CAD than in image generation#
If you've used Midjourney or DALL-E, you know that vague prompts can produce interesting results. "A castle at sunset" gives you something pretty. The AI fills in the details and the result is often charming in ways you didn't expect.
Text-to-CAD does not work like this, and it's important to understand why. In image generation, there's no "correct" answer. Any castle at sunset is a valid castle at sunset. In CAD, there is a correct answer, or at least a narrow range of acceptable answers. A bracket that's 40mm tall is not the same part as a bracket that's 50mm tall. A 4.2mm hole is not the same as a 5mm hole. An M3 counterbore is not interchangeable with a through-hole. The AI has to produce specific geometry, and it can only produce the right geometry if you tell it what "right" means.
Every dimension you leave unspecified is a dimension the AI gets to invent. Sometimes it invents well. Usually it doesn't. And unlike an image, you can't just squint at a CAD model and decide it's close enough. Either the bolt pattern fits or it doesn't. Either the wall clears the adjacent component or it interferes.
The anatomy of a good prompt#
After testing hundreds of prompts across Zoo.dev, CADAgent, and a few other tools, I've arrived at a rough structure that consistently produces better results. It's not a template you have to follow rigidly. It's more like a checklist of things the AI needs to hear from you before it can do a decent job.
A good prompt includes: the overall shape (plate, bracket, enclosure, cylinder, etc.), the bounding dimensions in millimeters, the material or thickness if relevant, each feature by its proper name (hole, counterbore, pocket, slot, chamfer, fillet, boss), the dimensions of each feature, the position of each feature relative to known references (edges, centers, other features), and any symmetry or pattern information.
A bad prompt leaves most of that out and hopes the AI infers it.
Here's a bad prompt: "A bracket with mounting holes."
That tells the AI almost nothing. What shape bracket? How big? How thick? How many holes? What diameter? Where? The AI will produce something bracket-shaped with some holes on it, and the result will be wrong in ways that aren't worth fixing because the starting point is too far from what you actually needed.
Here's a better prompt: "L-shaped bracket, 3mm thick, vertical leg 40mm tall by 30mm wide, horizontal leg 50mm long by 30mm wide. Two 4.2mm through-holes on the vertical leg, centered horizontally, first hole 10mm from the top, second hole 30mm from the top. Two 4.2mm through-holes on the horizontal leg, centered across the width, first hole 10mm from the bend, second hole 40mm from the bend. 2mm fillet on the inside corner of the bend."
That's wordy. It's also the kind of prompt that produces a part you can measure and find mostly correct. The AI knows the shape, the material thickness, every dimension, every feature, and every position. There's very little left for it to guess.
Use millimeters, always#
I've tested prompts in inches and in millimeters. Millimeters produce more consistent results. My guess is that the training data is predominantly metric, which makes sense given that most CAD models globally use metric units. If you're working in inches, convert before prompting. "25.4mm" is more reliable than "1 inch" even though they're the same dimension.
Specify units explicitly in the prompt. Don't assume the AI defaults to your preferred system. I've had prompts where I gave numbers without units and got back geometry scaled by what appeared to be a random conversion factor. Just say "60mm x 40mm x 3mm" every time and avoid the guessing game.
Name features by their real names#
This makes a bigger difference than I expected. The AI understands CAD-specific vocabulary, and using it produces better results than describing features in plain English.
"A hole with a wider hole on top for a screw head to sit in" is a counterbore. Call it a counterbore. The AI knows what a counterbore is and will produce more accurate geometry if you use the word.
"A sloped edge" is a chamfer. Call it a chamfer and specify the dimension (e.g., "1mm x 45° chamfer on all edges").
"A rounded inside corner" is a fillet. Call it a fillet and specify the radius (e.g., "3mm fillet on the bend").
"A raised cylindrical feature" is a boss. "A flat area cut into the surface" is a pocket. "An elongated hole" is a slot.
Using these terms isn't just about being precise. It seems to activate more specific training data in the model, producing geometry that's closer to what a human CAD user would create for the same feature. When I say "counterbore," the AI generates a stepped hole with reasonable proportions. When I say "a wider hole on top," I sometimes get something that looks like a countersink, or a pocket, or a feature that doesn't match any standard machining operation.
The best prompts for text-to-CAD post has more examples of specific feature vocabulary that works well.
One part per prompt#
This is maybe the most important rule, and the one people most want to break. Do not describe multi-part assemblies in a single prompt. Do not describe two mating parts. Do not describe a box and its lid in one go.
Current text-to-CAD tools generate one solid body at a time. Asking for multiple parts in one prompt forces the AI to either ignore some of them or mash them together into geometry that doesn't make sense as either part individually. I've asked for "a box with a removable lid" and gotten back a single solid that was the box and lid fused together, which defeats the purpose entirely.
Generate each part separately. If you need a box and a lid, write one prompt for the box and one prompt for the lid. Include the mating dimensions in both prompts so they'll fit together. "The box opening is 50mm x 30mm" and "the lid is 51mm x 31mm with a 1mm step" is how you communicate fit between separate prompts.
Position features relative to known references#
"Holes near the corners" is not a position. "Holes 5mm from each edge, measured to hole center" is a position.
Every feature needs to be located relative to something the AI can resolve: the plate center, an edge, another feature. I use edge references most often because they're unambiguous. "First hole 10mm from the left edge, centered on the width" gives the AI exactly one valid location.
Avoid relative descriptions like "evenly spaced" unless you also give the spacing. "Four holes evenly spaced" tells the AI nothing about the pattern dimensions. "Four holes on a 40mm x 30mm rectangular pattern, centered on the plate" tells it everything.
Center references work well too. "Central bore, 22mm diameter, centered on the plate" is clear. "A hole in the middle" is not, because "the middle" could mean the geometric center, the visual center of mass, or wherever the AI feels like putting it.
Include symmetry and pattern information#
If your part has symmetry, say so. "Two slots, symmetric about the vertical center plane" produces more consistent results than describing each slot independently. The AI is more likely to generate matching features when you tell it they should match.
For hole patterns, describe the pattern rather than each individual hole. "Four M3 through-holes on a 31mm square pattern, centered on the plate" is better than describing four holes with four separate coordinate sets. Pattern descriptions match how CAD operations work (rectangular pattern, circular pattern), which seems to help the AI produce cleaner geometry.
What to include, what to skip#
Include: overall bounding dimensions, material thickness, feature types by name, feature dimensions, feature positions, symmetry, pattern information.
Skip: material name (unless it affects geometry, like sheet metal vs. solid), surface finish, color, tolerances (no current tool handles these), GD&T, assembly context, manufacturing process notes, and anything about how the part will be used rather than how it should be shaped.
The AI generates geometry. It does not understand manufacturing process, material properties, tolerance stacks, or application context. Telling it "this is for mounting a PCB in an outdoor enclosure rated to IP65" won't change the output. Telling it the exact dimensions, hole positions, and seal groove geometry might.
Good prompt vs bad prompt: side by side#
Bad: "An electronics enclosure."
What you get: a box, roughly the size the AI feels like making, with no features, no mounting, no consideration of what goes inside or how the lid attaches.
Good: "Rectangular electronics enclosure, open top, outer dimensions 80mm x 50mm x 30mm. Wall thickness 2mm. Four M3 threaded inserts at the corners of the open top face, 4mm from each outer edge, 4.5mm hole diameter, 6mm deep. Two M3 mounting tabs extending 8mm from the bottom of opposite long sides, 3mm thick, with 3.5mm through-holes centered on each tab."
What you get: a box with walls, mounting features, and threaded insert holes in roughly the right places. You'll still need to fix dimensions, but the starting point has all the features you asked for.
Bad: "A gear."
What you get: something that looks like a gear from a cartoon. Decorative tooth profiles. No involute. No usable dimensions. A waste of time.
Good: "Spur gear, module 2, 20 teeth, 14.5 degree pressure angle, 20mm face width, 10mm bore with keyway 3mm wide by 1.5mm deep."
What you get: slightly better, but honestly still not great. Gears are one of the things text-to-CAD reliably fails at because the tooth geometry requires precise involute curves that the AI doesn't generate correctly. This is a case where modeling from scratch or using a gear generator plug-in is always faster. I mention it because knowing where the tools fail is as important as knowing where they succeed.
The text-to-CAD examples post shows ten more prompt/output pairs with detailed analysis of what worked and what didn't.
The iteration workflow#
Even with a good prompt, the first output is often 80-90% correct. The iteration workflow matters.
I generate, download the STEP, import into Fusion 360, and measure everything. If the errors are minor (hole positions off by a millimeter, a fillet radius that's 2mm instead of 3mm), I fix them in CAD and move on. If the errors are structural (wrong topology, missing features, completely wrong proportions), I revise the prompt and regenerate.
Prompt revision is usually about adding detail, not changing approach. If the AI missed a feature, I add more explicit description of that feature. If a dimension is wrong, I sometimes repeat it in the prompt for emphasis, or describe it from two different reference points. "The slot is 15mm long, starting 5mm from the left edge and ending 20mm from the left edge" is redundant, but redundancy sometimes helps.
After two or three iterations, you usually have either a usable part or the realization that this particular geometry is beyond what text-to-CAD handles well. Knowing when to stop iterating and just model it yourself is a judgment call. My personal rule: if two revised prompts don't get me to 85% correct, I model from scratch. The time I'd spend on a third and fourth iteration exceeds the time to just draw the thing.
Prompts that always fail#
Some categories of geometry reliably produce bad results regardless of prompt quality. Knowing these up front saves you time.
Gears, as mentioned. The tooth profiles are never correct. Save yourself the trouble.
Threads. No current text-to-CAD tool generates actual thread geometry. You'll get a cylinder where a thread should be, which is fine as a placeholder but useless if you need actual thread form.
Sheet metal with bend logic. The AI doesn't understand K-factors, bend allowances, or flat patterns. It'll give you a shape that looks folded but won't unfold correctly.
Multi-body parts. Assemblies. Anything with more than one solid body.
Organic surfaces. Splines, lofts, complex sweeps. The AI works best with prismatic geometry: extrusions, holes, pockets, slots, chamfers, fillets. When you leave the world of straight lines and arcs, the output quality drops off a cliff.
Snap fits, press fits, or any feature that depends on specific interference or clearance values. The AI has no concept of fit classes.
The honest summary#
Writing good text-to-CAD prompts is a skill, and it's a skill worth developing if you model simple mechanical parts regularly. The investment is small: a couple of hours of practice will teach you what works and what doesn't. The payoff is modest but real: a few minutes saved per simple part, and significantly faster iteration when you're exploring design variations.
The skill isn't about tricking the AI or finding magic words. It's about being specific in the same way you'd be specific in a drawing or a machining order. Dimensions. Feature names. Positions. Patterns. Symmetry. If you can describe the part precisely enough for a machinist to make it without asking questions, you can describe it precisely enough for text-to-CAD to produce a useful starting point.
Emphasis on "starting point." The best prompt in the world still produces output that needs checking and usually needs fixing. Text-to-CAD prompt engineering doesn't eliminate the need for CAD skills. It just means your CAD work starts from a better place than a blank sketch.
The text-to-CAD tutorial walks through the full process from prompt to finished STEP with a real example. If you want ready-made prompts to study and adapt, the best prompts for text-to-CAD post is a catalog of what's worked for me.
Newsletter
Get new TexoCAD thoughts in your inbox
New articles, product updates, and practical ideas on Text-to-CAD, AI CAD, and CAD workflows.