Scripting a drawer

Creating drawers from script

Some weeks ago we bought a very old (1930’s?) small cupboard. The reason we bought it was that it had a small door which was made of a wooden frame surrounding a tile saying ‘EIEREN’, Dutch for ‘eggs’. Behind the door is room to place 12 eggs. Surrounding the door are some (very) small shelves. The reason we bought it was that it looked really charming, and it was the right thing to store the eggs from our own chickens in.

After it had been standing around for a few weeks I realized that the small shelves had actually been the place to store some very small drawers in. In comes the challenge, as making drawers myself would mean precision woodworking, sawing and glueing very tiny pieces of wood. I like woodworking a bit, but not at that level.

laser cutting

Around the same time I found Ponoko, a webservice that gives us simple mortals a way of making things with a lasercutter at reasonable prices. Their concept is really well thought of: use standard templates, standard material sizes and factories around the world. Really a remarkable service. Using a guestimate of the cuts that had to be made, the price of the drawers would be triple the original EUR 20 we paid for the cupboard. Nonetheless, interesting.
Now I had to start drawing all the parts for the drawers, including the interlocking. I started drawing at Tkkrlab, the local makerspace, when someone told me that a new FabLab had just opened in Enschede. I visited their website, and found a very interesting link for scripted SVG creation: www.giplt.nl/svg. I took my laptop to the FabLab, and was very politely addressed by the maintainer / coordinator / local know-all Wout Zweers who told me the standard script for ‘boxes’ was incorrect; the two side pieces were too long. This could easily be altered in Inkscape, but it seemed more logical to me to change the script creating the SVG, also for future users.

Scripting….

That was the start of a lot of work. I started out with the original script (to be found under load->category construction -> box on giplt). The improvements I made were:

  • Correct the length of the sides. The original script does not take into account that the front has a thickness, so both sides are as long as the bottom: the front would not fit. Difficult to put into words, but it was wrong…
  • The dimensions entered were not the outer dimensions. For me, the outer dimensions of the box were the most important, and the easiest to verify in inkscape
  • The box was a box, not a drawer. What I would like to have is: enter the dimensions and have a drawer.
  • When importing in inkscape, somehow the size was very small. Scaling was an option, but hey, why not solve it in the script?

Solutions!

The first three items I could solve with help of the ‘help’ function in giplt to find out what the syntax was. The last point kept me wondering: how could the output be completely correct, but some weird factor 3.5xx off in scaling? The solution came when I imported in a file that had its units set in pixels instead of my default, millimeters. All dimensions were right in pixels! To my great pleasure I found that the SVG description is very clear about units, see here. The factor was exactly 3.543307 pixels!
Knowing that, I adapted the scripts. The end result for both the box and the drawer can be found here:

Again, you can ‘load’ these files on this site, enter your dimensions under ‘parameters’, and export files. Open in inkscape to see the results.

Result

Tadaaa:
Finally realized the drawers, the result is marvelous!

See the fablab website for the FabMoment

Drawers, right after cutting them

Drawers, right after cutting them

Final result, in the closet

 

 

Cool!

7 thoughts on “Scripting a drawer

  1. wout zweers says:

    ik ga de scriptjes uitproberen, afgelopen week was ik weer een uur extra bezig om de tekeningen aan te passen. wat een gedoe is dat.
    als ze werken, kan ik dan naar jou doorlinken in de wiki?

    wout

    • admin says:

      Hoi Wout, dat is prima!
      Ik mail je nog even voor een nieuwe afspraak voor de laatjes…

      Groeten!

  2. […] [Tinkerer] bought a small cupboard from an antique store to fit nicely into his kitchen decor. After getting it home, he realized that some of the cubbyholes had originally housed drawers. The originals were long gone but this provided an opportunity for him to make the replacements seen above. […]

  3. […] [Tinkerer] bought a small cupboard from an antique store to fit nicely into his kitchen decor. After getting it home, he realized that some of the cubbyholes had originally housed drawers. The originals were long gone but this provided an opportunity for him to make the replacements seen above. […]

  4. […] [Tinkerer] bought a small cupboard from an antique store to fit nicely into his kitchen decor. After getting it home, he realized that some of the cubbyholes had originally housed drawers. The originals were long gone but this provided an opportunity for him to make the replacements seen above. […]

  5. […] [Tinkerer] bought a small cupboard from an antique store to fit nicely into his kitchen decor. After getting it home, he realized that some of the cubbyholes had originally housed drawers. The originals were long gone but this provided an opportunity for him to make the replacements seen above. […]

Leave a Reply

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

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