chiark / gitweb /
fairphone-case: add DemoLeft and DemoSelectAdhocLeftRight
[reprap-play.git] / cable-splice-clamp.scad
index fab44d483f7aa8af13f9367bc53469f4fce7655c..f71c848756b259723e6fcb078acf912114ec9a5f 100644 (file)
@@ -2,7 +2,7 @@
 
 include <commitid.scad>
 
-rnom = 7.5 / 2;
+rnom = 3.5 / 2;
 
 // alpha is slope angle, which is half of inner concave angle that
 //  wire sits in
@@ -13,9 +13,15 @@ alpha = 40; // degrees
 mu = 1/4;
 
 // wall thickness, and base width as fraction of cable size
-wall_r = 1.5 / 6.5;
+wall_r = 2.5 / 6.5;
 base_r = 0.75;
 
+total_len = 60;
+
+strap_width = 3.0 + 0.5;
+
+strap_count = 4;
+
 // for cross-section calculations:
 //
 // origin O is at intersection of straight line segments forming walls
@@ -54,16 +60,14 @@ y_B_r = -dy_OB_r;
 x_T_r =         sina;
 y_T_r = -tana * sina;
 
-top_r = wall_r - (d_OC_r - 1);
-
 wall_x_r = wall_r / tan(90-alpha);
 
-top = top_r * r1;
+top = wall_r * r1 - (d_OC_r - 1) * r0;
 basew = base_r * rnom;
 
 echo("dias", r0*2, r1*2, "ratio",r1/r0);
 
-module CrossSection(plus=0) {
+module CrossSectionHalf(plus=0) {
   difference(){
     polygon([[-0.1,                                y_T_r * r0],
             [x_T_r * r0,                          y_T_r * r0],
@@ -76,6 +80,13 @@ module CrossSection(plus=0) {
   }
 }
 
+module CrossSection(plus=0) {
+  for (m=[0,1]) {
+    mirror([m,0])
+      CrossSectionHalf(plus);
+  }
+}
+
 module CrossSectionDemo(){ ////toplevel
   color("black") CrossSection(2);
   CrossSection();
@@ -85,11 +96,6 @@ module CrossSectionDemo(){ ////toplevel
   }
 }
 
-strap_width = 4 + 0.5;
-total_len = 70;
-
-strap_count = 2;
-
 strap_wall_h = 1.5;
 strap_wall_l = 2.0;
 
@@ -121,6 +127,12 @@ module HalfClamp(){ ////toplevel
   }
 }
 
+module HalfClampPrint(){ ////toplevel
+  rotate([180,0,0])
+    HalfClamp();
+}
+
 //CrossSection();
 //CrossSectionDemo();
-HalfClamp();
+//HalfClamp();
+HalfClampPrint();