2022-01-08 00:33:32 +00:00
|
|
|
// All measurements are in millimeters.
|
|
|
|
|
2022-01-07 15:40:19 +00:00
|
|
|
// Dimensions
|
2022-01-08 00:33:32 +00:00
|
|
|
office_jacob_length = 2030;
|
|
|
|
office_jacob_width = 3410;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
bedroom_length = 2060;
|
|
|
|
bedroom_width = 3410;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
frame_depth = 135;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
hall_length = 2610;
|
|
|
|
hall_length_extra_office_jacob = 1240;// Hall to end of office
|
2022-01-07 15:40:19 +00:00
|
|
|
hall_length_full = hall_length + hall_length_extra_office_jacob;
|
2022-01-08 00:33:32 +00:00
|
|
|
hall_width = 975;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
livingroom_back_to_door_width = 3410;
|
|
|
|
livingroom_door_to_frame_width = 965;
|
|
|
|
livingroom_doorframe_to_kitchen_width = 2235;
|
|
|
|
livingroom_kitchen_to_front_threshold = 1480;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
|
|
|
livingroom_width = livingroom_back_to_door_width + livingroom_door_to_frame_width + frame_depth + livingroom_doorframe_to_kitchen_width + livingroom_kitchen_to_front_threshold
|
|
|
|
;
|
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
livingroom_length_kitchen = 3430;
|
|
|
|
livingroom_length_back = 2870;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
kitchen_width_bath_to_entrance = 450;
|
2022-01-07 15:40:19 +00:00
|
|
|
kitchen_width = livingroom_kitchen_to_front_threshold + kitchen_width_bath_to_entrance;
|
2022-01-08 00:33:32 +00:00
|
|
|
kitchen_length = 1620;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
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;
|
2022-01-07 15:40:19 +00:00
|
|
|
|
2022-01-08 00:33:32 +00:00
|
|
|
house_height = 2660;
|
2022-01-07 15:40:19 +00:00
|
|
|
house_width = livingroom_width;
|
|
|
|
house_length = hall_length_extra_office_jacob + hall_length + frame_depth +
|
|
|
|
livingroom_length_kitchen
|
|
|
|
;
|
|
|
|
|
|
|
|
// 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"
|
|
|
|
);
|
|
|
|
|
|
|
|
// 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]);
|
|
|
|
}
|
|
|
|
}
|