OpenSCAD Design Tips: How to Make a Customizable Thing

You can customize this awesome cube right now!

You can customize this awesome cube right now!

Chances are you’ve been following along with the newest developments over on Thingiverse and have seen people uploading “Customizable” versions of their OpenSCAD designs.  ((For the latest information on how to make a customizable thing using the Customizer you’re going to want to check out the documentation for this Thingiverse app.  Since you have to authorize the App to be able to use it, there’s no way at the moment for me to provide a direct link to the documentation.))

If you’d like to give the Thingiverse Customizer a shot but aren’t sure where to begin, this tutorial is for you.  Before you get bogged down in the details, just know that I’ve created a “Customizer template” you can use as a starting point for creating your own customizable Thing.  I would suggest first playing with the settings in this template to see how Customizer changes the object.  Then, when you’ve gotten the hang of it, read through this tutorial on how to make a Customizable OpenSCAD file.  Finally, download and check out the template itself in your favorite text editor or OpenSCAD.  Add your own designs and see how you can make your own customizable Things!

  • Design!
    • Create your OpenSCAD thing just as you normally would.
  • Create Options
    • In order to give Thingiverse users the option to customize your designs through the Customizer App, you’ll need to create options for them.  There are three kinds of user-definable options you can include in  your OpenSCAD file: text boxes, drop down boxes, and numerical sliders.  I’ll discuss each in turn.
      1. Text Box
        1. Simple Text Box.  To add a text box, all you need to do is create a variable.  Like so:
          1. text_box = 10;
        2. Text Boxes with Explanation.  Options are very nice and well, but without an explanation they may be hard for a user to interpret.  Here’s how you would create a similar text box with an explanation:
          1. // This is the explanation text
          2. another_text_box = 10;
      2. Drop Down Box
        1. Drop Down Box of Numbers.  A drop down box can be included by simply including a “//” to comment out the space after a variable and list options like so:
          1. // This creates a drop down box of numbered options
          2. number_drop_down_box = 1; // [0,1,2,3,4,5,6,7,8,9,10]
        2. Drop Down Box of Text.  A drop down box can also include text as possible choices, like this:
          1. // This creates a drop down box of text options
          2. text_drop_down_box = “yes”; // [yes,no,maybe]
        3. Labeled Drop Down Box.  Sometimes it is useful to show the user text labels, but have a numerical value for each text label.  You can do so in this manner:
          1. // This creates a drop down box of text options with numerical values
          2. labeled_drop_down_box = 5; // [1:small, 5:medium, 10:large, 50:supersized]
      3. Numerical Slider
        1.  Once you’ve mastered the text box and the drop down box, the text slider is almost trivial.
          1. // This creates a slider with a minimum and maximum
          2. numerical_slider = 1; // [0:10]
      4. Notes
        1. Not every single variable you reference inside the Customizer start/end section will be included as an option.  If any of your variables use any mathematical operators or other variables in its value, it will not appear as an option.  This can be useful for including “hidden” options within the customizable section – by just multiplying a given variable by 1.1  For example, the following will not appear as an option:
          1. // This option will not appear
          2. hidden_option = 100*1;
        2. Neither will this:
          1. // This option will also not appear
          2. // another_hidden_option = 101;
  • Optional Libraries
  • Upload to Thingiverse
    • Once you’ve finished your OpenSCAD file, you just need to share it on Thingiverse.
    • Once it has been uploaded, just tag your Thing with the word “customizer”, publish your Thing, and you’re done!
  • Limitations
    • Right now there are a few limitations for Customizer.  They are:
      • Your Thingiverse entry can only include on OpenSCAD file.
      • Your OpenSCAD file can’t import any external OpenSCAD code, STL’s, or DXF files.
      • Your OpenSCAD code can only be compiled to a single STL file.

The MakerBot team is continually improving the Customizer, so check back with the documentation frequently so you can find out about the newest features!

  1. Such as:  ”this_will_not_appear = 30* 1;” []
Tagged with , , , , , , Leave a comment
 

Leave your comment

 
 
 

xhtml: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>