At the risk of spamming this thread, check out FluidCad. It has excellent GUI based cad tools, and those same tools generate the equivalent 'code cad' for each operation. Of course you can also use 'code first' instead.
I think it's really exciting, and while it's early in development it is already very usable.