chiark / gitweb /
anglepoise-neck: arm square face not hexagon
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Jun 2013 21:40:46 +0000 (22:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Jun 2013 21:40:46 +0000 (22:40 +0100)
anglepoise-neck.scad

index ffa6873..fc07ecd 100644 (file)
@@ -12,6 +12,7 @@ armpart_main_thick = 8;
 hingepin_dia = 3;
 hingenut_width = 6;
 hingenut_depth = 4;
+hingenut_clear = 5;
 
 headpart_main_dia = 15 - 0.3;
 headpart_main_len = 14;
@@ -22,6 +23,9 @@ headpart_flatten_angle = 45;
 
 // computed
 
+armpart_hinge_height = arm_innerheight + hingenut_width/2 + hingenut_clear;
+armpart_main_height = armpart_hinge_height + headpart_stub_width / 2;
+armpart_main_width = headpart_stub_width;
 armpart_x_unit = armpart_hex_rad * tan(30);
 headpart_flatten_z = headpart_main_dia/2 * cos(headpart_flatten_angle);
 headpart_stub_support_x = headpart_stub_width * cos(59) / 2;
@@ -38,19 +42,13 @@ module ArmPart(){ ////toplevel
     translate([0, -arm_pin_depth, -50])
       cylinder(r=arm_pin_dia/2, h=100);
   }
-  rotate([90,0,180])
-    linear_extrude(height=armpart_main_thick)
-    for (mir=[0,1])
-      mirror([mir,0,0])
-       difference(){
-         polygon([[-1, 0],
-                  [armpart_x_unit, 0],
-                  [armpart_x_unit*2, armpart_hex_rad],
-                  [armpart_x_unit, armpart_hex_rad*2],
-                  [-1, armpart_hex_rad*2]]);
-         translate([0,armpart_hex_rad])
-           circle(hingepin_dia/2, $fn=20);
-        }
+  difference(){
+    translate([-armpart_main_width/2, 0, 0])
+      cube([armpart_main_width, armpart_main_thick, armpart_main_height]);
+    translate([0,50,armpart_hinge_height])
+      rotate([90,0,0])
+      cylinder(r=hingepin_dia/2, h=100, $fn=20);
+  }
 }
 
 module HeadPart(){ ////toplevel