Project 2

Laser Cut B-Splines

Eating your own dogfood...

Although it might be tempting to whip out a project and move on, it's easy to forget a couple features which either make or seriously break it's usefulness. So as part of this B-Spline editor project, we had to actually use it to create something, and tease out those missing features.

I decided I was going to give a go at making some business-y card things, similar to Steve Wozniac's. If you haven't seen his, here's a link. Basically, you can create a black and white PDF, and "print" it using something called a laser cutter, which will cut out letters and shapes from something like acrylic or wood.

This is what my final design ended up looking like:

So, right away, I found that line thickness is a tricky thing to get right. In the above picture, it's hard to make out the text. However, just making the lines thinner doesn't work, since I can continually make smaller and smaller text. So I added the ability to change the thickness of lines depending on the zoom. Here's one of the cards zoomed in:

Some Helpful Features

I had to learn the hard way (several times) that I really needed an undo button in my editor, and I found that designs need to persist on webpage refresh. Nothing is worse than spending an hour on a design, just to lose it because you accidentally clicked the trashcan button instead of the add curve button.

I also found that having the ability to snap control points both to a grid and to each other was really helpful, especially for letters. Almost every shape I wanted to make would connect back to itself.

When editing B-Spline knots, I found that it was hard to figure out what the effects of moving a particular knot would actually be. To try to solve the problem, I ended up color coding control points with basis function which I render above a set of knots. It's now much easier to determine how to edit the knot vector to get the shape you want, since you can link the two views together mentally. I did notice that the color coding doesn't work well when there are too many knots/control points though, since it's difficult to distinguish between the colors.

Another thing I noticed was that although having large control points works well when editing a small number of curves, as the total number of curves increases, it's very easy to accidentally click the wrong control point. In the future, I'd like to add the ability to change the control handle size, or perhaps hide/show them when a curve is selected, and select based off a distance to curve metric.

Results

After taking the curves to a laser cutter, here are the results. It's surprising how much detail a laser cutter can get you. It's also a little surprising just how stinky acrylic can get under a laser. If at all possible, I highly recommend opening a window first!