239 lines
12 KiB
OpenSCAD
239 lines
12 KiB
OpenSCAD
|
|
include <../../config.scad>;
|
|
use <./door_support_beam.scad>;
|
|
use <./glove_gasket_holes.scad>;
|
|
use <../common/metric_bolt_functions.scad>;
|
|
use <../common/metric_countersunk_head_bolt.scad>;
|
|
use <../common/washer.scad>;
|
|
|
|
module glovebox_door() {
|
|
union() {
|
|
difference() {
|
|
union() {
|
|
/*
|
|
difference() {
|
|
// clear panel
|
|
// color("white", 0.4)
|
|
color("black")
|
|
translate([0, -R_EXTERNAL[2] / 2, -T_HDPE_SHEET / 2]) cube([R_EXTERNAL[0], R_EXTERNAL[2], T_HDPE_SHEET], center = true);
|
|
for (index_side = [0 : 1 : 1]) {
|
|
mirror([index_side, 0, 0]) {
|
|
translate([
|
|
OFFSET_GLOVE_HOLE_CENTRES_X / 2
|
|
, -R_EXTERNAL[2] * 3 / 4
|
|
, -T_HDPE_SHEET / 2
|
|
]){
|
|
// Glove holes
|
|
cylinder(T_HDPE_SHEET, D_GLOVE_HOLE / 2, D_GLOVE_HOLE / 2, center = true);
|
|
// Gasket fastener holes
|
|
glove_gasket_holes();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
*/
|
|
color("white", 0.4) import("./glovebox_door_panel_only.stl");
|
|
// gasket
|
|
color("black") translate([
|
|
0
|
|
, -R_EXTERNAL[2] / 2
|
|
, -(T_HDPE_SHEET + T_GASKET_RUBBER / 2)
|
|
])
|
|
import("./door_gasket.stl");
|
|
// Glove gasket
|
|
color("black") for (index_side = [0 : 1 : 1]) {
|
|
mirror([index_side, 0, 0]) {
|
|
translate([
|
|
OFFSET_GLOVE_HOLE_CENTRES_X / 2
|
|
, -R_EXTERNAL[2] * 3 / 4
|
|
, -T_HDPE_SHEET - T_GASKET_RUBBER / 2
|
|
])
|
|
import("./glove_gasket.stl");
|
|
}
|
|
}
|
|
/*
|
|
// Glove holding peg - CAN JUST INVERT THE GLOVES
|
|
translate([0, -100, -100 / 2]) cylinder(100, 12, 12, center = true);
|
|
*/
|
|
// Support beams
|
|
color("darkgrey") {
|
|
// Top
|
|
/*
|
|
translate([
|
|
D_DOOR_SUPPORT_BEAM / 2
|
|
, -D_DOOR_SUPPORT_BEAM
|
|
, W_DOOR_SUPPORT_BEAM / 2
|
|
]) rotate([0, 90, 0])
|
|
*/
|
|
translate([
|
|
0
|
|
, -D_DOOR_SUPPORT_BEAM
|
|
, T_DOOR_SUPPORT_BEAM
|
|
]) rotate([0, 90, 180]) rotate([0, 0, 180])
|
|
door_support_beam(R_EXTERNAL[0] - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) * 2);
|
|
// import("./door_support_beam_on_x.stl");
|
|
// Bottom
|
|
/*
|
|
translate([
|
|
-D_DOOR_SUPPORT_BEAM / 2
|
|
, -R_EXTERNAL[2] + D_DOOR_SUPPORT_BEAM
|
|
, W_DOOR_SUPPORT_BEAM / 2
|
|
]) rotate([0, 90, 180])
|
|
*/
|
|
translate([
|
|
0
|
|
, -R_EXTERNAL[2] - T_DOOR_SUPPORT_BEAM
|
|
, T_DOOR_SUPPORT_BEAM
|
|
]) rotate([0, 90, 0])
|
|
door_support_beam(R_EXTERNAL[0] - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) * 2);
|
|
// import("./door_support_beam_on_x.stl");
|
|
// Left
|
|
/*
|
|
translate([
|
|
-(R_EXTERNAL[0] / 2 - W_DOOR_SUPPORT_BEAM / 2)
|
|
, -(R_EXTERNAL[2] - D_DOOR_SUPPORT_BEAM) / 2
|
|
, W_DOOR_SUPPORT_BEAM / 2
|
|
]) rotate([90, -90, 0])
|
|
*/
|
|
translate([
|
|
-R_EXTERNAL[0] / 2 - T_DOOR_SUPPORT_BEAM
|
|
, -R_EXTERNAL[2] / 2
|
|
, T_DOOR_SUPPORT_BEAM
|
|
]) rotate([0, 90, -90])
|
|
door_support_beam(R_EXTERNAL[2]);
|
|
// import("./door_support_beam_on_y.stl");
|
|
// Right
|
|
/*
|
|
translate([
|
|
R_EXTERNAL[0] / 2 - W_DOOR_SUPPORT_BEAM / 2
|
|
, -R_EXTERNAL[2] / 2 - D_DOOR_SUPPORT_BEAM / 2
|
|
, W_DOOR_SUPPORT_BEAM / 2
|
|
]) rotate([90, 90, 0])
|
|
*/
|
|
translate([
|
|
R_EXTERNAL[0] / 2 + T_DOOR_SUPPORT_BEAM
|
|
, -R_EXTERNAL[2] / 2
|
|
, T_DOOR_SUPPORT_BEAM
|
|
]) rotate([0, 90, 90])
|
|
door_support_beam(R_EXTERNAL[2]);
|
|
// import("./door_support_beam_on_y.stl");
|
|
}
|
|
}
|
|
// Bolt holes
|
|
// Top
|
|
for (index_hole_on_x = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_X_TOP - 1]) {
|
|
translate([
|
|
R_EXTERNAL[0] / 2 - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[0] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_X_TOP - 1) * index_hole_on_x
|
|
, -(D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, 0
|
|
])
|
|
cylinder(W_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM * 2, SIZE_BOLT_DOOR_GASKET / 2, SIZE_BOLT_DOOR_GASKET / 2, center = true);
|
|
}
|
|
// Bottom
|
|
for (index_hole_on_x = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_X_BOTTOM - 1]) {
|
|
translate([
|
|
-(R_EXTERNAL[0] / 2 - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[0] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_X_BOTTOM - 1) * index_hole_on_x)
|
|
, -R_EXTERNAL[1] + (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, 0
|
|
])
|
|
cylinder(W_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM * 2, SIZE_BOLT_DOOR_GASKET / 2, SIZE_BOLT_DOOR_GASKET / 2, center = true);
|
|
}
|
|
for (index_hole_on_z = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1]) {
|
|
// Right
|
|
translate([
|
|
R_EXTERNAL[0] / 2 - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, -D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[1] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1) * index_hole_on_z
|
|
, 0
|
|
])
|
|
cylinder(W_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM * 2, SIZE_BOLT_DOOR_GASKET / 2, SIZE_BOLT_DOOR_GASKET / 2, center = true);
|
|
// Left
|
|
translate([
|
|
-(R_EXTERNAL[0] / 2 - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2)
|
|
, -OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[1] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1) * index_hole_on_z
|
|
, 0
|
|
])
|
|
cylinder(W_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM * 2, SIZE_BOLT_DOOR_GASKET / 2, SIZE_BOLT_DOOR_GASKET / 2, center = true);
|
|
}
|
|
}
|
|
// Bolts
|
|
// Door seal
|
|
// Top
|
|
for (index_hole_on_x = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_X_TOP - 1]) {
|
|
translate([
|
|
D_DOOR_SUPPORT_BEAM -(R_EXTERNAL[0] / 2 - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[0] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_X_TOP - 1) * index_hole_on_x)
|
|
, -(D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, 0
|
|
]) {
|
|
// Bolt and nut
|
|
translate([0, 0, LENGTH_BOLT_DOOR_GASKET / 2 - T_HDPE_SHEET - T_GASKET_RUBBER]) mirror([0, 0, 1]) metric_countersunk_head_bolt(SIZE_BOLT_DOOR_GASKET, LENGTH_BOLT_DOOR_GASKET, true, OFFSET_NUT_FROM_BOLT_END);
|
|
// Washer
|
|
translate([0, 0, T_DOOR_SUPPORT_BEAM + T_WASHER_DOOR_GASKET / 2]) washer(T_WASHER_DOOR_GASKET, D_WASHER_DOOR_GASKET, SIZE_BOLT_DOOR_GASKET, centre = true);
|
|
}
|
|
}
|
|
// Bottom
|
|
for (index_hole_on_x = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_X_BOTTOM - 1]) {
|
|
translate([
|
|
-(R_EXTERNAL[0] / 2 - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[0] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_X_BOTTOM - 1) * index_hole_on_x)
|
|
, -R_EXTERNAL[1] + (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, 0
|
|
]) {
|
|
// Bolt and nut
|
|
translate([0, 0, LENGTH_BOLT_DOOR_GASKET / 2 - T_HDPE_SHEET - T_GASKET_RUBBER]) mirror([0, 0, 1]) metric_countersunk_head_bolt(SIZE_BOLT_DOOR_GASKET, LENGTH_BOLT_DOOR_GASKET, true, OFFSET_NUT_FROM_BOLT_END);
|
|
// Washer
|
|
translate([0, 0, T_DOOR_SUPPORT_BEAM + T_WASHER_DOOR_GASKET / 2]) washer(T_WASHER_DOOR_GASKET, D_WASHER_DOOR_GASKET, SIZE_BOLT_DOOR_GASKET, centre = true);
|
|
}
|
|
}
|
|
for (index_hole_on_z = [0 : 1 : COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1]) {
|
|
// Right
|
|
translate([
|
|
R_EXTERNAL[0] / 2 - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2
|
|
, -D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[1] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1) * index_hole_on_z
|
|
, 0
|
|
]) {
|
|
// Bolt and nut
|
|
translate([0, 0, LENGTH_BOLT_DOOR_GASKET / 2 - T_HDPE_SHEET - T_GASKET_RUBBER]) mirror([0, 0, 1]) metric_countersunk_head_bolt(SIZE_BOLT_DOOR_GASKET, LENGTH_BOLT_DOOR_GASKET, true, OFFSET_NUT_FROM_BOLT_END);
|
|
// Washer
|
|
translate([0, 0, T_DOOR_SUPPORT_BEAM + T_WASHER_DOOR_GASKET / 2]) washer(T_WASHER_DOOR_GASKET, D_WASHER_DOOR_GASKET, SIZE_BOLT_DOOR_GASKET, centre = true);
|
|
}
|
|
// Left
|
|
translate([
|
|
-(R_EXTERNAL[0] / 2 - (D_DOOR_SUPPORT_BEAM - T_DOOR_SUPPORT_BEAM) / 2)
|
|
, -OFFSET_BOLTS_FROM_SEAL_END - (R_EXTERNAL[1] - D_DOOR_SUPPORT_BEAM - OFFSET_BOLTS_FROM_SEAL_END * 2) / (COUNT_BOLTS_PER_DOOR_GASKET_ON_Z - 1) * index_hole_on_z
|
|
, 0
|
|
]) {
|
|
// Bolt and nut
|
|
translate([0, 0, LENGTH_BOLT_DOOR_GASKET / 2 - T_HDPE_SHEET - T_GASKET_RUBBER]) mirror([0, 0, 1]) metric_countersunk_head_bolt(SIZE_BOLT_DOOR_GASKET, LENGTH_BOLT_DOOR_GASKET, true, OFFSET_NUT_FROM_BOLT_END);
|
|
// Washer
|
|
translate([0, 0, T_DOOR_SUPPORT_BEAM + T_WASHER_DOOR_GASKET / 2]) washer(T_WASHER_DOOR_GASKET, D_WASHER_DOOR_GASKET, SIZE_BOLT_DOOR_GASKET, centre = true);
|
|
}
|
|
}
|
|
// Glove seals
|
|
height_nut_glove_seal = get_metric_bolt_head_height(SIZE_BOLT_GLOVE);
|
|
length_bolt_glove_seal = T_GASKET_RUBBER * 2 + T_HDPE_SHEET + T_WASHER_GLOVE + height_nut_glove_seal + OFFSET_NUT_FROM_BOLT_END;
|
|
for (index_side = [0 : 1 : 1]) {
|
|
mirror([index_side, 0, 0]) {
|
|
translate([
|
|
OFFSET_GLOVE_HOLE_CENTRES_X / 2
|
|
, -R_EXTERNAL[2] * 3 / 4
|
|
, 0
|
|
]) {
|
|
for (index_hole = [0 : 1 : COUNT_BOLTS_PER_GLOVE - 1]) {
|
|
rotate([0, 0, 360 / COUNT_BOLTS_PER_GLOVE * index_hole]) translate([0, D_GLOVE_HOLE / 2 + W_DOOR_GASKET / 2, 0]) {
|
|
// Bolt and nut
|
|
translate([0, 0, length_bolt_glove_seal / 2 - T_HDPE_SHEET - T_GASKET_RUBBER * 2]) mirror([0, 0, 1]) metric_countersunk_head_bolt(SIZE_BOLT_GLOVE, length_bolt_glove_seal, true, OFFSET_NUT_FROM_BOLT_END);
|
|
// Washer
|
|
translate([0, 0, T_WASHER_GLOVE / 2]) washer(T_WASHER_GLOVE, D_WASHER_GLOVE, SIZE_BOLT_GLOVE, centre = true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// Shopping
|
|
}
|
|
|
|
$fn = 100;
|
|
// test output
|
|
glovebox_door();
|
|
// door_support_beam(R_EXTERNAL[0] - D_DOOR_SUPPORT_BEAM);
|
|
// door_support_beam(R_EXTERNAL[2] - D_DOOR_SUPPORT_BEAM); |