24

Most of my printer parts only exist as STL, and every time I wanted a hole 2 mm bigger or a plate a bit thicker I ended up remodeling the whole thing by hand. So I wrote mesh2cad. It finds the planes, cylinders and cones in the mesh and writes a STEP file plus a CadQuery or OpenSCAD script (or a FreeCAD macro) with the dimensions as named parameters at the top, so you change one number and rebuild.

It works on plates, brackets, boxes with holes, bolt circles, slots, bosses, countersunk holes, that kind of thing. It does not do organic or sculpted shapes or scans. It checks the rebuilt solid against the original mesh and reports the deviation, and if the fit is bad it refuses to write the script instead of making something up.

Free, MIT, Python, pip install mesh2cad. Code and before/after pictures: https://github.com/emirmrkaljevic/mesh2cad

Hackaday wrote a short piece on it last week: https://hackaday.com/2026/11/19/mesh2cad-automates-re-modelling/

If you have a part where it falls over I'd like to see it.

top 1 comments
sorted by: hot top new old
[-] Interstellar_1@lemmy.blahaj.zone 4 points 22 minutes ago
this post was submitted on 23 Nov 2026
24 points (100.0% liked)

3DPrinting

24390 readers
4 users here now

3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.

The r/functionalprint community is now located at: or !functionalprint@fedia.io

There are CAD communities available at: !cad@lemmy.world or !freecad@lemmy.ml

Rules

If you need an easy way to host pictures, https://catbox.moe/ may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is ![]()

Moderation policy: Light, mostly invisible

founded 3 years ago
MODERATORS