The untouched power of scripting in CAD software

Tradesmen need to learn to code and programmers need to learn a trade

March 11, 2021

So the other day I was browsing the internet the reach of computer aided design softwares was brought to my attention. As someone in the software side of computer science I've never had any reason to use any CAD software and I really don't think that the normal use of such a software would be something I would enjoy. But of course the fact that I don't need to use such a software of course does not discount the fact that it has become a crucial part of the jobs of millions of automotive engineers, fashion designers and all sorts of other things.

Something I didn't learn until this week was the fact that most viable CAD programs support some form of scripting in a common programing language (Python, JavaScript, or Lua). This feature is one that almost nobody uses because the people who actually use CAD aren't programmers, and people like me who are aren't using CAD software. This is unfortunate because this simple feature has a lot of power.

Let's apply this to carpentry. These days most carpenters will mock up some sort of a design in CAD before they make something for a client so that they can be sure they have everything they need and know what they are doing when actually putting stuff together. Of course there will always be a need for a human designer whenever making something truly unique, a computer cannot take this person's job because it requires creativity. But what about designs that are not truly unique?

Consider a kitchen cabinet. Sure different cabinets are usually made out of different materials to give them unique looks and not every cabinet is the same size, but if we disregard those two facts we can realize that all cabinets are fundamentally the same. They are large wooden boxes with doors on one face. Drawing this up is something that a simple script could easily handle. To prove it I wrote one that can give a crude schematic of what parts would be necessary to build a box with a given height width and depth in QCAD, and it really only needs a dozen lines of code. It would not take much tweaking to make this script be able to output a design for a basic cabinet when given these same parameters.

Imagine how much time a carpenter could save if they had the ability to enter in only a few basic parameters and within seconds be able to know the exact amount of material they would need for a particular job. Imagine how much time a fashion designer could save if they didn't have to manually squeeze a bunch of pieces onto a cutting template. Imagine all the time you could save in your job if you could just give all the tedious bits to a programmer.

I highly recommend learning to code so that you can have the skills necessary to automate the boring bits of your job, but if you don't think you can do that teach a programmer those boring parts of your job instead because they will seek to automate it.