Skip to content

Instantly share code, notes, and snippets.

@massimomusante
Last active December 14, 2015 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save massimomusante/5021054 to your computer and use it in GitHub Desktop.
Save massimomusante/5021054 to your computer and use it in GitHub Desktop.
Some OpenSCAD examples
translate([-375,-375,-250])
{
cube([750,750,25]);
translate([0,0,525])
cube([750,750,25]);
translate([0,0,240])
cube([750,750,25]);
module tvstand(width, height, depth, thickness)
{
backthickness = 5;
backcolor = [.4,.3,.2];
hole=height/8;
translate([-width/2,-depth/2,-height/2])
{
cube([width,depth,thickness]);
translate([0,0,height-thickness])
cube([width,depth,thickness]);
translate([0,0,thickness])
cube([thickness,depth,height-(thickness*2)]);
translate([width-thickness,0,thickness])
cube([thickness,depth,height-(thickness*2)]);
translate([thickness,0,(height-(thickness*2))/2])
cube([width-(thickness*2),depth,thickness]);
difference()
{
translate([0,depth,0])
color(backcolor)
cube([width,backthickness,height]);
translate([width/2,depth+hole/2,height/4])
rotate([90,0,0])
cylinder(hole,hole,hole);
translate([width/2,depth+hole/2,height-height/4])
rotate([90,0,0])
cylinder(hole,hole,hole);
}
}
}
tvstand(750,525,750,25);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment