From 7f16518c5c8a971322594ebe01400c13347fbfa8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 24 Feb 2024 11:31:42 +0000 Subject: [PATCH] mudguard-bracket: retainer wrong circle Signed-off-by: Ian Jackson --- mudguard-bracket.scad | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/mudguard-bracket.scad b/mudguard-bracket.scad index 14360ee..ab9b425 100644 --- a/mudguard-bracket.scad +++ b/mudguard-bracket.scad @@ -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); } } -- 2.30.2