162 lines
3.6 KiB
OpenSCAD
162 lines
3.6 KiB
OpenSCAD
// Includes
|
|
include <door.scad>
|
|
|
|
// All measurements are in millimeters.
|
|
|
|
// Dimensions
|
|
office_jacob_length = 2030;
|
|
office_jacob_width = 3410;
|
|
|
|
bedroom_length = 2060;
|
|
bedroom_width = 3410;
|
|
|
|
frame_depth = 135;
|
|
|
|
hall_length = 2610;
|
|
hall_length_extra_office_jacob = 1240;// Hall to end of office
|
|
hall_length_full = hall_length + hall_length_extra_office_jacob;
|
|
hall_width = 975;
|
|
|
|
livingroom_back_to_door_width = 3410;
|
|
livingroom_door_to_frame_width = 965;
|
|
livingroom_doorframe_to_kitchen_width = 2235;
|
|
livingroom_kitchen_to_front_threshold = 1480;
|
|
|
|
livingroom_width = livingroom_back_to_door_width + livingroom_door_to_frame_width + frame_depth + livingroom_doorframe_to_kitchen_width + livingroom_kitchen_to_front_threshold
|
|
;
|
|
|
|
livingroom_length_kitchen = 3430;
|
|
livingroom_length_back = 2870;
|
|
|
|
kitchen_width_bath_to_entrance = 450;
|
|
kitchen_width = livingroom_kitchen_to_front_threshold + kitchen_width_bath_to_entrance;
|
|
kitchen_length = 1620;
|
|
|
|
hall_to_bathroom_length = 870 + hall_length_extra_office_jacob;
|
|
bathroom_length = 1460 + frame_depth;
|
|
bathroom_width = 1580; //house_width - office_jacob_width - hall_width - kitchen_width;
|
|
|
|
house_height = 2660;
|
|
house_width = livingroom_width;
|
|
house_length = hall_length_extra_office_jacob + hall_length + frame_depth +
|
|
livingroom_length_kitchen
|
|
;
|
|
|
|
eri_room_width = 2450;
|
|
|
|
// End Dimensions
|
|
|
|
// Global floor
|
|
cube([house_width, house_length, 1]);
|
|
|
|
// Jacob office
|
|
rectangle(
|
|
[
|
|
house_width - office_jacob_width,
|
|
house_length - office_jacob_length,
|
|
1
|
|
],
|
|
[
|
|
office_jacob_width,
|
|
office_jacob_length,
|
|
house_height
|
|
],
|
|
"lightblue"
|
|
);
|
|
|
|
// Bedroom
|
|
rectangle(
|
|
[
|
|
house_width - bedroom_width,
|
|
house_length - frame_depth - office_jacob_length - frame_depth - bedroom_length,
|
|
1
|
|
],
|
|
[
|
|
bedroom_width,
|
|
bedroom_length,
|
|
house_height
|
|
],
|
|
"lightgrey"
|
|
);
|
|
|
|
// Hallway
|
|
rectangle(
|
|
[
|
|
house_width - bedroom_width - frame_depth - hall_width,
|
|
house_length - hall_length_full,
|
|
1
|
|
],
|
|
[
|
|
hall_width,
|
|
hall_length,
|
|
house_height
|
|
],
|
|
"pink"
|
|
);
|
|
|
|
// Living room
|
|
rectangle(
|
|
[
|
|
house_width - livingroom_width,
|
|
house_length - office_jacob_length - bedroom_length - livingroom_length_back - frame_depth - frame_depth - frame_depth,
|
|
1
|
|
],
|
|
[
|
|
livingroom_width,
|
|
livingroom_length_back,
|
|
house_height
|
|
],
|
|
"orange"
|
|
);
|
|
|
|
translate([house_width - eri_room_width, frame_depth / 2, 0]) cube([5, livingroom_length_back, house_height]);
|
|
|
|
// Bathroom
|
|
rectangle(
|
|
[
|
|
house_width - office_jacob_width - frame_depth - hall_width - frame_depth - bathroom_width,
|
|
house_length - hall_to_bathroom_length - bathroom_length - frame_depth,
|
|
1
|
|
],
|
|
[
|
|
bathroom_width,
|
|
bathroom_length,
|
|
house_height
|
|
],
|
|
"purple"
|
|
);
|
|
|
|
// Kitchen
|
|
rectangle(
|
|
[
|
|
house_width - (livingroom_back_to_door_width + livingroom_door_to_frame_width + livingroom_doorframe_to_kitchen_width) - frame_depth - kitchen_width + kitchen_width_bath_to_entrance,
|
|
house_length - hall_length_full,
|
|
1
|
|
],
|
|
[
|
|
kitchen_width,
|
|
kitchen_length,
|
|
house_height
|
|
],
|
|
"red"
|
|
)
|
|
|
|
echo("House length =", house_length, ", width = ", house_width);
|
|
echo("Living diff length =", house_length - office_jacob_length - bedroom_length - livingroom_length_back);
|
|
echo(office_jacob_length, bedroom_length, livingroom_length_back);
|
|
|
|
module rectangle(start = [0, 0, 0], dimensions = [0, 0, 0], color)
|
|
{
|
|
dx = dimensions[0];
|
|
dy = dimensions[1];
|
|
dz = dimensions[2];
|
|
|
|
translate(start) color(color) //cube([dx, dy, dz]);
|
|
difference() {
|
|
cube([dx, dy, dz]);
|
|
translate([1,1,1]) cube([dx-2, dy-2, dz]);
|
|
}
|
|
}
|
|
|
|
color("white") door();
|