Create smoothly curved containers such as bowls, urns, or vases with this customizable design. Beginning with a side view, you draw [Bezier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve) control points in a polygon widget; the resulting curve is turned into a cross section that is spun as if on a lathe or potter's wheel to produce the final model.

Here is a brief screencast demonstrating how to draw Bezier curve control points with this customizer: youtube.com/watch?v=hVwQY6czCPw The attached screenshot overlays a frame from the screencast with additional details.

---

Produces solid models intended to be printed with zero infill and zero top layers. (Alternatively, stop your printer around 90% to prevent top layers from being printed.)

---

Part of my [Customizable Containers](http://www.thingiverse.com/anoved/collections/customizable-containers) series.

---

(Does Thingiverse garble UTF? Let's look at the accented "e" in the word that follows to find out: *BÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ©zier*. Not initially, but after passing through the Edit Thing page again, it appears so.)

]]>Here is a brief screencast demonstrating how to draw Bezier curve control points with this customizer: youtube.com/watch?v=hVwQY6czCPw The attached screenshot overlays a frame from the screencast with additional details.

---

Produces solid models intended to be printed with zero infill and zero top layers. (Alternatively, stop your printer around 90% to prevent top layers from being printed.)

---

Part of my [Customizable Containers](http://www.thingiverse.com/anoved/collections/customizable-containers) series.

---

(Does Thingiverse garble UTF? Let's look at the accented "e" in the word that follows to find out: *BÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ©zier*. Not initially, but after passing through the Edit Thing page again, it appears so.)

This is a personalised version of WilliamAAdams' bezier boat. Text added with HarlanDMii's write.scad library.

To put your name on the boat edit the OpenSCAD file to add your name. You may need to position it manually but it should be OK as it is for short names.

]]>To put your name on the boat edit the OpenSCAD file to add your name. You may need to position it manually but it should be OK as it is for short names.

OpenScad library for creating solid objects based based on bezier curves.

]]>So, my new bike has a tendency to throw the chain when you shift to the granny ring, which is highly annoying. I went through a few iterations on this chain-catcher over the past week, and haven't missed a granny-ring shift since.

Rotate the stl file 180 degrees along the X or Y axis before printing, and it will print without support.

The part weighs 12g when printed in ABS with 20% infill, so it doesn't add significant weight. I don't think it will look too bad either, especially if you can print in a color that blends with your frame.

The chain catcher holds itself in place pretty well just by clamping to the seat tube and the down tube, but it has channels for a zip tie or two if you want to strap it down.

The part does not have any adjustability once it's printed, which keeps it simple and light. The idea is to print one customized to fit your particular bike.

I imagine that the design may not translate well to a bike with significantly different seat/down tube geometry than my touring road bike (Jamis Bosanova). It also won't work well if you have non-round tubes.

The OpenSCAD file requires my [Bezier Library](http://www.thingiverse.com/thing:86713).

]]>Rotate the stl file 180 degrees along the X or Y axis before printing, and it will print without support.

The part weighs 12g when printed in ABS with 20% infill, so it doesn't add significant weight. I don't think it will look too bad either, especially if you can print in a color that blends with your frame.

The chain catcher holds itself in place pretty well just by clamping to the seat tube and the down tube, but it has channels for a zip tie or two if you want to strap it down.

The part does not have any adjustability once it's printed, which keeps it simple and light. The idea is to print one customized to fit your particular bike.

I imagine that the design may not translate well to a bike with significantly different seat/down tube geometry than my touring road bike (Jamis Bosanova). It also won't work well if you have non-round tubes.

The OpenSCAD file requires my [Bezier Library](http://www.thingiverse.com/thing:86713).

See github.com/uplake/BezierScad

Updated 5/10/13--fixed triangle winding in centered BezWall; use polyhedron for variable-height BezArc.

I wanted a bezier library that could handle an arbitrary number of control points. When working on thingiverse.com/thing:77586, I also wanted to rotate extrude a "wall" defined by a bezier path and a width.

BezWall is the workhorse function. The "ctlPts" parameter accepts between 1-8 bezier control points.

The parameters "width" and "height" accept static values (e.g., 5) specifying the width and height of the wall. If height is 0, it will generate a 2d object you can extrude yourself.

The alternate parameters "widthCtls" and "heightCtls" accept an array of values that will be bezier-interpolated along the length of the wall.

If the "centered" parameter is "true", the wall is centered on the path defined by "ctlPts". Otherwise, one edge of the wall is defined by "ctlPts".

At the moment, there is no documentation! But there is a test file that runs through most of the available features.

]]>Updated 5/10/13--fixed triangle winding in centered BezWall; use polyhedron for variable-height BezArc.

I wanted a bezier library that could handle an arbitrary number of control points. When working on thingiverse.com/thing:77586, I also wanted to rotate extrude a "wall" defined by a bezier path and a width.

BezWall is the workhorse function. The "ctlPts" parameter accepts between 1-8 bezier control points.

The parameters "width" and "height" accept static values (e.g., 5) specifying the width and height of the wall. If height is 0, it will generate a 2d object you can extrude yourself.

The alternate parameters "widthCtls" and "heightCtls" accept an array of values that will be bezier-interpolated along the length of the wall.

If the "centered" parameter is "true", the wall is centered on the path defined by "ctlPts". Otherwise, one edge of the wall is defined by "ctlPts".

At the moment, there is no documentation! But there is a test file that runs through most of the available features.

If you draw or are into drafting, then you know the value of having a set of French Curves!

These print at 3mm thick.

***UPDATED*** Added a zipped folder of .DWG files so you can laser cut these.

]]>These print at 3mm thick.

***UPDATED*** Added a zipped folder of .DWG files so you can laser cut these.

This is perfect for your keychain, if you simply love your university! (Can be used as a bottleopener, too!)

Made by a student of Aerospaceengineering.

]]>Made by a student of Aerospaceengineering.

Heart Crown

For those of us with a Princess in our lives, and the need to be forgiven for the state of the living-room-slash-mad-scientist-laboratory and the ABS fumes... the ability to print a crown made of hearts can go a long way to securing continued forbearance. ;-)

Thank you MakeALot for the original of which this is just a quick hack.

]]>Thank you MakeALot for the original of which this is just a quick hack.

Not being able to leave well enough alone, I found that I needed to have partial surfaces of revolution.

This thing adds the ability to specify starting and ending angles for the revolution (defaults to 0 to 360).

That's kind of nice because for the simple cases where you are not intersecting with something at odd angles, you can simply generate the exact surface that you need, and call it a day.

