Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.

Aaltoblock

From Appropedia
Jump to: navigation, search
Aalto.png This page was part of an Aalto University course 3D Printing of Open Source Hardware for Science

Please leave comments using the discussion tab. The course runs in the Fall semester 2017. It is not open edit.


Note!
This Aalto logo is in violation of the visual design guidelines (however much that is checked, or anybody cares...). Find a more official looking one here instead


// AaltoBlock.scad - Basic usage of text() and linear_extrude() // size of the letters

s=25;

// letters you want to type in a block go in ()

LetterBlock("A!");

// Module definition. // size=30 defines an optional parameter with a default value.

module LetterBlock(letter, size=s) {
   difference() {
       translate([0,0,size/8]) cube([size,size,size/4], center=true);
       translate([0,0,size/8]) {
           // convexity or preview to deal with concave letters
           linear_extrude(height=size, convexity=4)
               text(letter, 
                    size=size*22/30,
                    font="Bitstream Vera Sans",
                    halign="center",
                    valign="center");
                               }
               }
}