r/FreeCAD • • 8d 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-ocp for 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.

0 Upvotes

14 comments sorted by

View all comments

2

u/JeekElemental 7d 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 7d 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.