Included in this revision is an experiment to see if the built-in 'rotate_extrude' could do a better job of things. Although it does play nicely with the CSG operations while viewing, it does not generate 2-manifold structures (and thus, no .stl files). I'm thinking maybe I need to overlap surfaces or something, rather than calculating exact vertices.

At any rate, I thought of adding rotation about an arbitrary line, as a final step, but really, that's easily achieved in OpenScad, so this might be the end of the line for these routines.

Isn't it amazing what can be done with OpenScad!!

Blog Entry: williamaadams.wordpress.com/2011/07/01/revolutionary-surfaces-with-openscad/

]]>This thing adds the ability to specify starting and ending angles for the revolution (defaults to 0 to 360).

That's kind of nice because for the simple cases where you are not intersecting with something at odd angles, you can simply generate the exact surface that you need, and call it a day.

Included in this revision is an experiment to see if the built-in 'rotate_extrude' could do a better job of things. Although it does play nicely with the CSG operations while viewing, it does not generate 2-manifold structures (and thus, no .stl files). I'm thinking maybe I need to overlap surfaces or something, rather than calculating exact vertices.

At any rate, I thought of adding rotation about an arbitrary line, as a final step, but really, that's easily achieved in OpenScad, so this might be the end of the line for these routines.

Isn't it amazing what can be done with OpenScad!!

Blog Entry: williamaadams.wordpress.com/2011/07/01/revolutionary-surfaces-with-openscad/

Inching closer to perfection.

This thing is an update to the revoloids library.

This time around, I've gotten the normals calculated correctly, so that a 'shell_extrude' can be performed. So, now there are two methods in the revoloids.scad file: linear_extrude_revoloid, shell_extrude_revoloid

The first one will 'intrude' towards the center of rotation. that's a nice valid way of doing things, but the ends must be relatively flat or things will get messed up.

The shell_extrude, which is new here, will 'do the needful' and extrude inward, or outward, based on the normals at the points on the curves (circule, and cubic curve). That's useful in some cases, and you'll get a uniform thickness across the piece.

There's some nice 'visual debug' support, so you can see fancy colors, wireframes, normals, and the like (exhibited in the attached pictures). And yes, it does in fact generate valid .stl files (exhibited in the attached .stl files).

What more can be done with this? Well, I took the opportunity to remove the implementation of the bezier surface of revolution, because it is now redundant. I would like to do piecewise curves with C0/C1 continuity. It's just a matter of stitching them together. That will allow for more complex shapes. Other than that, not much other than some more simplifications, and rotation around an arbitrary axis. But, perhaps that can wait for a 2.0 version.

Still need to work on convenient end caps

Ultimately I'll merge this into the Renderer.scad file

BEWARE:

Your ends should NOT be totally vertical

Hermite curves still don't come out quite correctly

UPDATE: 270611

I figured out my Hermite problem. The actual problem relates to the cheap way in which I am still calculating the normal to the circle. You absolutely MUST create your curve in the x-y plane. It will be interesting at some point to add the ability to do it more free form, but for now, it's best if your curve is planar in the x-y

]]>This thing is an update to the revoloids library.

This time around, I've gotten the normals calculated correctly, so that a 'shell_extrude' can be performed. So, now there are two methods in the revoloids.scad file: linear_extrude_revoloid, shell_extrude_revoloid

The first one will 'intrude' towards the center of rotation. that's a nice valid way of doing things, but the ends must be relatively flat or things will get messed up.

The shell_extrude, which is new here, will 'do the needful' and extrude inward, or outward, based on the normals at the points on the curves (circule, and cubic curve). That's useful in some cases, and you'll get a uniform thickness across the piece.

There's some nice 'visual debug' support, so you can see fancy colors, wireframes, normals, and the like (exhibited in the attached pictures). And yes, it does in fact generate valid .stl files (exhibited in the attached .stl files).

What more can be done with this? Well, I took the opportunity to remove the implementation of the bezier surface of revolution, because it is now redundant. I would like to do piecewise curves with C0/C1 continuity. It's just a matter of stitching them together. That will allow for more complex shapes. Other than that, not much other than some more simplifications, and rotation around an arbitrary axis. But, perhaps that can wait for a 2.0 version.

Still need to work on convenient end caps

Ultimately I'll merge this into the Renderer.scad file

BEWARE:

Your ends should NOT be totally vertical

Hermite curves still don't come out quite correctly

UPDATE: 270611

I figured out my Hermite problem. The actual problem relates to the cheap way in which I am still calculating the normal to the circle. You absolutely MUST create your curve in the x-y plane. It will be interesting at some point to add the ability to do it more free form, but for now, it's best if your curve is planar in the x-y

Well, revoloids (slight change in name) are really nifty cool, easy to generate surfaces in a mathematical sense, but for them to be relevant to 3D printing, they need some volume.

This thing adds the ability to specify a thickness on your revoloid so that you can actually export as a .stl and print it.

I whimped out (and thus still not 1.0) and just used the normal of the circle to calculate the second quad. The actual normal is a cross between the tangent of the circle, and the tangent of the curve at that point. Next version.

I also want to come up with a nice scheme for printing flats for 'bottoms' and 'tops'.

]]>This thing adds the ability to specify a thickness on your revoloid so that you can actually export as a .stl and print it.

I whimped out (and thus still not 1.0) and just used the normal of the circle to calculate the second quad. The actual normal is a cross between the tangent of the circle, and the tangent of the curve at that point. Next version.

I also want to come up with a nice scheme for printing flats for 'bottoms' and 'tops'.

There are lots of interesting cubic curves in the world. They're interesting because with just 4 points, you can describe very interesting shapes. These curves make for nice revolutionary solids, but with OpenScad, it's kind of a challenge.

This thing generalizes the surface of revolution based on a cubic curve.

How simple is it?

The following will generate that bell shaped picture based on a Catmull-Rom cubic curve.

surface_rotationx_cubic(anglesteps = 36, stacksteps = 12,

umult = 0.5, A = cubic_catmullrom_M(),

cps = [[0, 1, 0],[2,3,0], [4,1,0],[5,2,0]]);

And this one will do the same for a standard Bezier curve based on the same control points

surface_rotationx_cubic(anglesteps = 24, stacksteps = 12,

umult = 1, A = cubic_bezier_M(),

cps = [[0, 1, 0],[2,3,0], [4,1,0],[5,2,0]]);

And the same can be done for a Hermite, or any other 'cubic' curve you can think of. The two key components are the blending function 'A', which is a 4x4 matrix, and the control points 'cps', which are simply the geometry of your control points.

