$fn=30;
// Add function to move to a "room"
// Find a way to store maps outside so we can make a better editor than this.
module litt(x, y, z, r){ // Type 1
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8)
union(){
translate([-8, 6, -1]) cube([16, 2, 1]);
translate([-1, -15, -1]) cube([2, 30, 1]);
}}} // Ports NS
module barr(x, y, z, r){ // Type 2
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8)
translate([-1, -15, -1]) cube([2, 30, 1]);
}} // Ports NS
module bart(x, y, z, r){ // Type 3
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8) union(){
translate([-1, -15, -1]) cube([2, 30, 1]);
translate([-15, -1, -1]) cube([30, 2, 1]);
}}} // Ports NSEW
module nerl(x, y, z, r){ // Type 4
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8) union(){
translate([-1, -1, -1]) cube([16, 2, 1]);
translate([-1, -1, -1]) cube([2, 16, 1]);
}}} // Ports NE
module npla(x, y, z, r){ // Type 5
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8) union(){
translate([-1, -1, -1]) cube([2, 15, 1]);
translate([-8, -8, -1]) cube([16, 12, 1]);
}}} // Ports N
module npld(x, y, z, r){ // Type 6
translate([x*30,y*30,z*30]) rotate([0, 0, r]) {
difference(){
translate([-15,-15,-15]) cube(30);
sphere(20);
}
color("gray", 0.8) difference() {
union(){
translate([-1, -1, -1]) cube([2, 15, 1]);
translate([-8, -8, -1]) cube([16, 12, 1]);}
rotate([180, 0, 0]) roof() square(5, center=true);
}}} // Ports N
litt(0, 1, 0, 0);
barr(0, 0, 0, 0);
bart(0, -1, 0, 0);
barr(0, 0, -1, 90);
nerl(0, 2, 0, 180);
nerl(1, -1, 0, 180);
npla(1, 0, 0, 270);
npld(1, 1, 0, 270);