NAME

CAD::OpenSCAD::Loft - A module to generate lofted shapes for CAD::OpenSCAD

loftSolid

A solid created from lofts between 2 faces.

$loft->loftSolid($name,$face1,$face2)

if $name is undefined returns a hashref {points=>$points,faces=>$faces} Otherwise inserts a polyhedron named $name in the openSCAD objects items list

helix

spheroid

Returns a shere shaped polyhedron based on lofted regular polygons

$loft->spheroid($name,$sides,$radius);
$loft->spheroid($name,{sides=>$sides,radius->$radius});

if $name is undefined returns a hashref {points=>$points,faces=>$faces} Otherwise inserts a polyhedron named $name in the openSCAD objects items list

regularPolygon

Returns a regular polygon given sides and bounding circle radius

$loft->regularPolygon($sides,$radius);
$loft->regularPolygon({sides=>$sides,radius->$radius});

star

Returns a polygon given points, internal and external radii

$loft->star($points,$extRadius,$intRadius);
$loft->star({points=>$points,extRadius=>$extRadius,intRadius=>$intRadius});

loftShell

This basic funstion cteates a shell of the loft bewteen two profiles The end profile faces are not included, so a hollow shell is produced, allowing joining of multiple shells. an index is passed to indicate the position of the points of the vertices of the faces to be lofted between.

profilePlane

maps a profile (a 2D shape) onto a x,y,or z plane,

conoid

reverseFaces

arc

Makes an arc

loftPath

Given a path and a profile, sweeps the profile along that path e.g.

	my $scad=new OpenSCAD;
	my $loft= new  CAD::OpenSCAD::Loft(scad=>$scad);

	# create profile to loft as a set of points;
	my $profile=$loft->regularPolygon(undef,10,3);

	# Create a path
	my $path=[];
    foreach (0..360){
	  next if $_ % 5;
	  my $t=$math->deg2rad($_);
	  push @$path,[(sin($t)+2*sin(2*$t))*10,
	             (cos($t)-2*cos(2*$t))*10,
	             -sin(3*$t)*10] ;          
    }
    
    # loft profile along path 
	$loft->loftPath("pathFollow",$profile,$path);		

	$scad->build("pathFollow")
		 ->save("test");