The routine, found in the revolids.scad file, will take care of all the dirty work.

I marked this as version '0.5' because although it will show pretty pictures, right now it's not doing the surface normal calculations, or anything else really necessary to make solids, so a couple more iterations. But, it's fun to play with.

I've really been wracking my brain on the lack of function pointers in OpenScad, but this essentially provides the same capability, utilizing the matrices, which are the essence of these things anyway.

At any rate, something to play with.

UPDATE: 220611

Added a picture of a Hermite revolid with debugging normals (showing the circular normals to be incorrect).

]]>This thing generalizes the surface of revolution based on a cubic curve.

How simple is it?

The following will generate that bell shaped picture based on a Catmull-Rom cubic curve.

surface_rotationx_cubic(anglesteps = 36, stacksteps = 12,

umult = 0.5, A = cubic_catmullrom_M(),

cps = [[0, 1, 0],[2,3,0], [4,1,0],[5,2,0]]);

And this one will do the same for a standard Bezier curve based on the same control points

surface_rotationx_cubic(anglesteps = 24, stacksteps = 12,

umult = 1, A = cubic_bezier_M(),

cps = [[0, 1, 0],[2,3,0], [4,1,0],[5,2,0]]);

And the same can be done for a Hermite, or any other 'cubic' curve you can think of. The two key components are the blending function 'A', which is a 4x4 matrix, and the control points 'cps', which are simply the geometry of your control points.

The routine, found in the revolids.scad file, will take care of all the dirty work.

I marked this as version '0.5' because although it will show pretty pictures, right now it's not doing the surface normal calculations, or anything else really necessary to make solids, so a couple more iterations. But, it's fun to play with.

I've really been wracking my brain on the lack of function pointers in OpenScad, but this essentially provides the same capability, utilizing the matrices, which are the essence of these things anyway.

At any rate, something to play with.

UPDATE: 220611

Added a picture of a Hermite revolid with debugging normals (showing the circular normals to be incorrect).

I've wanted to see how much can be done with OpenScad to generate more basic solids. Now that I've gotten my 100th design out of the way, here's more OpenScad mayhem.

This thing is a little library of 'Solids of Revolution' (revolids).

It's simple stuff that you can easily do with OpenScad (torus, ellipsoid, bezier curves rotated. In this case, I'm doing my own math though, and utilizing the Renderer that I did for the Bezier surface stuff.

This library allows me to play with different methods of rendering different shapes, to see what I can make 2-manifold, what will still work as a CSG form when combined with other primitives, and whatnot. These closed polyhedra will work standalone, but to combine them with other things in a CSG way would require some more work.

One goal I have is to get more solids integrated into a tool like RapCAD. And ultimately, I'd like to get a machine to be able to read .scad files directly, rather than slicing .stl files. But that's another story, these are just raw bits.

At any rate, if you're at all curious about how these various forms are put together from scratch, here's a library for you.

UPDATE: The blog posting to go with it

williamaadams.wordpress.com/2011/06/11/reconsidering-openscad-extensions/

]]>This thing is a little library of 'Solids of Revolution' (revolids).

It's simple stuff that you can easily do with OpenScad (torus, ellipsoid, bezier curves rotated. In this case, I'm doing my own math though, and utilizing the Renderer that I did for the Bezier surface stuff.

This library allows me to play with different methods of rendering different shapes, to see what I can make 2-manifold, what will still work as a CSG form when combined with other primitives, and whatnot. These closed polyhedra will work standalone, but to combine them with other things in a CSG way would require some more work.

One goal I have is to get more solids integrated into a tool like RapCAD. And ultimately, I'd like to get a machine to be able to read .scad files directly, rather than slicing .stl files. But that's another story, these are just raw bits.

At any rate, if you're at all curious about how these various forms are put together from scratch, here's a library for you.

UPDATE: The blog posting to go with it

williamaadams.wordpress.com/2011/06/11/reconsidering-openscad-extensions/

I saw the original Patron one piece chair, and I thought 'that would be a perfect thing to try and model with a Bezier surface'.

This thing is an attempt to model the patron chair it derives from using the Bezier surface library.

It's just fun to play with. You can fiddle about with the vertices of the curves, and see how the curve reacts. It would probably be much easier to model with a different type of curve, but here it is.

]]>This thing is an attempt to model the patron chair it derives from using the Bezier surface library.

It's just fun to play with. You can fiddle about with the vertices of the curves, and see how the curve reacts. It would probably be much easier to model with a different type of curve, but here it is.

The previous incarnations of the library have been good for laying down generic Bezier surfaces, but it was very picky when it came to actually turning them into .stl files that are printable.

This thing will more readily turn your surfaces into .stl files. It makes a modification to the Renderer.scad file. Specifically, the DisplayQuadShards() routine. It now takes an array which tells it which of the 'edge' faces to generate.

Thus, instead of generating all the triangles as polyhedra, it will actually generate a full 'shell'. The 'top' is complete, and the 'bottom' is complete, but only the outside edges of the entire surface are complete. So, there are no interior walls, which end up causing problems for the shape being 2-manifold.

What this means is there is essentially one giant solid to process rather than a whole bunch of little ones. This makes CGAL much happier, and pieces that would not be printable before are now printable, as evidenced by the included .stl files here.

A couple more 'debugging' improvements. You can now specify your own opacity when you utilize the shell_extrude_bezier() module. You can also specify whether you want to see the curve frame, instead of looking at the actual polyhedron rendering. This is useful so you can just look at the true surface, without the walls getting in the way.

The picture is an optical illusion. I'm using an opacity of 0.75 to see the interior. Those internal 'walls' aren't actually there.

There are still issues with compound objects. That fancy shoe for instance: thingiverse.com/thing:8937

This renderer is now capable of dealing with the individual parts, but if you try to put them all together as a single object, it will not be able to generate a .stl. This is progress as you could glue the individual parts together at least.

At any rate, one more step along the path...

]]>This thing will more readily turn your surfaces into .stl files. It makes a modification to the Renderer.scad file. Specifically, the DisplayQuadShards() routine. It now takes an array which tells it which of the 'edge' faces to generate.

Thus, instead of generating all the triangles as polyhedra, it will actually generate a full 'shell'. The 'top' is complete, and the 'bottom' is complete, but only the outside edges of the entire surface are complete. So, there are no interior walls, which end up causing problems for the shape being 2-manifold.

