X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=poster-tube-lid.scad;h=08127cde3bd7f137113fe1c0e384a143b9e21f1a;hp=c4892cd368b4bb583a16f9a8a0013dc59de632e8;hb=HEAD;hpb=ca044a9801bccfd3025b75c51ba55047ed86887d diff --git a/poster-tube-lid.scad b/poster-tube-lid.scad index c4892cd..000dec7 100644 --- a/poster-tube-lid.scad +++ b/poster-tube-lid.scad @@ -1,8 +1,23 @@ // -*- C -*- +// Print, for each end: +// +// CoverPrint +// StrapMount +// CatchAssembly +// +// For attaching tube to wall, with base, for storing sticks etc. +// +// WallMount goes near top +// WallMountForBase goes at bottom +// WallMountBase attaches to bottom, glue some neoprene to it +// WallMountBaseCutJig jig for cutting neoprene + include +include coarse = false; +enable_head_cups = false; main_dia = 71.2 + 0.50 - 2.26; top_thick_middle = 4; @@ -23,7 +38,7 @@ side_rivet_gap = 1.5; inside_rivet_gap = 1.5; bayo_interf = 0.30; -bayo_behind = 3.5; +bayo_behind = 8.5; bayo_interf_width = 2.0; bayo_interf_slope = 0.5; @@ -42,7 +57,8 @@ side_taper = 1.0; bayo_gap = 6.0; -bayo_entry = bayo_behind/3; +bayo_entry = 1.167; +bayo_inramp = 0.9; bayo_slice_size = coarse ? 5 : 1; @@ -55,17 +71,17 @@ jig_hole_dia = 3.0; jig_rim = 5; jig_mark = 5; -strap_hoop_thick = 6; -strap_hoop_inside = 10; -strap_hoop_strlen = 10; -strap_hoop_elevation = 45; +strap_loop_thick = 6; +strap_loop_inside = 10; +strap_loop_strlen = 10; +strap_loop_elevation = 45; sm_inner_circum = 218 - 1.90 - 1.00 - 0.50; sm_main_thick = 2.0; sm_main_width = 20; sm_bolt_dia = 3.5 + 0.1; -sm_bolt_shaft = 21.9; +sm_bolt_shaft = 21.0; sm_bolt_head_dia = 6.94 + 1.0; sm_bolt_head_thick = 2.14; sm_bolt_nut_width = 5.89 + 0.25; @@ -77,8 +93,38 @@ sm_bolt_y_over = 0.5; sm_closure_cnr = 3.0; +wm_thick = 5; +wm_screw_dia = 4.5; // Timco wood screw 40mm, use brown plug +wm_screwdriver_dia = 6.3 + 1.5; +wm_screw_around = 5.0; +wm_screw_slot = 3.5; +wm_screw_head = 8.0; + +wmb_screw_dia = 5; +wmb_screw_head_dia = 8.7 + 0.5; +wmb_screw_around_x = 4; +wmb_screw_around_z = 6; +wmb_screw_depth_min = 10; +web_screw_len = 16 + 0.5; +wmb_nut_across = 7.82 + 0.35; +wmb_nut_around_min = 2; +wmb_nut_behind_min = 5; +wmb_nut_th = 3.84 + 0.75; +wmb_mount_wall = 4.5; +wmb_mount_gap_xy = 0.1; +wmb_mount_gap_z = 0.2; +wmb_mount_y_width = 10; +wmb_bottom_gap = 35; // includes allowance for padding, etc. +wmb_bottom_th = 7; +wmb_bottom_th_min = 1; +wmb_ring_gap = 1.0; +wmb_base_extra_rad = 10; +wmb_jig_th = 1; +wmb_jig_around_gap = 1; + catch_stalk_h = 4.5; catch_stalk_len = 50; +catch_tip_th = 4; catch_head_th = 3; catch_pin_slop = 0.25; // each side, and above @@ -91,7 +137,7 @@ catch_stalk_base_width = 15; catch_knob_dia = 6; catch_knob_above_gap = 5; -catch_knob_height = 5; +catch_knob_height = 3.0; catch_stalk_below_gap = 1.0; catch_stalk_beside_gap = 2.0; @@ -102,8 +148,8 @@ TAU = PI*2; bayo_entry_x = bayo_entry; bayo_entry_z = bayo_entry; -bayo_inramp_x = bayo_entry; -bayo_inramp_z = bayo_entry; +bayo_inramp_x = bayo_inramp; +bayo_inramp_z = bayo_inramp; oring_mid_dia = oring_bore + oring_thick; oring_outer_dia = oring_mid_dia + oring_thick; @@ -122,7 +168,6 @@ top_z = top_thick_by_oring + oring_y_rad + by_oring_z; middle_bot_z = top_z - top_thick_middle; -bayo_entry = bayo_behind / 3.0; bayo_top_z = bayo_behind + bayo_gap; bayo_nom_rad = main_dia/2 + side_thick; @@ -138,6 +183,57 @@ handling_angle = 45; sm_inner_rad = (sm_inner_circum + sm_bolt_tighten_allow/2) / TAU; sm_outer_rad = sm_inner_rad + sm_main_thick; +wm_main_width = sm_main_width; +wm_y_min = sqrt( pow(sm_inner_rad, 2) - + pow(sm_inner_rad - (wm_thick - sm_main_thick), 2) ); +wm_y_screw = wm_y_min + wm_screw_around + wm_screw_dia/2; +wm_y_max = wm_y_screw + wm_screw_dia/2 + wm_screw_around; +wm_lhs_y_min = -wm_y_max; +wm_y_slotc_screw = wm_y_screw + wm_screw_slot/2; +wm_y_slot1_screw = wm_y_screw + wm_screw_slot; +wm_y_slot1_max = wm_y_max + wm_screw_slot/2; +wm_z_slot0_screw = wm_main_width + wm_screwdriver_dia/2; +wm_z_slotc_screw = wm_z_slot0_screw + wm_screw_slot/2; +wm_z_slot1_screw = wm_z_slot0_screw + wm_screw_slot; +wm_z_max = wm_z_slot1_screw + wm_screw_around; + +wmb_mount_cut_rad = sm_outer_rad + wmb_ring_gap; +wmb_nut_rad = wmb_nut_across / cos(30) * 0.5; +wmb_x_screw_plus_around_r = max( + wmb_screw_around_x + wmb_screw_dia/2, + wmb_nut_around_min + wmb_nut_across/2 + ); +wmb_x_screw = -sm_outer_rad + wmb_x_screw_plus_around_r; +wmb_x_outer = -sm_outer_rad + wmb_x_screw_plus_around_r * 2; +function wmb_screw_thing_y_min(dia) = sqrt( + pow(wmb_mount_cut_rad, 2) - + pow(wmb_x_screw + dia/2, 2) + ); +wmb_y_screw_end = wmb_screw_thing_y_min(wmb_screw_dia); +wmb_y_nut_min = max( + wmb_screw_thing_y_min(wmb_nut_across + wmb_nut_around_min*2), + wm_y_slot1_max + ); +wmb_y_mount_max = max( + wmb_y_nut_min + wmb_nut_th + wmb_nut_behind_min, + wmb_y_screw_end + wmb_screw_depth_min + ); +wmb_z_screw = max( + wmb_screw_around_z + wmb_screw_dia/2, + wmb_nut_around_min + wmb_nut_rad + ); +wmb_z_max = wmb_z_screw * 2; +wmbb_y_max = max( + wmb_y_mount_max + wmb_mount_gap_xy + wmb_mount_wall, + wmb_y_screw_end + web_screw_len + ); +wmbb_x_outer = wmb_x_outer + (wmb_mount_gap_xy + wmb_mount_wall); +wmbb_z_flat_max = -wmb_bottom_gap; +wmbb_z_flat_whole_min = wmbb_z_flat_max - wmb_bottom_th_min; +wmbb_z_min = wmbb_z_flat_max - wmb_bottom_th; +wmbb_r_top = main_dia/2 + wmb_base_extra_rad; +wmbb_r_bottom = wmbb_r_top - (wmb_bottom_th - wmb_bottom_th_min); + smc_pos = [ 0, sm_inner_rad, 0 ]; smc_bolt_nut_dia = sm_bolt_nut_width / cos(30); @@ -199,8 +295,6 @@ echo(bayo_polygon); // CATCH -//cppy6 = -catch_strap_width * 2/3; - cppxC = 0.41 * sm_inner_rad * TAU; // catch pin @@ -214,6 +308,7 @@ cppb = bayo_g + [1,-1] * catch_pin_slop + [1,0] * cpp_adj; cppd = [ bayo_n[0] - catch_pin_slop - catch_pin_slop_x_extra, -catch_stalk_above_gap ]; +cppi = [ cppa[0], cppd[1] ]; cppc = [ cppd[0], cppb[1] ]; cpph = cppd + [0,-1] * catch_stalk_h; cppe = cppd + [0,-1] * (catch_knob_above_gap + catch_knob_dia/2); @@ -239,13 +334,15 @@ cppD = cppC + [0,-1] * catch_strap_width; // catch assembly stalk and so on +catch_cr3 = catch_cr + catch_stalk_h; + cppF = [ cppg[0] - catch_stalk_eff_bend_rad, cppd[1] ]; cpp4 = [ cppg[0] - catch_stalk_len, cpph[1] ] + [1,-1] * catch_cr; cpp5 = [ cpp4[0], cppC[1] + catch_cr ]; cpp2 = cpp5 + [-1,0] * (catch_cr * 2 + catch_stalk_base_width); cpp2r = cpp2 + [1,0] * catch_cr; cpp2d = cpp2 + [0,-1] * catch_cr; -cpp3 = [ cpp2[0] + catch_cr * 2, cppd[1] - catch_cr ]; +cpp3 = [ cpp2[0] + catch_cr + catch_cr3, cppd[1] - catch_cr3 ]; cppA = [ -cppxC, cpp9[1] ]; cppE = [ cppA[0], cppD[1] ]; @@ -288,28 +385,28 @@ module MainProfile(){ } } -module StrapHoopProfile(){ - circle(r = strap_hoop_thick/2); +module StrapLoopProfile(){ + circle(r = strap_loop_thick/2); } -module StrapHoop(){ ////toplevel - bigrad = strap_hoop_inside/2 + strap_hoop_thick/2; - extralen = strap_hoop_thick * 5; +module StrapLoop(){ ////toplevel + bigrad = strap_loop_inside/2 + strap_loop_thick/2; + extralen = strap_loop_thick * 5; intersection(){ - rotate([strap_hoop_elevation, 0,0]){ + rotate([strap_loop_elevation, 0,0]){ for (x= [ -1, +1 ] * bigrad) { translate([x, -extralen, 0]) rotate([-90,0,0]) - linear_extrude(height= extralen + strap_hoop_strlen + 0.1, + linear_extrude(height= extralen + strap_loop_strlen + 0.1, convexity=10) - StrapHoopProfile(); + StrapLoopProfile(); } - translate([0, strap_hoop_strlen, 0]){ + translate([0, strap_loop_strlen, 0]){ intersection(){ rotate_extrude(convexity=10) translate([bigrad, 0,0]) - StrapHoopProfile(); + StrapLoopProfile(); translate([0,50,0]) cube([100,100,100], center=true); } @@ -326,12 +423,12 @@ module RotateProjectSlice(offset, slice_size, nom_rad, real_rad){ intersection(){ translate([-offset, -10, 0]) rotate([90,0,0]) - linear_extrude(height= nom_rad*2) + linear_extrude(height= nom_rad*2, convexity=50) children(0); translate([0,0, -25]) cylinder(h=50, r= real_rad); translate([0,0, -25]) - linear_extrude(height= 50) + linear_extrude(height= 50, convexity=50) polygon([ [ 0,0 ], [ -slice_size, -real_rad*2 ], [ +slice_size, -real_rad*2 ] ]); @@ -379,7 +476,7 @@ module LimitForHandling(){ ////toplevel } } } - hull() rotate_extrude(){ + hull() rotate_extrude(convexity=10){ translate([ handling_dia/2 - main_cnr, top_z - main_cnr ]) { circle(r = main_cnr); mirror([0,1]) square([ main_cnr, 50 ]); @@ -421,16 +518,18 @@ module Cover(){ ////toplevel } } } - for (r=[0,180]) - rotate([0,0,r]) - translate([-implheadcup_large_dia * .5 - implheadcup_thick/2, - -implheadcup_large_dia * .0, - middle_bot_z + 0.1]) - ImplHeadCup(); -// translate(strap_hoop_thick * [-0.5, 0, +1]) + if (enable_head_cups) + for (r=[0,180]) + rotate([0,0,r]) + translate([-implheadcup_large_dia * .5 - implheadcup_thick/2, + -implheadcup_large_dia * .0, + middle_bot_z + 0.1]) + ImplHeadCup(); + +// translate(strap_loop_thick * [-0.5, 0, +1]) // translate([handling_dia/2, 0, -side_height]) // rotate([0,180,0]) rotate([0,0,90]) -// StrapHoop(); +// StrapLoop(); } module SavingHole(){ @@ -457,6 +556,10 @@ module Jig(){ ////toplevel } } +module CoverPrint(){ ////toplevel + rotate([0,180,0]) Cover(); +} + module CoverTest2(){ ////toplevel difference(){ Cover(); @@ -477,7 +580,7 @@ module CoverTest1(){ ////toplevel } // translate([ 50, 0, 0 ]) // cube([ 100, -// strap_hoop_inside + strap_hoop_thick*2 + 1, +// strap_loop_inside + strap_loop_thick*2 + 1, // 100 ], // center=true); } @@ -491,7 +594,7 @@ module ImplHeadCupTest(){ ////toplevel ImplHeadCup(); } -module SomeStrap(width){ +module SomeStrap(width, cut_width=0){ // children(0) is to add, (1) subtract difference(){ union(){ @@ -503,9 +606,9 @@ module SomeStrap(width){ children(0); } translate([0,0,-1]) - cylinder(r=sm_inner_rad, h=width+2); + cylinder(r=sm_inner_rad, h=max(width+2, cut_width)); translate(smc_pos) - StrapMountBolt(10, width); + StrapMountBolt(5, width); translate(smc_pos) cube([ sm_bolt_tighten_allow, 40,100 ], center=true); children(1); @@ -548,23 +651,222 @@ module StrapMountProtrusion(half_x, max_y, cnr, width){ module StrapMount(){ ////toplevel SomeStrap(sm_main_width){ rotate([0,0,180]){ - StrapMountProtrusion(strap_hoop_inside/2 + strap_hoop_thick, - strap_hoop_thick, - sm_closure_cnr); + StrapMountProtrusion(strap_loop_inside/2 + strap_loop_thick, + strap_loop_thick, + sm_closure_cnr, + sm_main_width); translate(smc_pos + [0,0, sm_main_width] + - strap_hoop_thick * [ 0, 0.5, -1.0 ]) - StrapHoop(); + strap_loop_thick * [ 0, 0.5, -1.0 ]) + StrapLoop(); } union(){ }; } } +module WallScrewHoleSlot(){ ////toplevel + ds = [-1,+1] * wm_screw_slot/2; + linextr_x_yz(-(wm_thick + 1), 1) { + hull(){ + for (d = ds) + translate([d, 0]) + circle(r = wm_screw_dia/2); + } + } + hull(){ + for (d = ds){ + translate([0, d, 0]){ + linextr_x_yz(0, 1) + circle(r = wm_screw_head/2); + linextr_x_yz(-(wm_screw_head - wm_screw_dia)/2, 0) + circle(r = wm_screw_dia/2); + } + } + } +} + +module WallMountMounts(){ + linextr(0, wm_z_max){ + translate([ -sm_outer_rad, 0 ]) + rectfromto([ 0, wm_lhs_y_min ], + [ wm_thick, wm_y_slot1_max ]); + } +} +module WallMountScrewHoles(){ + translate([ -sm_outer_rad + wm_thick, 0, wm_z_slotc_screw ]) { + translate([ 0, wm_y_slotc_screw, 0 ]) + WallScrewHoleSlot(); + translate([ 0, -wm_y_slotc_screw, 0 ]) + rotate([90,0,0]) + WallScrewHoleSlot(); + } +} + +module WallMount(){ ////toplevel + SomeStrap(sm_main_width, wm_z_max + 2){ + WallMountMounts(); + WallMountScrewHoles(); + } +} + +module WallMountBaseRingCut(){ + circle(r = wmb_mount_cut_rad); +} + +module WallMountBaseMounts(){ + linextr(0, wmb_z_max) { + difference(){ + rectfromto([ -sm_outer_rad, -wmb_y_mount_max ], + [ wmb_x_outer, +wmb_y_mount_max ]); + WallMountBaseRingCut(); + } + } +} + +// screws, nuts, slots for nuts to go down into +module WallMountBaseScrewsEtc(){ ////toplevel + for (my=[0,1]) { + mirror([0, my, 0]) { + translate([wmb_x_screw, 0, wmb_z_screw]) { + linextr_y_xz(wmb_y_screw_end, + wmb_y_screw_end + 50) + circle(r = wmb_screw_dia/2); + linextr_y_xz(wmb_y_screw_end + web_screw_len, + wmb_y_screw_end + 50) + circle(r = wmb_screw_head_dia/2); + linextr_y_xz(wmb_y_nut_min, + wmb_y_nut_min + wmb_nut_th) { + hull(){ + rotate(30) + circle(r = wmb_nut_rad, $fn = 6); + translate([0, 50]) + square(wmb_nut_across, center=true); + } + } + } + } + } +} + +module WallMountForBase(){ ////toplevel + SomeStrap(sm_main_width, wm_z_max + 2){ + union(){ + WallMountMounts(); + WallMountBaseMounts(); + } + union(){ + WallMountScrewHoles(); + WallMountBaseScrewsEtc(); + } + } +} + +module WallMountForBaseFixingsTest(){ ////toplevel + intersection(){ + WallMountForBase(); + linextr(-100,100) + rectfromto([ -sm_outer_rad-10, -wm_y_min ], + [ wmb_x_outer + 1, -100 ]); + } +} + +module WallMountBaseFixingsTest(){ ////toplevel + intersection(){ + WallMountBase(); + linextr(-2,100) + rectfromto([ -sm_outer_rad-10, -wm_y_min ], + [ wmbb_x_outer + 1, -100 ]); + } +} + +module WallMountBasePillarsPlan(){ + for (my = [0,1]) { + mirror([0, my]) { + rectfromto([ -sm_outer_rad, wmbb_y_max - wmb_mount_y_width ], + [ wmbb_x_outer, wmbb_y_max ]); + } + } +} + +// trim parts that are would foul the wall +module WallMountTrimWallFoulPlan(){ + translate([ -sm_outer_rad, 0]) + rectfromto([ -wmbb_r_top, -(wmbb_r_top + 1) ], + [ 0, +(wmbb_r_top + 1) ]); +} + +module WallMountBase(){ ////toplevel + difference(){ + union(){ + // vertical blocks rising to join to wall mount + linextr(wmbb_z_min, wmb_z_max) { + difference(){ + WallMountBasePillarsPlan(); + WallMountBaseRingCut(); + } + } + + hull(){ + linextr(wmbb_z_flat_whole_min, wmbb_z_flat_max) + circle(r = wmbb_r_top); + linextr(wmbb_z_min, wmbb_z_flat_max) + circle(r = wmbb_r_bottom); + } + linextr(wmbb_z_min, wmbb_z_flat_max) { + hull(){ + WallMountBasePillarsPlan(); + circle(r = wmbb_r_bottom); + } + } + } + + // cutaway for mount part + linextr(-wmb_mount_gap_z, wmb_z_max+1) { + for (my = [0,1]) { + mirror([0, my]) + rectfromto([ -sm_outer_rad-1, wmb_y_mount_max + wmb_mount_gap_xy ], + [ wmb_x_outer + wmb_mount_gap_xy, 1 ]); + } + } + + linextr(wmbb_z_min - 1, wmb_z_max + 1) + WallMountTrimWallFoulPlan(); + WallMountBaseScrewsEtc(); + } +} + +module WallMountBaseCutJigPlan(){ ////toplevel + difference(){ + union(){ + circle(r = wmbb_r_top); + } + + translate([ wmb_jig_around_gap, 0 ]) + WallMountTrimWallFoulPlan(); + + offset(delta = wmb_jig_around_gap) + WallMountBasePillarsPlan(); + } +} + +module WallMountBaseCutJig(){ ////toplevel + translate([ 0,0, wmbb_z_flat_max + 0.5 ]) + linextr(0, wmb_jig_th) + WallMountBaseCutJigPlan(); +} + +module WallMountForBaseDemo(){ ////toplevel + render() WallMountForBase(); + color("blue") render() WallMountBase(); + %WallMountBaseScrewsEtc(); + %WallMountBaseCutJig(); +} + module CatchAssemblyCoreProfile(){ difference(){ union(){ hull(){ - translate(cpp3) circle(r= catch_cr); + translate(cpp3) circle(r= catch_cr3); polygon([ cpp3, cpp2r, cpp5, @@ -609,23 +911,27 @@ module CatchAssemblyCoreProfile(){ ]); } -module CatchHeadProfile(){ +module CatchTipProfile(dy){ + ddy = [0,dy]; intersection(){ translate(cppF){ difference(){ - circle(r = dist2d(cppF, cppd)); +// circle(r = dist2d(cppF, cppd)); //circle(r = dist2d(cppF, cppa)); } } polygon([ cppa, - cppg, - cpph, - cppd, + cppi + ddy, + cppd + ddy, cppc, cppb ]); } +} + +module CatchHeadProfile(){ polygon([ cppd, - cppg, + cppd, + cppi, cppf, cppe, cpph ]); @@ -636,6 +942,13 @@ module CatchCore(){ /////toplevel linear_extrude(height=catch_strap_thick, convexity=10) CatchAssemblyCoreProfile(); + hull(){ + linear_extrude(height=catch_head_th, convexity=10) + CatchTipProfile(0); + linear_extrude(height=catch_tip_th, convexity=10) + CatchTipProfile(catch_tip_th - catch_head_th); + } + linear_extrude(height=catch_head_th, convexity=10) CatchHeadProfile(); @@ -697,16 +1010,29 @@ module CatchDemoS(){ /////toplevel } module CatchPinProfileDemo(){ /////toplevel - echo("G ", - cpp2[0] - cpp1[0], - bayo_n[0] - bayo_e[0]); - color("blue") translate([0,0, - +1, - ]) { - CatchAssemblyCoreProfile(); - CatchHeadProfile(); - } - polygon(bayo_polygon, convexity=10); + translate([0, 0 * -bayo_behind,0]) { + echo("G ", + bayo_n[0] - bayo_e[0]); + color("blue") translate([0,0, + +1, + ]) { + CatchAssemblyCoreProfile(); + CatchHeadProfile(); + } + translate([0,0,10]) + color("red") + CatchTipProfile(0); + + polygon(bayo_polygon, convexity=10); + + // adhoc show a position + color("purple") + translate(concat( + cppa, + 10 + )) difference(){ circle(2.5); circle(2.0); } + + } } //ProfilesDemo();