好文集ChatGPT Plus¥119

Why Code-CAD.

The more I use the FaenoCAD workflow for real work, the more I'm struck with how different the world of mechanical design is going to be in the near future.

My workflow is very simple. I use Claude Fable to write code-CAD. I have a memory system to prompt-inject learning from prior builds. I have a lightweight viewer which allows Claude to see what it's doing and for me to communicate with Claude about the geometry.

Claude writes in code-CAD, typically build123d, and the viewer exposes coding variables to the user. Claude is informed on the next turn of any changed variables the user makes.

When I prompt Claude, I don't use book-length prompts. Since I am designing as I build, I prompt Claude in short paragraphs and sketches. We build in stages. Rarely do I know exactly what I want the design to look like when I start. Claude and I pair-build the part or assembly. I lean on Claude for references and calculations, Claude leans on me for features, form and function.

For 2D, the system is even simpler. No UI. No special drawing program. Claude builds what I want in python, exporting to SVG and DXF. Claude knows how to create a drawing title block and border. It knows drafting standards. It knows all the symbols, or it can look it up. It can calculate if a drawing is fully dimensioned and can help get you there if its not. Dimensions are just a bunch of lines and text, right? Claude builds a helper function and BOOM, dimensions in whatever format you want. Build123d provides 2D drawing views of 3D CAD. The drawing is built up piece-by-piece in a python script, fully parametric with the 3D CAD.

Through this, I'm learning that CAD *feels* heavy, and acts like a heavy program on the computer, because of the user interface. There's this whole parametric system of a feature tree/history, sketches, patterns, constraints--all to help the user create precision engineered parts. People make entire careers about knowing how to "drive" all this stuff, to "operate" CAD.

It's all redundant if a coding agent builds the logic directly into code. The same logic that's on the back-end of your CAD system. Constraints are just code variable reuse. Patterns are just for-loops. The feature tree is just the "main" function of the code. Even stuff like sheet metal is reduced to geometry code blocks referencing bend, gauge and K-factor variables.

And because you are writing these parametrics straight into code, you can do whatever you want. You want a pattern that goes six different ways, well, that's just a nested for-loop. You can do all the if-then logic you want for different configurations. You can flag bits of code; makes it easy to de-feature CAD for analysis without losing your source of truth. You aren't stuck with just the options the CAD UI gives you.

Once everything is code, CAD viewers are simple and light weight. CAD works on a normal computer--anyone can view it with anything and you can customize your viewer however you want, like programmers do with IDEs. Once everything is code, 2D is just code writing SVG, eventually converted to PDF. All that workstation heavy software goes away. All that specialized training for "operating" CAD goes away.

Through all this, CAD becomes less like "operating" a piece of software, and more like molding a piece of clay through the agent. 2D layout becomes more like the old days of manual drafting, where you can put a line anywhere you want, without regard to templates or feature-sets or symbol libraries.

And let's not say anything about PLM. With code, we just use git. And with git, you can wrap in anything: analysis results, design reviews decisions, reviewers, PRs. Diffing changes becomes easy.

You can imagine, now, a design engineer and analysis engineer working side-by-side on the same source of truth, simultaneously. Design engineer builds the part, analysis engineer branches the part, adds flags to de-feature, adds hooks for their analysis. Submits a pull request to the design engineer. Changes are merged. Part's released once design and analysis engineer agree and sign off.

This is the future of mechanical design and CAD. It'll be a simpler, cheaper, and much more creative world.

全文完
查看原文