What this means is there is essentially one giant solid to process rather than a whole bunch of little ones. This makes CGAL much happier, and pieces that would not be printable before are now printable, as evidenced by the included .stl files here.

A couple more 'debugging' improvements. You can now specify your own opacity when you utilize the shell_extrude_bezier() module. You can also specify whether you want to see the curve frame, instead of looking at the actual polyhedron rendering. This is useful so you can just look at the true surface, without the walls getting in the way.

The picture is an optical illusion. I'm using an opacity of 0.75 to see the interior. Those internal 'walls' aren't actually there.

There are still issues with compound objects. That fancy shoe for instance: thingiverse.com/thing:8937

This renderer is now capable of dealing with the individual parts, but if you try to put them all together as a single object, it will not be able to generate a .stl. This is progress as you could glue the individual parts together at least.

At any rate, one more step along the path...

Conic BÃ©zier Curve for OpenSCAD

also known as Quadratic Bezier Curve

also known as Bezier Curve with 3 control points

also known as 'Conic Arcs' or 'Parabolic Segments'

By Don B, 2011, released into the Public Domain

**What's it for**

Bezier curves allow you to pick a small number of 'control points', then let the computer fill in a pretty curve between them. In this thing, 3 control points are used.

**Notes**

This is for 3-point bezier curves; there is another popular type, the 4-point 'Cubic', that this code doesn't do.

This is inspired by William Adam's cubic bezier Thingiverse OpenSCAD code. His code now also handles Conics; I guess I will leave this thing here as a sort of 'super simple' 'for dummies' version.

The first sample image shows a simple 3 control-point curved polygon, and a rod around which it can be rotated. The result of this rotation is shown in the big smooth object.

The next sample image shows the code itself; the module is only about 10 lines long thanks to OpenSCAD's built-in vector math.

**Please see also**

thingiverse.com/thing:8443 by William A Adams (Cubic Beziers)

en.wikipedia.org/wiki/File:Bezier_2_big.gif by Phil Tregoning

en.wikipedia.org/wiki/B%C3%A9zier_curve by Wikipedia editors

freetype.org/freetype2/docs/glyphs/glyphs-6.html David Turner + Freetype team

**Using the code**

1. download the .scad file, below

2. copy/paste the BezConic module to your own code

3. call it like this:

p0=[15,0];

p1=[1,14];

p2=[7,30];

linear_extrude() BezConic(p0,p1,p2,steps=20);

**Fun Facts**

BÃ©zier are named after Pierre BÃ©zier, who used the work of Paul de Casteljau to make curves on car bodies. Casteljau worked at Citroen and Bezier worked at Renault.

They are named 'conic' because 3-point Bezier's are basically parabolas. A parabola is basically the intersection of a cone with a plane (i.e. a conic section). Please see wikipedia for more info.

Conic Arc BÃ©zier Curves (3 control points) are used by TrueType fonts.

]]>also known as Quadratic Bezier Curve

also known as Bezier Curve with 3 control points

also known as 'Conic Arcs' or 'Parabolic Segments'

By Don B, 2011, released into the Public Domain

Bezier curves allow you to pick a small number of 'control points', then let the computer fill in a pretty curve between them. In this thing, 3 control points are used.

This is for 3-point bezier curves; there is another popular type, the 4-point 'Cubic', that this code doesn't do.

This is inspired by William Adam's cubic bezier Thingiverse OpenSCAD code. His code now also handles Conics; I guess I will leave this thing here as a sort of 'super simple' 'for dummies' version.

The first sample image shows a simple 3 control-point curved polygon, and a rod around which it can be rotated. The result of this rotation is shown in the big smooth object.

The next sample image shows the code itself; the module is only about 10 lines long thanks to OpenSCAD's built-in vector math.

thingiverse.com/thing:8443 by William A Adams (Cubic Beziers)

en.wikipedia.org/wiki/File:Bezier_2_big.gif by Phil Tregoning

en.wikipedia.org/wiki/B%C3%A9zier_curve by Wikipedia editors

freetype.org/freetype2/docs/glyphs/glyphs-6.html David Turner + Freetype team

1. download the .scad file, below

2. copy/paste the BezConic module to your own code

3. call it like this:

p0=[15,0];

p1=[1,14];

p2=[7,30];

linear_extrude() BezConic(p0,p1,p2,steps=20);

BÃ©zier are named after Pierre BÃ©zier, who used the work of Paul de Casteljau to make curves on car bodies. Casteljau worked at Citroen and Bezier worked at Renault.

They are named 'conic' because 3-point Bezier's are basically parabolas. A parabola is basically the intersection of a cone with a plane (i.e. a conic section). Please see wikipedia for more info.

Conic Arc BÃ©zier Curves (3 control points) are used by TrueType fonts.

The 1.0 version of the Bezier library included a simple linear extrusion of the bezier surface. The things this derives from added a quick and easy 'shell extrusion', which took into account the normals on the quads to create true 'inner' and 'outer' quads.

This thing makes a few improvements to both the normal calculations, and rearranges the libraries slightly to accomodate for future curved surface/solid things.

As a bonus, the hermite.scad file is thrown in. At the moment, it only has basic Hermite calculations. It even has a surface thing. So, if you want to play with that, here it is.

Also, in terms of library function naming, I've switched to being more explicit and rational.

linear_extrude_bezier - extrusion in the z-axis

shell_extrude_bezier - extrusion along the normals

So, for Hermite, it would be linear_extrude_hermite, shell_extrude_hermite

One of the cool features is the ability to show the normals, per vertex. This is extremely handy for debugging purposes. This, combined with being able to show the control mesh, makes for some nice visualization. I was actually able to spot a bug in my derivatives calculations by looking at which way a couple of normals were pointing.

Also, I've combined the bezier functions into the maths.scad library, so there is just one fewer files to download.

UPDATE: One more change I forgot to mention. I introduced the terms 'berp' and 'berpm'. Bezier Interpolation (berp - formerly PtOnBez). Bezier Interpolation of Mesh (berpm). I thought they would be fun names, and in line with the classic Linear Interpolation (lerp).

]]>This thing makes a few improvements to both the normal calculations, and rearranges the libraries slightly to accomodate for future curved surface/solid things.

As a bonus, the hermite.scad file is thrown in. At the moment, it only has basic Hermite calculations. It even has a surface thing. So, if you want to play with that, here it is.

Also, in terms of library function naming, I've switched to being more explicit and rational.

linear_extrude_bezier - extrusion in the z-axis

shell_extrude_bezier - extrusion along the normals

