Create mounting point for arduino
This commit is contained in:
parent
0271921948
commit
9e3c82db6e
1 changed files with 52 additions and 38 deletions
|
@ -37,6 +37,8 @@ module screw_port() {
|
||||||
$fn = 25
|
$fn = 25
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Measure screw size, as these holes might be too big. Note that they apparently end up slightly smaller anyway, due to openscad's rendering apparent - but this probably won't be enough.
|
||||||
color("mediumpurple") translate([0, 0, wall_thickness + 0.1]) cylinder(
|
color("mediumpurple") translate([0, 0, wall_thickness + 0.1]) cylinder(
|
||||||
h = screw_length,
|
h = screw_length,
|
||||||
d = screw_diameter,
|
d = screw_diameter,
|
||||||
|
@ -45,24 +47,7 @@ module screw_port() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Box
|
// Corner generation
|
||||||
// -------------------------------------------
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
color("green") cube(box_outside);
|
|
||||||
|
|
||||||
translate([wall_thickness, wall_thickness, wall_thickness]) {
|
|
||||||
cube(box_inside);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Screw holes
|
|
||||||
// -------------------------------------------
|
|
||||||
|
|
||||||
translate([0, 0, 200]) screw_port();
|
|
||||||
|
|
||||||
// Corners
|
|
||||||
// -------------------------------------------
|
|
||||||
corner_piece_size = screw_diameter + (wall_thickness * 2);
|
corner_piece_size = screw_diameter + (wall_thickness * 2);
|
||||||
module corner_piece() {
|
module corner_piece() {
|
||||||
color("red") difference() {
|
color("red") difference() {
|
||||||
|
@ -77,25 +62,54 @@ module corner_piece() {
|
||||||
box_inside[2] - screw_length + 0.1
|
box_inside[2] - screw_length + 0.1
|
||||||
]) cylinder(h = screw_length, d = screw_diameter, $fn = 25);
|
]) cylinder(h = screw_length, d = screw_diameter, $fn = 25);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Box
|
||||||
|
// -------------------------------------------
|
||||||
|
|
||||||
|
union() {
|
||||||
|
difference() {
|
||||||
|
cube(box_outside);
|
||||||
|
|
||||||
|
translate([wall_thickness, wall_thickness, wall_thickness]) {
|
||||||
|
cube(box_inside);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Screw holes
|
||||||
|
// -------------------------------------------
|
||||||
|
|
||||||
|
// Arduino
|
||||||
|
translate([53.4+8, 60, wall_thickness]) rotate([0, 0, 90]) {
|
||||||
|
screw_port(); // Top left
|
||||||
|
translate([50.8, 15.2]) screw_port();
|
||||||
|
translate([50.8, 43.1]) screw_port();
|
||||||
|
translate([-1.3, 48.2]) screw_port();
|
||||||
|
|
||||||
|
% translate([-15.3, -2, screw_length + wall_thickness]) square([68.6, 53.4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Corners
|
||||||
|
// -------------------------------------------
|
||||||
|
|
||||||
translate([
|
translate([
|
||||||
wall_thickness,
|
wall_thickness,
|
||||||
wall_thickness,
|
wall_thickness,
|
||||||
wall_thickness
|
wall_thickness - 0.1
|
||||||
]) corner_piece();
|
]) corner_piece();
|
||||||
translate([
|
translate([
|
||||||
wall_thickness + box_inside[0] - corner_piece_size,
|
wall_thickness + box_inside[0] - corner_piece_size,
|
||||||
wall_thickness,
|
wall_thickness,
|
||||||
wall_thickness
|
wall_thickness - 0.1
|
||||||
]) corner_piece();
|
]) corner_piece();
|
||||||
translate([
|
translate([
|
||||||
wall_thickness,
|
wall_thickness,
|
||||||
wall_thickness + box_inside[1] - corner_piece_size,
|
wall_thickness + box_inside[1] - corner_piece_size,
|
||||||
wall_thickness
|
wall_thickness - 0.1
|
||||||
]) corner_piece();
|
]) corner_piece();
|
||||||
translate([
|
translate([
|
||||||
wall_thickness + box_inside[0] - corner_piece_size,
|
wall_thickness + box_inside[0] - corner_piece_size,
|
||||||
wall_thickness + box_inside[1] - corner_piece_size,
|
wall_thickness + box_inside[1] - corner_piece_size,
|
||||||
wall_thickness
|
wall_thickness - 0.1
|
||||||
]) corner_piece();
|
]) corner_piece();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue