From: Ian Jackson Date: Tue, 4 Oct 2016 20:16:17 +0000 (+0100) Subject: bike-stalk-led-mount: wip X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=d9ea5bab0b84b92ead552dfc1f9c7c007213ad7e bike-stalk-led-mount: wip --- diff --git a/bike-stalk-led-mount.scad b/bike-stalk-led-mount.scad new file mode 100644 index 0000000..43d2ade --- /dev/null +++ b/bike-stalk-led-mount.scad @@ -0,0 +1,56 @@ +// -*- C -*- + +stalk_dia = 6.4 + 0.25; + +length = 50; +width = 12; + +strap_below = 2; +strap_thick = 2; +strap_width = 5; +strap_above = 0.25; + +arch_above = 2; + +inside_gap = 0.5; + +// calculated + +height_base = stalk_dia/2 - inside_gap/2; +above_height = height_base + arch_above; +below_height = height_base + max(arch_above, + strap_below + strap_thick + strap_above); + +module StalkCutout(){ + translate([-length,0,0]) + rotate([0,90,0]) + cylinder(r= stalk_dia/2, h=length*2, $fn=40); +} + +module SomeBlockBase(height){ + translate([0,0, height/2 + inside_gap/2]) + cube([length, width, height], center=true); +} + +module BlockAbove(){ + difference(){ + SomeBlockBase(above_height); + StalkCutout(); + } +} + +module BlockBelow(){ + difference(){ + SomeBlockBase(below_height); + StalkCutout(); + translate([0,0, inside_gap/2 + strap_above + stalk_dia/2 + strap_thick/2]) + cube([strap_width, width*2, strap_thick], center=true); + } +} + +module Demo(){ + BlockAbove(); + rotate([180,0,0]) BlockBelow(); +} + +Demo();