So, for Hermite, it would be linear_extrude_hermite, shell_extrude_hermite

One of the cool features is the ability to show the normals, per vertex. This is extremely handy for debugging purposes. This, combined with being able to show the control mesh, makes for some nice visualization. I was actually able to spot a bug in my derivatives calculations by looking at which way a couple of normals were pointing.

Also, I've combined the bezier functions into the maths.scad library, so there is just one fewer files to download.

UPDATE: One more change I forgot to mention. I introduced the terms 'berp' and 'berpm'. Bezier Interpolation (berp - formerly PtOnBez). Bezier Interpolation of Mesh (berpm). I thought they would be fun names, and in line with the classic Linear Interpolation (lerp).

So, what are Bezier curves good for if you're not going to do much with them?

This thing is a simple boat created out of Bezier surfaces. I define a bow, and a midship section, and a stern, then just stitch a few of them together. In the picture can be seen how the control mesh looks.

This particular one shows how you have to print in a couple of halves and bring them together. This is an artifact of the linear extrusion offered by the OpenScad bezier library.

This model takes about 3 minutes to generate the .stl from the .scad. Not too bad.

]]>This thing is a simple boat created out of Bezier surfaces. I define a bow, and a midship section, and a stern, then just stitch a few of them together. In the picture can be seen how the control mesh looks.

This particular one shows how you have to print in a couple of halves and bring them together. This is an artifact of the linear extrusion offered by the OpenScad bezier library.

This model takes about 3 minutes to generate the .stl from the .scad. Not too bad.

Well, I started out wanting to do some nicer fillets on my OpenScad designs, and suddenly, I have a full blown Bezier surface/solids library!

This thing is the Version 1.0 for this stuff. I think it's actually good enough to produce some nice looking objects.

The technique used here is a linear extrusion of a bezier surface. The surface itself is described by 16 control points in a mesh. The machinery then takes care of rendering that to the thickness that you want.

The workhorse module can be found in the Renderer.scad file: DisplaySurfaceMesh()

This will generate a surface, according to your mesh, and extruded to the thickness that you specify (default 1mm). It is a solid, so it will play nicely with the other CSG functions in OpenScad.

There are a few demo/test/samples provided in the .scad files, so it should be fairly easy to make up your own examples.

I use colors in the examples because it makes for some pretty pictures. They don't affect the rendering process at all. If you don't like the color ramps, you can select your own.

Although this version provides only one mechanism for doing solids from the Bezier surface mesh, it has all the fundamentals for you to do other forms as well. you don't even have to use the Bezier functions for bezier surfaces, you can use them for anything where you'd like something to vary in a parametric sort of way in your designs. The color ramps are another example of how the Bezier curves can be used.

At any rate, there are other forms of curves, and more rendering methods to be pursued. RapCAD is doing some interesting work, and hopefully Bezier shows up as a core feature of these various text based tools.

But, until that day... enjoy!

UPDATE: Blog entry to go with it:

williamaadams.wordpress.com/2011/05/26/linear-extrusion-of-bezier-surfaces/

]]>This thing is the Version 1.0 for this stuff. I think it's actually good enough to produce some nice looking objects.

The technique used here is a linear extrusion of a bezier surface. The surface itself is described by 16 control points in a mesh. The machinery then takes care of rendering that to the thickness that you want.

The workhorse module can be found in the Renderer.scad file: DisplaySurfaceMesh()

This will generate a surface, according to your mesh, and extruded to the thickness that you specify (default 1mm). It is a solid, so it will play nicely with the other CSG functions in OpenScad.

There are a few demo/test/samples provided in the .scad files, so it should be fairly easy to make up your own examples.

I use colors in the examples because it makes for some pretty pictures. They don't affect the rendering process at all. If you don't like the color ramps, you can select your own.

Although this version provides only one mechanism for doing solids from the Bezier surface mesh, it has all the fundamentals for you to do other forms as well. you don't even have to use the Bezier functions for bezier surfaces, you can use them for anything where you'd like something to vary in a parametric sort of way in your designs. The color ramps are another example of how the Bezier curves can be used.

At any rate, there are other forms of curves, and more rendering methods to be pursued. RapCAD is doing some interesting work, and hopefully Bezier shows up as a core feature of these various text based tools.

But, until that day... enjoy!

UPDATE: Blog entry to go with it:

williamaadams.wordpress.com/2011/05/26/linear-extrusion-of-bezier-surfaces/

One step closer to the world. The virtuous cycle of innovation is a very good thing. I have received much support and ideas from syvwlch thingiverse.com/syvwlch I have been inspired by the printable clock, and his recent curvy work. Doing free form solids in OpenScad has been a challenging endeavor. There is some math involved, and a lot of head scratching.

This thing is one step closer to providing Bezier surfaces that are actually printable.

In the last iteration, I had the Bezier surface rendering, but it was a pure graphic construct, which was not printable. Now that I've discovered fire (polyhedron), I have been able to get one step closer to making the thing actually solid. In this particular case, you can now specify the thickness of your surface, and the routine will 'do the needful'.

I haven't done any experimentation with polyhedra and CSG commands in OpenScad, so I don't know what happens when you cut out a cylinder from the thing, for example. but, again, one step closer.

The way this thing is done is to use the normals at each vertex, and project 'inward' in the opposite direction for the length of 'thickness' to get a new set of vertices. This new set represents a triangle which is inward from the 'outer' surface. From there, it's a matter of constructing a new surface, and the interjoining quads to seal the edges.

The approach is right for a triangle in isolation, but as can be seen from the image, leaves a lot of gaps. The final solution there is to actually calculate a new surface inward from the original control points, and calculate the appropriate points between the surfaces directly. But, that will be the final step.

Blah, blah, blah

At any rate, solid Bezier surfaces are one step closer.

UPDATE: Added a .stl file: bezier_surface_polyhedra1

This file represents using the polyhedron technique to its fullest. So, it shows that you can in fact generate manifold solids from closed polyhedra.

]]>This thing is one step closer to providing Bezier surfaces that are actually printable.

In the last iteration, I had the Bezier surface rendering, but it was a pure graphic construct, which was not printable. Now that I've discovered fire (polyhedron), I have been able to get one step closer to making the thing actually solid. In this particular case, you can now specify the thickness of your surface, and the routine will 'do the needful'.

I haven't done any experimentation with polyhedra and CSG commands in OpenScad, so I don't know what happens when you cut out a cylinder from the thing, for example. but, again, one step closer.

