X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=sprinkler-spike-receptacle.scad;h=57a33c778b45e920b9b5d314c522ac641844e420;hb=e0bd09412f7e4fc105057e17d8be7efaeb9d97e8;hp=09d596f9fd2139a467fffdb63ffc421a1c62f4d8;hpb=a5311d45a12b1ab433e478424f766c00079bcd0c;p=reprap-play.git diff --git a/sprinkler-spike-receptacle.scad b/sprinkler-spike-receptacle.scad index 09d596f..57a33c7 100644 --- a/sprinkler-spike-receptacle.scad +++ b/sprinkler-spike-receptacle.scad @@ -2,17 +2,28 @@ main_height = 95; -spike_top_width = 21.04; +spike_web_thick = 2.52 + 0.75; + +spike_top_width = 21.04 + 1.5; spike_botpos_height = 9.5; -spike_botpos_width = 11.68; +spike_botpos_width = 11.68 + 0.00; topwall_width = 1.5; +mount_dist = 20; +mount_width = 10; +mount_height = 5; +mount_hole_dia = 4.5; +mount_head_dia = 7.5; +mount_hole_th = 2.5; + // calculated main_width = spike_top_width + topwall_width*2; +pos_web_thick = spike_web_thick + topwall_width*2; + module NegativePlan(){ x4z = (spike_top_width - spike_botpos_width) / @@ -32,12 +43,74 @@ module NegativePlan(){ [-x0, -5]]); } +module SomeMidRounding(sq_size, z_extra) { + translate([0,0,-z_extra]) + linear_extrude(height= main_height + z_extra*2) + rotate(45) + square( sq_size, center=true ); +} + +module PositiveMidRounding(){ + SomeMidRounding(pos_web_thick*2, 0); +} + +module NegativeMidRounding(){ + SomeMidRounding(spike_web_thick*2.5, 5); +} + module PositivePlan(){ w = main_width; translate([ -w/2, 0 ]) square([ w, main_height ]); } +module MultiplySolidifyPlan(th){ + for (r=[0,90]) { + rotate([0,0,r]) + rotate([90,0,0]) + translate([0,0,-th/2]) + linear_extrude(height=th) + children(0); + } +} + +module MultiplyForMount(){ + for (r=[0:90:270]) + rotate([0,0,r]) + children(0); +} + +module Mount(){ + translate([ -1, + -mount_width/2, + 0 ]) + cube([ mount_dist + mount_width/2 + 1, + mount_width, + mount_height ]); +} + +module MountHole(){ + translate([ mount_dist, 0,0 ]) { + translate([0,0, -1]) + cylinder(r= mount_hole_dia/2, h= 20, $fn=20); + translate([0,0, mount_hole_th]) + cylinder(r = mount_head_dia/2, h=20, $fn=20); + } +} + +module Main(){ + difference(){ + union(){ + MultiplySolidifyPlan(pos_web_thick) PositivePlan(); + PositiveMidRounding(); + MultiplyForMount() Mount(); + } + MultiplySolidifyPlan(spike_web_thick) NegativePlan(); + NegativeMidRounding(); + MultiplyForMount() MountHole(); + } +} + module PlanTest(){ linear_extrude(height=2.0){ difference(){ @@ -58,4 +131,24 @@ module PlanTest(){ } } -PlanTest(); +module MainFitTest(){ + for (top = [0,1]) { + translate([ top * (mount_dist*2 + mount_width), 0,0 ]){ + intersection(){ + translate([0, 0, (-main_height + 0.5) * top]) + Main(); + translate([-50,-50,0]) + cube([100,100,0.5]); + } + } + } +} + +module Tests(){ + translate([-mount_dist*3, 0,0]) + PlanTest(); + MainFitTest(); +} + +//Tests(); +Main();