Skip to content

Latest commit

 

History

History

Readme.md

Examples

Tutorial car

image

Subroutine to draw a pieChart. Although not labelled, note that the actual .scadfile generated contains the labels as comments

my $EnergyUtilisation={Electricity=>4000,Gas=>5100,Petrol=>1000,Coal=>2300};
pieChart($EnergyUtilisation)

image

image

Subroutine to create text in a circle

image

Subroutine to create a box that can folded from a flat shape

image

Subroutine to create involute gears

image

Animation using SCAD and Perl

OpenSCAD Uses $t to handle animations. The best way to pass these is using single quotes, for example: -

$scad->polygon("outline",$gear->{points})
	  ->linear_extrude("gear","outline","10")
	  ->color("gear","red")
	  ->rotate("gear",[0,0,'$t*360'])

image

An extra module Loft.pm allows the creation of lofts betweeen two faces. This can be used to create complex polyhedrons, resulting in an object that renders much quicker than hull.

image

This used a scadItem object, that keeps the parameters of a shape in a perl object rather than a string. This means that the parameters can be changed, modifying the object in Perl before transformation in the build process into the appropriate script.

image

This demonstrates loft along path (version 0.17)

image