The way this thing is done is to use the normals at each vertex, and project 'inward' in the opposite direction for the length of 'thickness' to get a new set of vertices. This new set represents a triangle which is inward from the 'outer' surface. From there, it's a matter of constructing a new surface, and the interjoining quads to seal the edges.

The approach is right for a triangle in isolation, but as can be seen from the image, leaves a lot of gaps. The final solution there is to actually calculate a new surface inward from the original control points, and calculate the appropriate points between the surfaces directly. But, that will be the final step.

Blah, blah, blah

At any rate, solid Bezier surfaces are one step closer.

UPDATE: Added a .stl file: bezier_surface_polyhedra1

This file represents using the polyhedron technique to its fullest. So, it shows that you can in fact generate manifold solids from closed polyhedra.

You know in those Japanese anime movies where the character gets question marks above their head, and their cheeks go red when they're embarrassed? I had a smack your head moment as I realized that OpenScad has a polyhedron object!

This thing is a very slight modification to the test_bezier.scad file. It includes a DisplayBezSurface(mesh) routine which will actually draw the surface using polyhedron to place the triangle patches.

That makes the final stage a whole lot easier. Now, instead of trying to use the polygon, and project it into position, I can simply use the polyhedron, and construct an appropriately shaped polyhedron to get the patches at the desired thickness!

So, once I do that, I'll go to version 0.9, and 1.0 will be when it's all nicely packaged up into a couple of clean library files.

One more step, one more pretty picture.

With this technique, now any parametric surface is possible, including b-spline and the like.

]]>This thing is a very slight modification to the test_bezier.scad file. It includes a DisplayBezSurface(mesh) routine which will actually draw the surface using polyhedron to place the triangle patches.

That makes the final stage a whole lot easier. Now, instead of trying to use the polygon, and project it into position, I can simply use the polyhedron, and construct an appropriately shaped polyhedron to get the patches at the desired thickness!

So, once I do that, I'll go to version 0.9, and 1.0 will be when it's all nicely packaged up into a couple of clean library files.

One more step, one more pretty picture.

With this technique, now any parametric surface is possible, including b-spline and the like.

The best thing about development tools is they usually get better as you discover what's really useful to you. In the last iteration of this stuff, a 'debugger' showed up, which allowed you to visualize the Bezier mesh. That thing was a good step forward, but very rudimentary, still relying on 'granules' of a sort to do the drawing.

This thing makes the drawing process a bazillion (officially measured scale) times faster. I finally pulled enough graphics books off the shelf to figure out my vector rotation problem. It's much easier if you think in terms of polar coordinates. (shy grin)

At any rate, the primary changes are in the maths, bezier, and test_maths files, so those are uploaded here.

Now the drawing of wireframes comes from placing cylinders in the positions of lines. The benefit here is that you can dial in both the radius, and the number of faces, to reduce the amount of drawing time. A bonus benefit is that if you make the lines thick enough, and use enough of them, you might actually be able to print a surface directly from the wireframe.

On the other hand, what this also does is make things fast enough that you can actually rapidly visualize how your bezier is turning out. You can see both the control points, and the wireframe of the map in short order, and easily rotate and move it around.

I tell you, this is pretty exciting even for me.

With figuring out the math for the cylinder placement, I have a new lease on life, and have figured out the placement for the quad patches as well. So, I'd say one more experimental session away from actually producing the surfaces.

Final note. If you want to play around with the line drawing, it's in the test_bezier.scad file. It's the 'PlaceLine()' module. There is also a nifty little thing called a segment parser. It takes the endpoints for a line, and returns an 'array' which is essentially a data structure, containing, origin, rotations, length. That's all you need for the line placer to do its thing.

phew...

]]>This thing makes the drawing process a bazillion (officially measured scale) times faster. I finally pulled enough graphics books off the shelf to figure out my vector rotation problem. It's much easier if you think in terms of polar coordinates. (shy grin)

At any rate, the primary changes are in the maths, bezier, and test_maths files, so those are uploaded here.

Now the drawing of wireframes comes from placing cylinders in the positions of lines. The benefit here is that you can dial in both the radius, and the number of faces, to reduce the amount of drawing time. A bonus benefit is that if you make the lines thick enough, and use enough of them, you might actually be able to print a surface directly from the wireframe.

On the other hand, what this also does is make things fast enough that you can actually rapidly visualize how your bezier is turning out. You can see both the control points, and the wireframe of the map in short order, and easily rotate and move it around.

I tell you, this is pretty exciting even for me.

With figuring out the math for the cylinder placement, I have a new lease on life, and have figured out the placement for the quad patches as well. So, I'd say one more experimental session away from actually producing the surfaces.

Final note. If you want to play around with the line drawing, it's in the test_bezier.scad file. It's the 'PlaceLine()' module. There is also a nifty little thing called a segment parser. It takes the endpoints for a line, and returns an 'array' which is essentially a data structure, containing, origin, rotations, length. That's all you need for the line placer to do its thing.

phew...

As the Bezier functions are essentially a development tool, I find myself in need of a 'debugger'.

This 'thing' is an update of the Bezier library. The primary additions are a couple of debugging aids. Specifically, the ability to draw the control points as a wireframe, and the ability to do the same with the quad lines that make up the actual surface.

I have also refactored the various files. The maths.scad files contains some additional functions that were useful, including some more matrix routines (determinant).

This release does not require the granules functions at all. So, there is a new file "Renderer.scad", which is meant to encapsulate whatever rendering routines you're going to do.

I've also started moving down a path whereby parameters to functions and modules are provided as arrays, rather than as individual parameters. I'm doing this because OpenScad reads like a functional language. As such, I assume that every function returns a meaningful value which can then be used directly by another function. This makes tying things together very much simpler.

And finally, in the bezier and maths and Renderer files, you will find things like being able to get a quad by simply calling a function and passing in the mesh control points, and your 'u' and 'v' values.

I still have not solved the normals pointing in the wrong direction for all cases, nor the short leg syndrome on the triangles, but one step closer now.

]]>This 'thing' is an update of the Bezier library. The primary additions are a couple of debugging aids. Specifically, the ability to draw the control points as a wireframe, and the ability to do the same with the quad lines that make up the actual surface.

I have also refactored the various files. The maths.scad files contains some additional functions that were useful, including some more matrix routines (determinant).

This release does not require the granules functions at all. So, there is a new file "Renderer.scad", which is meant to encapsulate whatever rendering routines you're going to do.

I've also started moving down a path whereby parameters to functions and modules are provided as arrays, rather than as individual parameters. I'm doing this because OpenScad reads like a functional language. As such, I assume that every function returns a meaningful value which can then be used directly by another function. This makes tying things together very much simpler.

