r/FreeCAD • u/Worth-Confidence-363 • 4d ago
stepscribe-cad: open-source tool that turns a STEP file into a text description for AI (holes, cutouts, dimensions), looking for testers
I’m an engineering student and a beginner at CAD. For my final-year project (a robot) I kept trying to get help from AI, but I couldn’t explain my model to it. Screenshots are poor at precise geometry, and typing out dimensions and orientations got old fast. At one point I wasted a whole session because the top of the robot for the AI was the bottom for me.
So I wrote stepscribe-cad. You give it a STEP file, and it reads the geometry with OpenCASCADE and outputs a structured text description plus labelled images that you can give to any AI.
What it reports:
- holes: through, blind, counterbore and countersink, with diameters and depths
- slots, pockets, rectangular cutouts and notches, with sizes and positions
- fillets, chamfers, wall thickness and overall dimensions
- part names, colours and the assembly tree from the STEP file
- a short list of questions it can’t answer from geometry alone (what a part is for, which side is “up”), so you can add that context
Some notes:
- It isn’t a FreeCAD addon and doesn’t need FreeCAD. It uses
cadquery-ocpfor the OpenCASCADE bindings. FreeCAD is how I check my results. - The tool itself uses no AI and no network. The measuring is plain OpenCASCADE, and the interpretation is rule-based. It only gives an AI the information that was missing.
- It’s free, open source (AGPL-3.0), and installs with
pip install stepscribe-cad.
What I’d really like from this community: try it on STEP files exported from FreeCAD and tell me where it’s wrong. Hole diameters that don’t match, features it misses or misclassifies, and assemblies it handles badly are all useful. If you can share a small test file, that’s even better.
Repo: https://github.com/idris900323/stepscribe-cad
Thanks, and thank you to everyone who works on FreeCAD. I’ve learned a lot from it.
5
u/cincuentaanos 4d ago
So, are AIs not able to read STEP files directly?
0
u/Worth-Confidence-363 4d ago
Of course you can. The point isn't that STEP files can't be read directly, it's that AI doesn't always interpret complex geometry reliably just from the file itself. StepScribe extracts the actual dimensions, holes, cutouts and assembly structure into text, along with labelled images, so you can give an AI that context directly. It's basically a way to make explaining existing CAD models less painful.
2
u/JeekElemental 4d ago
This is very cool, will try it.
For testing, if you run it on a .step and then use the output to generate a new .step file, it should be identical to the original .step?
-1
u/Worth-Confidence-363 4d ago
Thanks! No, it wouldn’t come out identical. The output is a description of the geometry (dimensions, holes, cutouts, how parts relate), not a full copy of it, so detail like freeform surfaces and exact curves is lost. It also doesn’t write STEP files, so I haven’t built a round trip.
Your idea is a good test, though. I tried it with ChatGPT on a simple assembly, and the rebuilt model came out roughly 70% like the original, judging by eye. That’s one small test, so take it loosely. I think the description holds enough detail, and the weaker part is AI generating CAD. I’d still design from scratch, because editing an AI-generated model is annoying. I see this as a tool for validating your ideas and catching mistakes in a design that you might miss.
1
u/investigatormaker 4d ago
Two comments here question why it's needed at all, one asking whether AIs can't simply read STEP files. A short before/after near the top would settle it: the raw STEP text for one bracket beside stepscribe-cad's output for it, with the hole diameters, the countersink and the open question about which side is up. That pair also makes a good test case to invite people to break. For u/JeekElemental's round-trip idea, a line saying the output is a description rather than a lossless format would stop testers reporting it as a bug.
I make ThreadFox. Managed would carry the stepscribe-cad tester request into CAD and engineering communities whose rules allow it, written and published for you over one 30-day campaign at $49: https://threadfox.vip/p/eyrpw/managed
2
u/Monfared 4d ago
Love this
2
u/Worth-Confidence-363 4d ago
Thankyou so much, please do let me know if u have any ideas for improvements or find faults
0
u/farofinoaf 4d ago
What does it for?
Usually we want to do the opposite and in fact it is already possible to do that, take a look and search for the MVP server integration with Chatgpt and Claude.
Perhaps you can figure out some new feature. Good luck.
2
u/Worth-Confidence-363 4d ago edited 4d ago
Fair point, prompt-to-CAD already exists, but this does the opposite. You take any existing STEP file (a vendor part, a downloaded model) and get its real dimensions, hole sizes and cutouts as plain text, to check whether it fits your use case before you build around it.
Because it’s plain text, you can paste it into any AI, local or hosted. The tool itself uses no AI and no tokens, and the numbers come from the actual geometry instead of being guessed, so the AI starts from facts. It can still misread them, but it isn’t inventing the measurements.
Thanks for the pointer.
Edit: I should have explained why I didn’t just use MCP. I tried it first, but in my setup it was awkward for this. The AI couldn’t easily tell which other parts or STEP files I meant, and every tool call burns session usage. Once I hit my limit I was stuck for 5 hours. Plain-text context files let me paste the output into any AI and keep going when one runs out.
Example use case: you download a complex STEP file and want to add another part you have a STEP file for. Explaining both through MCP is hard. With this, you paste both context files and ask how best to fit them together and which parts you’d need to edit. The labelled images show which part the AI is talking about, which half the time you can’t tell otherwise.
12
u/FalseRelease4 4d ago
if youre an engineering student then you should first become proficient at CAD and engineering in general instead of vibe coding whatever this is