If you’re looking for 3D modelling in real programming languages, I’ve very much enjoyed IceSL, which embeds Lua: https://icesl.loria.fr/
I used it to design this piece for use with Gravitrax, for example: https://share.icloud.com/photos/0b2yeTGdLftZV17btg-KTEYog