chiark / gitweb /
poster-tube-lid: wip BayonetCutout rotation thing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Oct 2017 01:17:06 +0000 (02:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Oct 2017 01:17:06 +0000 (02:17 +0100)
poster-tube-lid.scad

index a30a1b4901c883c250805c7ebf8c74a3757708e7..b2c659016ac37c325d6f26b19b3a233094062bff 100644 (file)
@@ -27,6 +27,8 @@ bayo_above_gap = 1.0;
 
 bayo_entry = bayo_behind/3;
 
+bayo_slice_size = 10;
+
 // calculated
 
 bayo_entry_x = bayo_entry;
@@ -110,15 +112,35 @@ module MainProfile(){
           ]);
 }
 
+module BayonetCutoutSlice(offset){
+  rotate([0,0, atan2(offset, main_dia/2) ]){
+    intersection(){
+      translate([-offset, -10, 0])
+       rotate([90,0,0])
+       linear_extrude(height= main_dia*2)
+       polygon(bayo_polygon);
+      translate([0,0, -25])
+       cylinder(h=50, r= main_dia/2 + rivet_tall);
+      #translate([0,0, -25])
+       linear_extrude(height= 50)
+       polygon([ [ 0,0 ],
+                 [ -bayo_slice_size, -main_dia ],
+                 [ +bayo_slice_size, -main_dia ] ]);
+    }
+  }
+}
+
 module BayonetCutout(){
-  offset = 5;
-  intersection(){
-    translate([offset, -10, 0])
-      rotate([90,0,0])
-      linear_extrude(height= main_dia*2)
-      polygon(bayo_polygon);
-    translate([0,0, -25])
-      cylinder(h=50, r= main_dia/2 + rivet_tall);
+  offs = [ for (i=[-5 : +5]) i ] * bayo_slice_size;
+  echo (offs);
+*    BayonetCutoutSlice(5);
+  for (off =offs
+        
+        //[ -20 : bayo_slice_size : 20 ]
+       ){
+    translate([ off * 5, 0,0 ])
+    echo(off);
+    BayonetCutoutSlice(off);
   }
 }