From 6b1b3d09170023b4bfa7d5609645de45805849cb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 23 Feb 2024 18:00:05 +0000 Subject: [PATCH] mudguard-bracket: wip Signed-off-by: Ian Jackson --- mudguard-bracket.scad | 45 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/mudguard-bracket.scad b/mudguard-bracket.scad index 52f654c..bded91b 100644 --- a/mudguard-bracket.scad +++ b/mudguard-bracket.scad @@ -10,11 +10,29 @@ wings_inner_th = 1; wings_main_th = 2.5; wings_cup_z = -34; +tubeswidth_top = 23.5; +tubeswidth_bot = 29; +tubeswidth_dz = 26; +tube_dia = 18; +screw_hole_z = 13; + +beamacross_h = 15; + $fs = 0.1; $fa = 3; // calculated +function tubeswidth_at_z(z) = + tubeswidth_bot + + (tubeswidth_top - tubeswidth_bot) * (z / tubeswidth_dz); + +bracket_bot_z = screw_hole_z - beamacross_h/2; +bracket_top_z = screw_hole_z + beamacross_h/2; +bracket_bot_xsz = tubeswidth_at_z(bracket_bot_z) + tube_dia * 1.5; +bracket_top_xsz = tubeswidth_at_z(bracket_top_z) + tube_dia * 1.5; + +wing_top_ea_x = -bracket_top_xsz/2 + wings_main_th/2; module AtWingCupElevation () { translate([ -wings_dist_x, wings_cup_z ]) @@ -54,17 +72,32 @@ module WingCupElevationPositive () { } module WingElevation(){ - AtWingCupElevation(){ - translate([ -(wings_inner_th + wings_main_th)/2, - wings_cup_inner/2 ]) - circle(r = wings_main_th); + hull(){ + AtWingCupElevation(){ + translate([ -(wings_inner_th + wings_main_th)/2, + wings_cup_inner/2 ]) + circle(r = wings_main_th); + } + // TODO add the other end here + } +} + +module BracketAcrossElevation(){ + hull(){ + translate([ 0, bracket_bot_z ]) + rectfromto([ -bracket_bot_xsz/2, 0 ], + [ +bracket_bot_xsz/2, 1 ]); + translate([ 0, bracket_top_z ]) + rectfromto([ -bracket_top_xsz/2, -1 ], + [ +bracket_top_xsz/2, 0 ]); } } -module WingCupElevationDemo(){ +module ElevationDemo(){ translate([0,0,2]) color("red") WingCupElevationNegative(); translate([0,0,1]) color("blue") WingElevation(); WingCupElevationPositive(); + BracketAcrossElevation(); } /*WingsElevation () { @@ -75,4 +108,4 @@ module WingCupElevationDemo(){ */ -WingCupElevationDemo(); +ElevationDemo(); -- 2.30.2