X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=poster-tube-lid.scad;h=3c60f532ab71708e5b3099b198d7d0785db3509a;hb=026c8b76cdfd7d3f8f6feb70ec71177fde3b3354;hp=a32c8f739a87085c478736b30e2a289f839188d5;hpb=7d517d0416ed12dd6d01951c1a360fd81314c8c8;p=reprap-play.git diff --git a/poster-tube-lid.scad b/poster-tube-lid.scad index a32c8f7..3c60f53 100644 --- a/poster-tube-lid.scad +++ b/poster-tube-lid.scad @@ -10,7 +10,7 @@ rivet_thick = 1.67; rivet_width = 4.15 + 1.0; rivet_tall = 5.51 + 0.49; -over_rivet_gap = 1.0; +over_rivet_wall = 0.5; side_rivet_gap = 1.5; bayo_interf = 0.75; @@ -27,6 +27,11 @@ bayo_above_gap = 1.0; bayo_entry = bayo_behind/3; +bayo_slice_size = 1; + +brace_hole_width = 1.0; +brace_above_below = 1.2; + // calculated bayo_entry_x = bayo_entry; @@ -35,18 +40,18 @@ bayo_inramp_x = bayo_entry; bayo_inramp_z = bayo_entry; side_height = rivet_posn + bayo_behind + rivet_thick/2; -side_thick = rivet_tall + over_rivet_gap; +side_thick = rivet_tall + over_rivet_wall; top_z = top_thick + seal_thick; bayo_entry = bayo_behind / 3.0; -bayo_top_z = bayo_behind + rivet_thick + over_rivet_gap; +bayo_top_z = bayo_behind + rivet_thick + bayo_above_gap; bayo_entry_ramp = bayo_entry + bayo_interf; rivet_entry_width = rivet_width + side_rivet_gap; $fs=0.5; -$fa=5; +$fa=1; // bayonet definition @@ -58,7 +63,7 @@ bayo_l = bayo_m + bayo_interf * [ 1/bayo_interf_slope, 1 ]; bayo_k = bayo_l + [ bayo_interf_width, 0 ]; bayo_j = bayo_k + bayo_interf * [ 1/bayo_interf_slope, -1 ]; bayo_i = bayo_j + [ rivet_width, 0 ]; -bayo_h = [ bayo_i[0], bayo_behind + rivet_thick + over_rivet_gap ]; +bayo_h = [ bayo_i[0], bayo_behind + rivet_thick + bayo_above_gap ]; bayo_g = [ bayo_m[0] - rivet_width, bayo_h[1] ]; bayo_e = [-bayo_p[0], bayo_p[1]] - [rivet_entry_width,0]; @@ -110,8 +115,40 @@ module MainProfile(){ ]); } +module RotateProjectSlice(offset, slice_size, nom_rad, real_rad){ + // nom_rad > real_rad + rotate([0,0, atan2(offset, nom_rad) ]){ + intersection(){ + translate([-offset, -10, 0]) + rotate([90,0,0]) + linear_extrude(height= nom_rad*2) + children(0); + translate([0,0, -25]) + cylinder(h=50, r= real_rad); + translate([0,0, -25]) + linear_extrude(height= 50) + polygon([ [ 0,0 ], + [ -slice_size, -real_rad*2 ], + [ +slice_size, -real_rad*2 ] ]); + } + } +} + +module RotateProject(x_min, x_max, slice_size, nom_rad, real_rad){ + offs = [ for (i=[ x_min : + slice_size : + x_max + slice_size ]) i ]; + echo (offs); + for (off=offs) + RotateProjectSlice(off, slice_size, nom_rad, real_rad) + children(0); +} + module BayonetCutout(){ - polygon(bayo_polygon); + RotateProject(bayo_c[0], bayo_i[0], bayo_slice_size, + main_dia/2 + side_thick, + main_dia/2 + rivet_tall) + polygon(bayo_polygon); } module ProfilesDemo(){ @@ -119,5 +156,30 @@ module ProfilesDemo(){ polygon(bayo_polygon); } +module Cover(){ + difference(){ + union(){ + rotate_extrude() + translate([main_dia/2, 0]) + MainProfile(); + translate([0,0, seal_thick]) + cylinder(h= top_thick, r = main_dia/2); + } + for (r=[0,180]) + rotate([0,0, r]) + translate([0,0, -side_height]) + BayonetCutout(); + for (r=[0 : 60 : 179]) { + rotate([0,0, r]) { + height = top_thick - brace_above_below*2; + translate([0,0, seal_thick + brace_above_below + height/2 ]) + cube(center=true, [ main_dia, brace_hole_width, height ]); + } + } + } +} + //ProfilesDemo(); -BayonetCutout(); +//BayonetCutout(); +//MainProfile(); +Cover();