This is awesome. I’ve also been playing with OnShape to make lamps and it’s been quite challenging. I also tried Blender but the learning curve is just too steep for me. I like this idea of using Python. I might try OpenSCAD too like someone else suggested.
Here’s my lamp if you’re curious, printed with a .8 mm nozzle, otherwise it would fail https://imgur.com/a/mRqw1pI
heres an example of OpenSCAD in Clojure
https://www.juxt.pro/blog/designing-3d-printable-objects-wit...
Looks quite fun
Try cadquery also!
https://github.com/CadQuery/cadquery