Aaltoblock

// 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");
									 }
					 }
}
This article is issued from Appropedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.