Coding a Snowflake

One of my hobbies is 3D printing.  I even have an Etsy shop where I sell my 3D printed products.  It’s a neat hobby because 3D printing is cool, but also because virtually the entire process can be coded/automated.

OpenSCAD

OpenSCAD is one of many software tools that help designers to create 3D models that a printer can understand and create.  But OpenSCAD is a bit different because it uses code itself.  Essentially instead of using a mouse to design, drag, or drop elements visually, OpenSCAD requires the user to write code to create 3D designs.

In one sense, this is way more inconvenient.  And for non-coders, it basically makes the system useless.  But it also has one big advantage.

Code to Code

Because the system uses code to describe the 3D images, that means there is a text file somewhere that holds that code.  And since it’s just a text file, that means that it can be automatically generated.  So that is the basis for my Etsy shop and 3D design process.

For those not familiar, 3D printed products are generally not of the same structural perfection as plastic products that are created via molds.  The reason is simple: moving parts.  Where an injection mold just needs to fill up with plastic and not move, the 3D printer is whirring around, depositing bits of plastic here and there.

You trade off flexibility for smoothness.

I’ll take one

The other side of that trade-off is that you need to make millions of the same thing for injection molding to make sense, where the 3D printer can make a single iteration of millions of things.

And in the 3D printing/Etsy world, that is how you can differentiate.  No one would buy a comparably priced 3D printed item if the same thing is available from traditional methods; the quality just doesn’t look the same.

But good luck getting one of those companies to print something unique for you.  You can sell 3D printed products as long as there is something unique about them.  In my case, that is typically personalization.

Personalize-me

That is where the code to code OpenSCAD process fits in.  I have a script that follows a few steps to go from request to 3D model ready to print.  The steps are:

  • Receive order for a customized keychain
  • Enter requested text into my script, along with the dimensions
  • Script converts text to a .png image
  • Script reads in the pixels of the .png image and converts those to OpenSCAD cylinders and the code wrappers required to interpret the model
  • Script processes OpenSCAD code into 3D printer-readable GCode
  • Done

In short, the script gives me the ability to produce personalized products without having to spend the time creating the unique 3D model each time.  I get the ability to market personalized items without having to actually spend a lot of time creating each one, which is typically the issue with personalize processes.

This is why it’s  a hobby

Now, this is never going to really and truly scale because it still takes so damn long to print something on the printer.  I don’t mind because that’s not active time for me; I can do whatever I want while it’s humming away.

And honestly, it’s not like I’m going to make a bunch of money doing this.  Fundamentally, it was a neat problem to try and solve: how to do you take a customer request and automate as much of the process as possible.

That is why it’s fun, which all hobbies should be.

Leave a Reply

Your email address will not be published. Required fields are marked *