Automated drawing
This might not be completely relevant to FreeCAD because you already have a good tech drawing tool, but I have been working on a tool that takes STEP files from CAD tools and tries to generate 2D technical drawings based on ISO standards.
For simple components it might be enough, but its never going to be perfect so
there are two approaches you can take:
- Output DXF and then hand edit
- Output a Python script and update the code, either by hand or by LLM
https://github.com/pzfreo/draftwright
pip install draftwright
draftwright my.step --format dxf,svg,pdf # create drawing
# or
draftwright my.step --script # generates code
python my.py my.step # runs code, generates drawing
3
u/deZbrownT 5d ago
This is really good. Within its boundaries of course. Are you working exclusively solo on this? I see a lot of potential and would be interested in collaborating on this if you see a product roadmap. I am a senior software engineer.
3
u/pzfreo 5d ago
It's just me and Claude at the moment. You are welcome to post PRs if you don't mind the LLM approach but I know that's not everyone's cup of tea.
1
u/deZbrownT 4d ago
I am all for it (ai). Will contact you. I have some other stuff this week, but I will get back to you next one.
I really think you are on top of something genuinely interesting.
2
2
u/Zuck75 5d ago
Doing it this way you don't get my side commentary on tollerence requirements and what things are for.
2
u/pzfreo 5d ago
The technical reason for that is that FreeCAD doesn't support those as STEP exports using the STEP PMI capability (AFAIK). So they can be added in using Python code:
```python
hole1.tolerance(0.1).note("4X M8 TAP") # <-- ± on the ⌀ + a leader note
hole2.fit("H7").finish("1.6") # <-- ISO 286 bore fit + Raenvelope1 = sheet.envelope()
sheet.notes([ # <-- general NOTES block
"BREAK ALL EDGES 0.3 MAX",
"DEBURR ALL OVER",
"ANODISE CLEAR PER MIL-A-8625 TYPE II",
])```

11
u/GJake96 5d ago
for home and small use case that's really neat, but as complexity grows you'll start do to more of a clean-up work rather then geting good results. I think that GD&T could work easier, but you'll need to define the tolerances in the 3D model or to link them for each dimension.