Skip to content

Instantly share code, notes, and snippets.

@maxistar
Created August 20, 2024 17:23
Show Gist options
  • Save maxistar/12790d87a31e91e4d73589808549f0ea to your computer and use it in GitHub Desktop.
Save maxistar/12790d87a31e91e4d73589808549f0ea to your computer and use it in GitHub Desktop.
The Mezzanine
// see this https://maxistar.ru/blog/%D0%90%D0%BD%D1%82%D1%80%D0%B5%D1%81%D0%BE%D0%BB%D1%8C%D0%BA%D0%B0/
plate_thickness_16 = 1.6;
plate_thickness_19 = 1.9;
plate_minimal_width = 20;
// Hallway dimensions
hallway_width = 93; // cm
hallway_height = 300; // cm (Assumed height, you can adjust this)
hallway_depth = 400; // cm (Assumed depth, you can adjust this)
// Mezzanine dimensions
mezzanine_height = 40; // cm
mezzanine_depth = 50; // cm (Depth of the mezzanine platform)
mezzanine_thickness = plate_thickness_16; // cm (Thickness of the mezzanine platform)
support_thickness = 5; // cm (Thickness of the supports)
room_height = 250;
wall_width = 10;
hallway_left = 200;
// TODO specify offsets
// TODO create smaller parts
// TODO specify minimal width of plate, thiknes, holes for face, airdampfers
// draw corners
// create inner shelves
// draw rand
// Create hallway walls
module hallway() {
door_height = 200;
door_width = 100;
door_offset = 10;
some_offset = 2;
color(c=[0.7,0.7,0.7,0.5]) {
// right wall
difference() {
translate([-wall_width, -wall_width,0])
cube([wall_width, hallway_left + wall_width, room_height + wall_width]);
translate([- wall_width - wall_width / 2, door_offset, - some_offset])
cube([wall_width * 2 , door_width , door_height + some_offset]);
}
// left wall
translate([hallway_width,-wall_width,0])
cube([wall_width, hallway_left + wall_width, room_height + wall_width]);
// ceiling
translate([0,-wall_width,room_height])
cube([hallway_width, hallway_left + wall_width , wall_width]);
// back wall
translate([0,-wall_width,0])
cube([hallway_width, wall_width , room_height]);
}
//difference() {
// cube([hallway_width, hallway_depth, hallway_height]);
// Create a void inside to represent the empty space of the hallway
// translate([5, 5, 0])
// cube([hallway_width-10, hallway_depth-10, hallway_height]);
//}
}
// Create mezzanine platform
module mezzanine_platform() {
holders_thickness = plate_thickness_16;
holders_height = 7;
side_thickness = plate_thickness_16;
side_width = plate_minimal_width;
top_thickness = plate_thickness_16;
top_width = plate_minimal_width;
//p_s_offset = 15;
//p_d_offset = 3;
//p_depth = 2;
// top part
//difference() {
translate([0, mezzanine_depth - top_width, room_height - top_thickness])
cube([hallway_width, top_width, top_thickness]);
// translate([p_s_offset,mezzanine_depth - p_d_offset,room_height - top_thickness - 4 + p_depth])
// cylinder (h = 4, r=1.6, $fn=100);
//translate([hallway_width-p_s_offset,mezzanine_depth - p_d_offset,room_height - top_thickness - 4 + p_depth])
// cylinder (h = 4, r=1.6, $fn=100);
//}
// right holder
translate([0, 0, room_height - mezzanine_height + mezzanine_thickness])
cube([holders_thickness, mezzanine_depth - side_width, holders_height]);
// left holder
translate([hallway_width - holders_thickness, 0, room_height - mezzanine_height + mezzanine_thickness])
cube([holders_thickness, mezzanine_depth - side_width, holders_height]);
// right side plate
translate([0, mezzanine_depth - side_width, room_height - mezzanine_height + holders_thickness])
cube([side_thickness, side_width, mezzanine_height - holders_thickness - top_thickness]);
// left side plate
translate([hallway_width - holders_thickness, mezzanine_depth - side_width, room_height - mezzanine_height + holders_thickness])
cube([side_thickness, side_width, mezzanine_height - holders_thickness - top_thickness]);
// bottom plate
translate([0, 0, room_height - mezzanine_height])
cube([hallway_width, mezzanine_depth, mezzanine_thickness]);
}
// mezzanine_face
module mezzanine_face() {
face_thickness = plate_thickness_16;
// face side
color(c=[1.0,1.0,1.0,1.0]) {
translate([0, mezzanine_depth, room_height - mezzanine_height])
cube([hallway_width, face_thickness, mezzanine_height]);
}
}
hallway();
mezzanine_platform();
// mezzanine_face();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment