Linear Extrusion of Bezier Surfaces

After about two weeks worth of work, the Bezier Mesh project has finally reached a “1.0” state.  In the end, I have a routine in OpenScad which essentially allows me to do a linear extrusion of a bezier surface, to any thickness desired.

This little project started innocently enough because I wanted to create more interesting fillets to fit within my various 3D models.  OpenScad does not have a built in fillet, and you can only go so far using the standard CSG functions (add, subtract, union, intersect) of OpenScad.  Once I had the basic Bezier calculations, I thought, “well, it’s actually not that much further to get Bezier surfaces”, and logically it wasn’t.

 The end result has been fairly satisfying.  I now have the ability to generate a surface that is controlled by a Bezier mesh.

This is somewhat interesting because Bezier curves were first used in the automotive industry to specify car body shapes and the like.  That was almost 50 years ago.  Nowadays, the various CAD and other 3D packages, have ‘curves’ as a core component, so noone really thinks of Bezier specifically.  All they know is there are various points you click on and drag them around with the mouse to get different curvy shapes.  And that’s largely how things should be.

There is a re-discovery here.  Essentially, I want to be able to do those fancy curve things as well, but I don’t want to use the fancy UI programs to do it.  So, this library is an enabler.

Now that I have the library, I’m looking at my various designs and thinking about how they can be enhanced using these curves.  One of the first things I’ve made is a toy boat.

It took me a while, using graph paper, to figure out the various points on the curves that I wanted, but I eventually got something that is a good first draft.  A boat has a bow, stern, and midships.  So, I modeled those three pieces, and then stitched it together.

Along the way, I thought of a couple more functions that would make building this sort of model in text rather easy.

This has also brought up another line of thinking in my mind.  Currently, most models on Thingiverse are distributed as .stl files.  That is, rather than the raw stuff that helps you change the original, you get the end product.  Well, as OpenScad has more features, it becomes feasible to use it as a transport mechanism.  That is, I can send around .scad files, even to a machine.  The advantage to that would be, the machine can better handle a higher level description of the thing you’re trying to produce.

At any rate, there’s more Bezier goodness to come.  The next form of surface will take into account the actual shape of the surface when determining the ‘down’ side.  Today, the ‘down’ facing surface is merely the same as the ‘top’, but dropped by the specified thickness in the z-axis.  That’s why it is ‘linear_extrude’.  The next version will include a true ‘shell_extrude’.


Mr Bezier goes to OpenScad

I have been using OpenScad since November of 2010, when I first made this simple design: http://www.thingiverse.com/thing:4828 .  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: http://www.thingiverse.com/thing:8443

  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 (http://www.thingiverse.com/thing:8454).  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: http://www.thingiverse.com/thing:8456

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:

http://www.thingiverse.com/thing:8302 – End Cap

http://www.thingiverse.com/thing:8301 – 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:

http://www.thingiverse.com/thing:8356

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: http://www.thingiverse.com/thing:6790  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.


Yazzo Lock Clip

I have a MakerBot Cupcake 3D printer.  Although the quality of prints you can get out of that machine are not the absolute best, it does provide a platform upon which much 3D printing experimentation can occur.

One of the things I have played with is the fasteners on the machine.  There are lot of screws and nuts that must be put together in order to assemble the printer.  I thought it would be a good idea to use a quick clip to assemble the robot, so I created one.  it is out on thingiverse here: http://www.thingiverse.com/thing:5493

I have completely removed all of the screws from my MakerBot Cupcake, and replaced them with this clip.  The box went together quickly and easily, and comes apart the same.

It seems to be strong enough in its current form to do the job of connecting the individual panels.  I found it quite easy to do the construction, and it went along much faster than when I was using the screws.