And finally, in the bezier and maths and Renderer files, you will find things like being able to get a quad by simply calling a function and passing in the mesh control points, and your 'u' and 'v' values.

I still have not solved the normals pointing in the wrong direction for all cases, nor the short leg syndrome on the triangles, but one step closer now.

The ultimate in Bezier curviness in OpenScad is to have thickness of surface, without having to use a bazillion granules to render an object.

This thing is some updating of the bezier functions to deal with the mesh better. Specifically, you can hand the BezierMesh() module a set of 4 Bezier curves, and it will do the surface interpolation/tesselation, and generate a mesh of triangle patches that will represent the surface.

I labelled this as version '0.5' because there are some pretty horrible bugs. As can be seen in the first picture, those blue dots are the calculated surface normals for each of the quad faces. There is a flaw in the rotation angle calculations such that there is a bias, which causes the normals to point off axis in the wrong direction depending on this and that. On more interesting meshes, this will show up even worse.

Also, there are still cracks between the 'rows' as I am not properly calculating the lengths of the sides to match up properly. I know what needs to be done, but I was trying to get the normals right first.

I'm releasing this now, even though it's not quite functional, because I want other people to take a look and possibly do the math better than I am. It's all really straight forward actually. Nothing too harry other than getting some trig right. The rest is just multiplication and addition. Easy optimizations abound, particularly in the BezierMesh() module. The first, to speed up processing, would be to separate the Bezier coefficient calculations from the general 'pointoncurve' calculation. That would be way efficient.

There are some updated functions in the 'maths.scad' file, as well as the 'Render2D.scad' file.

For the final, I'll separate out the "render" stuff for granules from the core drawing. The ideal would be that you could drop in your own renderer, and get totally different behavior. I think that's a fairly easy way to extend OpenScad.

At any rate, just a step along the path...

UPDATE: Here's a blog entry to go with it...

williamaadams.wordpress.com/2011/05/19/mr-beziers-new-perspective/

]]>This thing is some updating of the bezier functions to deal with the mesh better. Specifically, you can hand the BezierMesh() module a set of 4 Bezier curves, and it will do the surface interpolation/tesselation, and generate a mesh of triangle patches that will represent the surface.

I labelled this as version '0.5' because there are some pretty horrible bugs. As can be seen in the first picture, those blue dots are the calculated surface normals for each of the quad faces. There is a flaw in the rotation angle calculations such that there is a bias, which causes the normals to point off axis in the wrong direction depending on this and that. On more interesting meshes, this will show up even worse.

Also, there are still cracks between the 'rows' as I am not properly calculating the lengths of the sides to match up properly. I know what needs to be done, but I was trying to get the normals right first.

I'm releasing this now, even though it's not quite functional, because I want other people to take a look and possibly do the math better than I am. It's all really straight forward actually. Nothing too harry other than getting some trig right. The rest is just multiplication and addition. Easy optimizations abound, particularly in the BezierMesh() module. The first, to speed up processing, would be to separate the Bezier coefficient calculations from the general 'pointoncurve' calculation. That would be way efficient.

There are some updated functions in the 'maths.scad' file, as well as the 'Render2D.scad' file.

For the final, I'll separate out the "render" stuff for granules from the core drawing. The ideal would be that you could drop in your own renderer, and get totally different behavior. I think that's a fairly easy way to extend OpenScad.

At any rate, just a step along the path...

UPDATE: Here's a blog entry to go with it...

williamaadams.wordpress.com/2011/05/19/mr-beziers-new-perspective/

There have been tons of graphics rendering programs developed over the years. Likewise, there are tons of graphics books out there in the world showing you how to use those systems. One such system is OpenGL. As OpenGL is utilized for everything from game development to rendering of body tissue, there are plenty of examples, and models, demonstrating how to do very interesting things.

This thing uses the current version of the Granule rendering system being developed in OpenScad, and renders one of the well known samples from OpenGL called "bezmesh".

I found an article here: opengl.org/resources/code/samples/mjktips/grid/index.html and used the bezier mesh control points, unchanged, to render this thing.

The picture includes the entirety of the source code needed to render this thing, of course, not including the libraries files. The key function is the bezierMeshSurface() module. It takes 4 bezier control point curves, and does interpolation between them.

For the math hearted, the function evaluates along the curves simultaniously (u=0:1), and at each step forms a new curves from the 4 evaluated points, and then renders that curve.

Along the way, the bezier.scad library gained a couple more new modules to help render bezier curves using arrays, and honoring all three axis.

The other picture, of the arch thing is just another set of control points calling the same Bezier Mesh function. For creating that one, I was thinking of what kind of curves I would need to make something to fit within the web of my hand. It's essentially a saddle. Saddles are good for many things, including joints between bones. So, this shows how easy they are to create with just a few curves.

At the current iteration, the library relies on the granule renderer, which is about the slowest way in the world to do things. Thus, it creates a bazillion vertices and polygons, which makes it fairly impractical for printing, although it can be done.

The next version will use faces, and thus reduce the vertex and polygon count. Then this tool will be practical. But for now, you can see pretty pictures.

UPDATE: Added a couple of pictures of a piece that I actually printed. The .stl is included. It is 3Mb! I don't know how the Thingiverse renderer will handle that. It's an interesting point to me. Perhaps for things that are generated, the .scad file is a better transport mechanism than .stl. Since OpenScad is available everywhere, it's just one step away from 'uncompressing' a design from the .scad to the .stl.

]]>This thing uses the current version of the Granule rendering system being developed in OpenScad, and renders one of the well known samples from OpenGL called "bezmesh".

I found an article here: opengl.org/resources/code/samples/mjktips/grid/index.html and used the bezier mesh control points, unchanged, to render this thing.

The picture includes the entirety of the source code needed to render this thing, of course, not including the libraries files. The key function is the bezierMeshSurface() module. It takes 4 bezier control point curves, and does interpolation between them.

For the math hearted, the function evaluates along the curves simultaniously (u=0:1), and at each step forms a new curves from the 4 evaluated points, and then renders that curve.

Along the way, the bezier.scad library gained a couple more new modules to help render bezier curves using arrays, and honoring all three axis.

The other picture, of the arch thing is just another set of control points calling the same Bezier Mesh function. For creating that one, I was thinking of what kind of curves I would need to make something to fit within the web of my hand. It's essentially a saddle. Saddles are good for many things, including joints between bones. So, this shows how easy they are to create with just a few curves.

