Skip to content

Instantly share code, notes, and snippets.

@Holger-Will
Created September 14, 2018 03:58
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 Holger-Will/ec6ead8d6c11567f021ff703534e2ebc to your computer and use it in GitHub Desktop.
Save Holger-Will/ec6ead8d6c11567f021ff703534e2ebc to your computer and use it in GitHub Desktop.
wall
module wall(width,height,windows,doors){
difference(){
color("white") cube([width,20,height]);
for(w=windows){
color("white") translate([w[2],-10,w[3]]) cube([w[0],40,w[1]]);
}
}
for(w=windows){
translate([w[2],-10,w[3]]) window(w[0],w[1]);
}
}
module window(width,height){
color("brown") translate([0,5,-4]) cube([width,30,5]);
color("brown") translate([0,5,height-1]) cube([width,30,5]);
color("brown") translate([0,5,0]) cube([5,30,height]);
color("brown") translate([width-5,5,0]) cube([5,30,height]);
}
translate([0,-1940,0]) color("beige") cube([2400,1940,5]);
wl=[for(i=[0:18])[80,130,80+120*i,80]];
wall(2400,270,wl);
wl2=[for(i=[0:18])[80,230,80+120*i,20]];translate([0,-470,0]) wall(2400,270,wl2);
translate([20,-470,0]) rotate([0,0,90]) wall(470,270,[[80,130,100,80],[80,130,290,80]]);
translate([2400,-470,0]) rotate([0,0,90]) wall(470,270,[]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment