aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena of Valhalla'' Grandi <valhalla@trueelena.org>2015-03-30 10:46:39 +0200
committerElena of Valhalla'' Grandi <valhalla@trueelena.org>2015-03-30 10:46:39 +0200
commit7bd1d6c069bfe92a73367984930e8d7333793513 (patch)
treeea35a46de0d98d9b46cd2eeb96c8e5b66a2893d4
parent232549f172b5d80ae9267b8f002dab1eb059b869 (diff)
Improved position for screw holes
-rw-r--r--parts/shelf_support_below.scad42
1 files changed, 20 insertions, 22 deletions
diff --git a/parts/shelf_support_below.scad b/parts/shelf_support_below.scad
index ed7a791..022751d 100644
--- a/parts/shelf_support_below.scad
+++ b/parts/shelf_support_below.scad
@@ -6,6 +6,13 @@ screw_radius = 1.5;
screw_head_radius = 2.5;
screw_head_h = 2;
+screw_hole_pos = [
+ [screw_radius+wall, -screw_radius-wall, 0],
+ [radius*2+wall-screw_radius, -screw_radius-wall, 0],
+ [radius*2+wall-screw_radius, len+screw_radius+wall, 0],
+ [screw_radius+wall, len+screw_radius+wall, 0],
+];
+
module screw_hole() {
union() {
translate([0, 0, -1])cylinder(r=screw_radius, h=wall+2);
@@ -16,32 +23,23 @@ module screw_hole() {
difference() {
union() {
- translate([wall, 0, 0])
- cube([len-wall*2, (radius+wall)*2, radius+wall]);
+ cube([(radius+wall)*2, len, radius+wall]);
hull() {
- translate([screw_radius+wall, -screw_radius-wall, 0])
- cylinder(r=screw_radius+wall, h=wall);
- translate([len-screw_radius-wall, radius*2+wall*3+screw_radius, 0])
- cylinder(r=screw_radius+wall, h=wall);
+ translate(screw_hole_pos[0]) cylinder(r=screw_radius+wall, h=wall);
+ translate(screw_hole_pos[2]) cylinder(r=screw_radius+wall, h=wall);
}
hull() {
- translate([screw_radius+wall, radius*2+wall*3+screw_radius, 0])
- cylinder(r=screw_radius+wall, h=wall);
- translate([len-screw_radius-wall, -screw_radius-wall, 0])
- cylinder(r=screw_radius+wall, h=wall);
+ translate(screw_hole_pos[1]) cylinder(r=screw_radius+wall, h=wall);
+ translate(screw_hole_pos[3]) cylinder(r=screw_radius+wall, h=wall);
}
translate([screw_radius+wall, -screw_radius-wall, 0])
- cube([len-(screw_radius+wall)*2, screw_radius+wall, wall]);
- translate([screw_radius+wall, (radius+wall)*2, 0])
- cube([len-(screw_radius+wall)*2, screw_radius+wall, wall]);
+ cube([(radius-screw_radius)*2, screw_radius+wall, wall]);
+ translate([screw_radius+wall, len, 0])
+ cube([(radius-screw_radius)*2, screw_radius+wall, wall]);
+ }
+ translate([radius+wall, -1, radius+wall])
+ rotate([-90, 0, 0]) cylinder(r=radius, h=len+2);
+ for (i = [0:3]) {
+ translate(screw_hole_pos[i]) screw_hole();
}
- translate([-1, radius+wall, radius+wall]) rotate([0, 90, 0]) cylinder(r=radius, h=len+2);
- translate([screw_radius+wall, -screw_radius-wall, 0])
- screw_hole();
- translate([len-screw_radius-wall, radius*2+wall*3+screw_radius, 0])
- screw_hole();
- translate([screw_radius+wall, radius*2+wall*3+screw_radius, 0])
- screw_hole();
- translate([len-screw_radius-wall, -screw_radius-wall, 0])
- screw_hole();
}