X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=pattress-boxes-3-cover.scad;h=70a17494d73129c38e5b10eaa148d53e15ab74e6;hp=2799a3eccdee0e2a3dcc31e445b52dff655dadd1;hb=d3ba28f16ad064f6dc7967418075ed28ed19df92;hpb=3f425268628f2ce485b255d4d48544b55ca12d83 diff --git a/pattress-boxes-3-cover.scad b/pattress-boxes-3-cover.scad index 2799a3e..70a1749 100644 --- a/pattress-boxes-3-cover.scad +++ b/pattress-boxes-3-cover.scad @@ -34,6 +34,7 @@ peg_outer_slop = 0.1; peg_slope = 1; lid_side_slop = 0.5; +lid_rail_behindslop = 0.5; // computed @@ -43,18 +44,21 @@ lid_inner_min_h = lid_fatbox_overlap + lid_fatbox_switches_h; lid_inner_kink = [thinbox_len, thinbox_len*2]; -lid_inner_w = patbox_side + lid_side_slop; +lid_inner_w_nom = patbox_side; +lid_inner_w = lid_inner_w_nom + lid_side_slop * 2; -lid_rail_w = (lid_inner_w - lid_max_switches_w)/2 - lid_switches_y_slop; +lid_seatline_w = (lid_inner_w - lid_max_switches_w)/2 - lid_switches_y_slop; -lid_rail_h = lid_fatbox_switches_h; +lid_seatline_h = lid_fatbox_switches_h; -echo(lid_rail_w); +echo(lid_seatline_w); peg_main_height = peg_straight_len + (peg_max_dia - peg_main_dia)/2/peg_slope; echo(peg_main_height); +thinbox_front_z = lid_fatbox_switches_h + lid_fatbox_h - lid_thinbox_h; + module LidSideProfile(){ polygon([[-lid_top_wall, lid_inner_max_h], [lid_inner_kink[0], lid_inner_max_h], @@ -64,6 +68,19 @@ module LidSideProfile(){ [-lid_top_wall, -lid_front_wall]]); } +module RailProfile(){ + yt_base = thinbox_front_z; + yt = yt_base - lid_rail_behindslop; + pegx = (lid_inner_w - patbox_centres)/2; + + polygon([[-0.1, yt], + [pegx - peg_main_dia/2, yt], + [pegx - peg_main_dia/2, yt_base - peg_straight_len], + [-0.1, + yt_base - peg_straight_len - (pegx - peg_main_dia/2)/peg_slope + -0.1]]); +} + module LidSide(){ overlap = [0.1, 0.1, 0.1]; @@ -72,9 +89,9 @@ module LidSide(){ linear_extrude(height= lid_side_wall) LidSideProfile(); - // rail + // seatline translate(-overlap) - cube(overlap + [total_len, lid_rail_w, lid_rail_h]); + cube(overlap + [total_len, lid_seatline_w, lid_seatline_h]); // lid front translate([-0.1, -0.1, -lid_front_wall]) @@ -83,6 +100,12 @@ module LidSide(){ // lid top translate([-lid_top_wall, -lid_side_wall, -lid_front_wall]) cube([lid_top_wall, lid_inner_w/2 + 10, lid_front_wall + lid_inner_max_h]); + + // rail + rotate([90,0,90]) + translate([0,0,-0.1]) + linear_extrude(height=100.1) //todo + RailProfile(); } module PegProfile(){ @@ -121,7 +144,21 @@ module TopPattressBox(){ } } +module Demo(){ + translate([0, -lid_inner_w/2, 0]) LidSide(); + translate([0,0, lid_fatbox_h]) + rotate([0,180,0]) translate([0, -patbox_side/2, 0]) + rotate([0,0,90]) union(){ + %TopPattressBox(); + color("blue") AtFixingCentres(){ + rotate([180,0,0]) Peg(); + } + } +} + //LidSide(); //PegProfile(); //Peg(); -TopPattressBox(); +//TopPattressBox(); +//RailProfile(); +Demo();