NYC Maker Faire Talk: Programmatic CAD

In addition to running a booth at Maker Faire this weekend, I gave a talk on programmatic CAD and its future.

My only public speaking experience prior to this was doing was doing workshops at hacklab and presentations to my classmates in high school and while this was a non-trivial amount of practice (in grade 10, I ended up teaching two semesters of the physics course I was taking in the form of seminars every class because the teacher didn’t know anything) it was all small scale (at max 15 people), highly interactive and mostly improvised on the spot. In other words, nothing at all like speaking at NYC Maker Faire.

Furthermore, I ran out of time last week and had to get my physical projects done before leaving. Which meant I had to finish my speech on the bus ride down to NYC and was thoroughly sleep deprived by the time my speech came.

And it went so-so. I was terrified out my wits beforehand, despite E- and A-‘s encouragment, got up and gave my speech. I got a bunch of planned jokes in to avoid being dry. In fact, the only real issue was that I overestimated how long my content would take (also, I think I spoke fast) and ended early. At which point I got questions. So it wasn’t too bad, I think. A few people said as much which makes me feel a bit better.

Here’s my slide show and my preperation notes for the presentation follow:

Remember, speak slowly, don’t Um.. and think a sentence through before speaking.

There’s a deep held belief I have, and its one that a quick look at 3D printing village validates: 3D printers are fricking awesome! Who’s with me?

If unenthusiastic: Oh, come on. Even hacklab’s makerbot gave a more enthusiastic response when I was practicing my speech.

If enthusiastic: There’s the spirit! It seems real audiences give more enthusiastic responses than 3D printers.

Flip slide.

As awesome as 3D printers are, they don’t exist in a vacuum. They need models to be useful.

Flip slide.

3D scanning is a really cool option. A radiologist friend of mine CAT-scanned a broccoli for me, and its print is one of my favorite objects. He actually offered to scan me, which would have been awesome since then I could print myself and put myself up on thingiverse, but I turned him down for some stupid reason. Yes, I know, bad decision.

Still, it doesn’t solve our problems. Many, if not most, of the things we want to print don’t exist yet, or at least aren’t accessible to us. We need a way to make models of objects that do not yet exist: computer automated design or CAD.

Flip Slide.

There’s a number of powerful commercial CAD options around, the prime example being solidworks… But they present a number of issues.

The first one is that they generally cost oodles of money. Can you spend tens of thousands of dollars on a CAD program? I certainly can’t.. although, I don’t have tens of thousands of dollars to spend, period. Poor, starving quasi-student and all that.

Now, even if the price was something more reasonable, like $50, it would still be an issue, for a number of reasons. The first is that standards of reasonable price vary from person to person — there’s a substantial protion of the worlds population for whom $50 is a non-trivial sum. And even for those of us to whom $50 isn’t that big a deal, its still enough to dissuade one from messing around with 3D modeling on a whim.

Beyond the price issue, there’s another matter: it isn’t open source. We can’t modify it for our needs… Well, I’m sure most people here are aware of the arguments for Free Software, and I won’t repeat them. It just bears mentioning that this is an issue for some of us.

Flip slide.

Circa 2008, the options for open source CAD were pretty grim. They were generally poor imitations of commercial CAD programs, in the same style: you have a 3D model and manipulate it by clicking and pulling and so on. In mid 2009 however, we see the first git commits for openscad.

openscad was a very different approach to CAD. It was programmatic. Instead of visually manipulating the object with your mouse, you describe it in text, much like in programming. In fact, many common elements of programming exist in openscad: variables, if statements and so on.

This wasn’t entirely unprecedented. It obviously has some similarities to things like verilog and VHDL where circuits are described in a text format… But it was definitely a change in CAD.

Flip slide.

So, people often assume that programmatic CAD exists because people are too lazy to make a nice pretty interface. What they often don’t realize is that there are massive advantages to programmatic CAD over normal CAD.

* Firstly, repetitive tasks can be automatically done. That’s huge! <hold of laser cut chess board> imagine if I’d had to define each of these squares by hand, it would have been hugely tedious. But in a programmatic interface, it was just two loops.
* Objects can be designed parametrically, so that a whole bunch of objects can be designed in a single fell swoop. <Hold up printed keys>
* All the usual tools for open source development can be used. This results, for example, in my 3D printable open source vacuum cleaner being on github… That’s actually not the best part, the best part is that its forked.

Flip slide.

Openscad, awesome as it is, is not perfect.

* The underlying engine, openCSG, is prone to errors on some of the more complicated types of objects.
* One can’t get nice beveled connections between parts of objects (as in, for example, Solidworks).
* Openscad’s programming language aspects are not as strong as they may at first appear — for example, you can’t do assignments in loops –, and it not in fact Turing complete.

Flip slide.

A bunch of projects sprang up in the last half year addressing the last one by making an openscad like language embedded in Python. They are:

 * pyscad by Kevin Mehall
 * openscadpy by Henning Meyer
 * pyopenscad by Evan Jones

They either compiled into openscad or used OpenCSG.

Flip slide.

Around the same time, I released surfcad, a python based programmatic CAD tool which focuses on surfaces and connecting them, rather than the CSG of solids. Sadly, this didn’t really scale well to large objects.

Flip slide.

So where are we?

openscad development is being moved forward by Marius Kintel, who is polishing out bugs. Unfortunately, it is very challenging for outsiders to get content in to openscad.

I personally think that resolving openscad’s failngs can’t really be done without, at the very least, breaking backwards compatibility. I’ve begun writing an entirely new CSG-based programmatic CAD tool, implictCAD, that resolves all these issues. Internal representation of objects is done with functions representing ‘outwardness’, which ends up easily allowing features such as rounded unions and intersections, and creating shells of objects. Since it is embedded in haskell, there are no concerns about programming capabilities.

More over, since the core idea underlying how implicitCAD works isn’t a big CSG engine but a couple mathematical ideas, other implementations could be built on the same principles if people were unhappy with mine.

There will be a blog post describing the math behind implicitCAD on within a week, and a working version of implicitCAD should be released within the next few weeks.

Thank you for your time. Are there any questions?

Tags: , , , ,

4 Responses to “NYC Maker Faire Talk: Programmatic CAD”

  1. Andrew Plumb (@clothbot) Says:

    You did fine! Glad I got there in time to help cheer you on! 🙂

  2. 3D Printing Awesome Things (SoOnCon 2011 Talk) « Christopher Olah's Blog Says:

    […] nervous about giving my 1 hour SoOnCon talk, 3D Printing Awesome Things, especially after how my NYC Maker Faire talk went. Apparently I’d learned a lot from my NYC Maker Faire talk, and it went awesome! You can […]

  3. Bryan Lettner Says:

    I am designing some 3d parametrized surfaces (x(t), y(t),z(t)) that have grooves cut out of them along a 3d parametrized curve. The curves get as complicated as lissajous curves. Can ImplicitCAD accomodate this? I am new to programmatic CAD and trying to figure out which platform will best suit my needs.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: