Mr Bezier goes to OpenScad

I have been using OpenScad since November of 2010, when I first made this simple design: .  It’s been a great ride with OpenScad so far.  I wanted to learn a design tool that did not require me to climb a very steep learning curve like with Blender, or AutoCAD or SolidWorks.

Well, OpenScad has been a great tool in this regard thus far.  I’ve been able to create all manner of thing, mostly functional.  I have now gotten to the point where I’ve needed to create more intricate and elegant parts.  No longer satisfied with blocky angular designs.  I need some nice curves, and more than can be had from doing simple CSG with cyclinders and blocks.

So, I spent some time thinking about how to use Bezier curves in OpenScad.  Ideally OpenScad would have some curves built into the system, but as far as I know, it does not.  So, I created my own Bezier functions in OpenScad:

  I did this because I simply wanted to do some nice fillets on various designs, and you can only go so far by subtracting a cylinder from a square.  With this function, I support cubic Bezier curves (start point, end point, two control points).  It’s very nice for general purpose stuff, not just fillets.

That was a good start to Bezier curves in OpenScad.  Then I went further, and added a couple more functions.  The first one was to add Bezier ribbons (  That is, you define two Bezier curves.  The function will create a ‘ribbon’ between the two curves.  This can be used for simple things like a ramp, or a handle to a cup, or what have you.

At the same time that I was creating the ribboning function, I realized that it would not be that hard to demonstrate how to use a Bezier curve to change colors on the image over the length of the curve.  This lead to the creation of a secondary function that can return three values along the Bezier curve.  This is handy when the control points are actually color values, and you want to smoothly interpolate between them.

This seemed to be going quite well, so I added one more function.  This last one does a rotation of a Bezier strip.

This one looks the coolest of all so far.  It demonstrates the Bezier curve, and the rotation, and the color gradient, and it all happens in just a couple lines of code.  That’s a tremendously valuable tool to have in the modeling toolchest.

Now that I have this tool, I have started to use it to improve on designs.  Here is a new version of the effector end of the PolyBot:

This has been a good outcome so far.  I was dreading having to do the work of modeling using a different tool, or importing meshes, which I then could not easily alter.  Now that I have essentially built Bezier curves into OpenScad, I can stick with this tool longer.

I would like to explore creating Hermite curves, and then possibly dealing with C1/2 continuity of curve segments, but I’m happy with this for now.

Straight Metal Jacket

As I was wandering the aisles of Home Depot, looking for some inspiration, I came across that section that has metal rods, and randoms bits of other metals.  The flat and angle aluminum caught my eye because I was thinking about how to hang things in the home and in the shop.  One of the things I want to do is create a mounting system that allows me to slide a monitor along a wall in the shop.

I purchased some straight, some round, some two sided, and some 3 sided pieces, to play with.  Then I got to work designing some pieces that would act to attach the metal to a surface.  First I worked with the angle piece (1/8″ X 3/4″) and created the following things: – End Cap – Sleeve

These two alone aren’t very useful, and don’t even provide a mounting point, but they’re a start.

Next, I went after the flat aluminum (1/8″ thick, 3/4″ wide).  This time I created mountable pieces, both an end cap, as well as a sleeve:

Straight Metal Jackets

It is an interesting study for me.  I don’t think I found such pieces at Home Depot, and I would fully expect to find them there.  The design is fun and interesting for me for a few reasons.  First, it is so simple.  Providing the slight gap (4mm) between the metal piece and the wall provides some good options for mounting.  I can hang something over the top edge, like my over-the-door mounting system:  Or, I can design a piece that actually slides over the bar as a  more secure part.

I can use it in the shop to hang those plastic parts bins, which come with a very small rail, which isn’t nearly long enough.

I hate to say ‘the possibilities are endless’, but they really are.  Just a bit of plastic, and some standard hardware stuff, and suddenly you’re creating modular systems.