There is quite a few "code" CAD's around https://github.com/Irev-Dev/curated-code-cad. Cadquery has contraints but isn't really a DSL.