Makes a loft through specified sections. This can be a computationally intensive operation with complex shapes and large number of sections.

Difference between loft and pipe: Pipe requires a spine. Loft does not.

Syntax, options)


Name Type Description
sections Array Array of wires to pass the loft through.
options Object See below for options.
options = {

    solid,  //default true, if false, a shell is returned
    ruled,  //default false, if true, loft sections are connected by lines. Set to false for smoother surface
    precision: 0.000001 


Solid or Shell


// A very simple example of a loft using two circular wires

function build() {

    //define first profile 
    var edge =
        {x:0.0, y:0, z:0.0}, //center
        {x:0.0, y:1.0, z:0.0}, //normal
        10 //radius

    //second profile shifted on the X and Y axis
	var edge2 =
        {x:10.0, y:10, z:0.0}, //center
        {x:0.0, y:1.0, z:0.0}, //normal
        10 //radius
    //Supply two profiles for lofting
	var s = [cadlib.wire([edge]), cadlib.wire([edge2]) ]);

    //return the solid
    return s;