I like the idea of an OpenSCAD for diagramming. Rather surprised it didn't exist already.
Paper: https://dl.acm.org/doi/10.1145/872730.806459
Mention in troff doc: https://www.troff.org/prog.html#pic
Wikipedia page: https://en.wikipedia.org/wiki/PIC_(markup_language)