At the current iteration, the library relies on the granule renderer, which is about the slowest way in the world to do things. Thus, it creates a bazillion vertices and polygons, which makes it fairly impractical for printing, although it can be done.

The next version will use faces, and thus reduce the vertex and polygon count. Then this tool will be practical. But for now, you can see pretty pictures.

UPDATE: Added a couple of pictures of a piece that I actually printed. The .stl is included. It is 3Mb! I don't know how the Thingiverse renderer will handle that. It's an interesting point to me. Perhaps for things that are generated, the .scad file is a better transport mechanism than .stl. Since OpenScad is available everywhere, it's just one step away from 'uncompressing' a design from the .scad to the .stl.

Hearts placed around a plain bracelet

]]>The question is, what good are Bezier curves?

This thing is constructed from Bezier curves. It is actually inspired from some Processing code. It demonstrates how easy it is to translate from some graphics system that has Bezier support, to using the new Bezier functions within OpenScad.

The Processing code came from here: local-guru.net/blog/2010/09/19/pulsating-heart-made-from-bezier-curves-in-processing

There are many heart things on Thingiverse as evidenced by this: thingiverse.com/tag:Heart

So, add one more to the list. Of course, this one is fully parametric, even in a math sense, so you can easily change the size, shape, height, whatever.

And, on top of that, it's a simple example of how you can use the Bezier function to construct something simple.

]]>This thing is constructed from Bezier curves. It is actually inspired from some Processing code. It demonstrates how easy it is to translate from some graphics system that has Bezier support, to using the new Bezier functions within OpenScad.

The Processing code came from here: local-guru.net/blog/2010/09/19/pulsating-heart-made-from-bezier-curves-in-processing

There are many heart things on Thingiverse as evidenced by this: thingiverse.com/tag:Heart

So, add one more to the list. Of course, this one is fully parametric, even in a math sense, so you can easily change the size, shape, height, whatever.

And, on top of that, it's a simple example of how you can use the Bezier function to construct something simple.

Now that I have a Bezier tool: thingiverse.com/thing:8454 Everything looks like it needs some swoopy smooth lines on it.

This thing is an experimental variant of the effector tool base for the PolyBot.

One of the things I was after was being able to print without too much warping. The previous design has a lot of surface area in contact with the platform, so it tends to warp.

I think this one might work out well enough, but it needs some mounting holes. It is somewhat parametric. You can choose how long the arms are, and the size of the axle mounts. It is a bit hacky though.

]]>This thing is an experimental variant of the effector tool base for the PolyBot.

One of the things I was after was being able to print without too much warping. The previous design has a lot of surface area in contact with the platform, so it tends to warp.

I think this one might work out well enough, but it needs some mounting holes. It is somewhat parametric. You can choose how long the arms are, and the size of the axle mounts. It is a bit hacky though.

Perhaps it's bad form to create a derivative of your own thing when it's just a code update rather than an actual 'thing' but...

This thing incorporates a couple more changes to the Bezier functions. First, it adds a 3 element version of the PointOnBezCubic() function. So, there's now 2D and 3D. The 3D version can be used for x,y,z values, or for r,g,b values, as demonstrated in the pictures.

Speaking of pictures, I've added an example of how to use color with the bezier curve to give your images that groovy ramped color goodness. I expect to do very bad things with this.

Some more factoring and commenting of the code should make it fairly easy to understand.

But, all that goodness was added so that I could actually create BezierStrips! Just think of it. You give the function two sets of control points (4 points each), and it will generate an extruded strip that is 'in between' the two curves. Curve1 is on 'top' and Curve2 is on 'bottom', but actually it doesn't matter what their orientation is.

This is really great for creating things like handles for cups, or funky looking springy feet, or vert ramps for skateboard parks.

Just more Bezier goodness.

One of the pictures shows a bell shaped thing. that's just a Bezier strip rotated around the z-axis an appropriate number of times. Can be used to make very interesting other shapes no doubt.

And who knew OpenScad was able to render things so nicely!

UPDATE: If you're interested in more words on this design, you can take a look here: williamaadams.wordpress.com/2011/05/12/mr-bezier-goes-to-openscad/

]]>This thing incorporates a couple more changes to the Bezier functions. First, it adds a 3 element version of the PointOnBezCubic() function. So, there's now 2D and 3D. The 3D version can be used for x,y,z values, or for r,g,b values, as demonstrated in the pictures.

Speaking of pictures, I've added an example of how to use color with the bezier curve to give your images that groovy ramped color goodness. I expect to do very bad things with this.

Some more factoring and commenting of the code should make it fairly easy to understand.

But, all that goodness was added so that I could actually create BezierStrips! Just think of it. You give the function two sets of control points (4 points each), and it will generate an extruded strip that is 'in between' the two curves. Curve1 is on 'top' and Curve2 is on 'bottom', but actually it doesn't matter what their orientation is.

This is really great for creating things like handles for cups, or funky looking springy feet, or vert ramps for skateboard parks.

Just more Bezier goodness.

One of the pictures shows a bell shaped thing. that's just a Bezier strip rotated around the z-axis an appropriate number of times. Can be used to make very interesting other shapes no doubt.

And who knew OpenScad was able to render things so nicely!

UPDATE: If you're interested in more words on this design, you can take a look here: williamaadams.wordpress.com/2011/05/12/mr-bezier-goes-to-openscad/

After playing around with fillets on this thing: thingiverse.com/thing:8416 I was determined to create a generalized Bezier function for usage in OpenScad.

This thing, or rather the OpenScad file, is public domain code for creating Bezier curves within OpenScad.

It is a foundational piece. It will only create Bezier curves defined by 4 control points. Those are typically the most useful in hand constructed graphics as found in OpenScad.

Hopefully this little piece of goodness will enable people to create very curvacious things in OpenScad. Extending the function to 3D can be easily done.

UPDATE: Added a couple more pictures that show different ways of using the beast. Perhaps the coolest is using a Bezier curve to change color over the surface of the object.

]]>This thing, or rather the OpenScad file, is public domain code for creating Bezier curves within OpenScad.

It is a foundational piece. It will only create Bezier curves defined by 4 control points. Those are typically the most useful in hand constructed graphics as found in OpenScad.

Hopefully this little piece of goodness will enable people to create very curvacious things in OpenScad. Extending the function to 3D can be easily done.

UPDATE: Added a couple more pictures that show different ways of using the beast. Perhaps the coolest is using a Bezier curve to change color over the surface of the object.