OpenSCAD Conic Bezier Curve

by donb May 30, 2011
Download All Files

Thing Apps Enabled

Please Login to Comment

Here's a modified version of your module that will create a solid shape with a Bezier curve profile:

module bezier_solid( p0, p1, p2, steps = 5 ) {
    stepsize1 = (p1-p0)/steps;
    stepsize2 = (p2-p1)/steps;

    rotate_extrude() {
        for (i=[0:steps-1]) {
            point1 = p0+stepsize1*i;
            point2 = p1+stepsize2*i;
            point3 = p0+stepsize1*(i+1);
            point4 = p1+stepsize2*(i+1);
            bpoint1 = point1+(point2-point1)*(i/steps);
            bpoint2 = point3+(point4-point3)*((i+1)/steps);
                   [0, bpoint1[1]],
                   [0, bpoint2[1]]

Exactlly right!

I had actually added the 3 point Beziers to my latest mesh/surface library, but didn't advertise. Rotation around any axis would be a very good thing. This combined with some surface normal goodness and you've got the makings of a killer new feature which I'm sure will be much used. Think of ho
w easy it is to create a vase of almost any shape!

lol redundancy. which one is your latest library? there are so many....