chiark / gitweb /
mudguard-bracket: retainer wrong circle
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Feb 2024 11:31:42 +0000 (11:31 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Feb 2024 11:31:42 +0000 (11:31 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
mudguard-bracket.scad

index 14360eecd70f9dc3220bac9ae47d15d0e1a273b8..ab9b425d9160f034612e2e48917197bfe7b6ef2b 100644 (file)
@@ -52,6 +52,7 @@ wing_top_ea_x = -tubeswidth_top/2 - wings_main_th/2;
 retainer_ea_x = wing_top_ea_x + wings_main_th/2 + retainer_x_gap;
 retainer_z_ctr = retainer_z - retainer_radius;
 retainer_void_w = -retainer_ea_x*2 - retainer_th*2;;
+retainer_tab = wings_height - beam_th;
 
 tube_angle = atan2((tubeswidth_bot - tubeswidth_top)/2, tubeswidth_dz);
 
@@ -202,21 +203,29 @@ module Bracket(){ ////toplevel
 }
 
 module Retainer(){ ////toplevel
-  linextr(0, retainer_th) {
-    difference(){
-      union(){
-       rectfromto([ -retainer_ea_x, retainer_z_ctr ],
-                  [ +retainer_ea_x, bracket_top_z + retainer_adjust/2 ]);
-       // TODO make it round at bottom
+  difference(){
+    union(){
+      linextr(0, retainer_th) {
+       difference(){
+         union(){
+           rectfromto([ -retainer_ea_x, retainer_z_ctr ],
+                      [ +retainer_ea_x, bracket_top_z + retainer_adjust/2 ]);
+           // TODO make it round at bottom
+         }
+         translate([ 0, screw_hole_z ])
+           Oval( screw_dia/2, retainer_adjust );
+         rectfromto([ -retainer_void_w/2, retainer_z + retainer_th ],
+                    [ +retainer_void_w/2, 
+                      screw_hole_z - retainer_adjust/2 ]);
+       }
       }
-      translate([ 0, screw_hole_z ])
-       Oval( screw_dia/2, retainer_adjust );
-      translate([ 0, retainer_z_ctr ])
-       circle(r = retainer_radius);
-      rectfromto([ -retainer_void_w/2, retainer_z + retainer_th ],
-                 [ +retainer_void_w/2, 
-                  screw_hole_z - retainer_adjust/2 ]);
+      linextr(0, retainer_tab)
+       translate([ 0, retainer_z_ctr ])
+       circle(r = retainer_radius + retainer_th);
     }
+    linextr(-1, retainer_tab+1)
+      translate([ 0, retainer_z_ctr ])
+      circle(r = retainer_radius);
   }
 }