X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=brompton-computer-guard.scad;h=9620bddf500c2e470dd9592ab58d43bd3e67b27a;hb=f98a755290d00d525653a60fc405aaadc2efe984;hp=37d10e6eb9b95f725516575b71ddc9adf5b7a350;hpb=8c2692e5b50a4dd822bd8424262399539cdba871;p=reprap-play.git diff --git a/brompton-computer-guard.scad b/brompton-computer-guard.scad index 37d10e6..9620bdd 100644 --- a/brompton-computer-guard.scad +++ b/brompton-computer-guard.scad @@ -1,12 +1,12 @@ // -*- C -*- -cover_zsz = 45; +cover_ysz = 45; cover_len = 70; attach_tube_dia = 18; attach_cx = -15; -attach_cdz = -10; +attach_cdy = -5; attach_w = 25; attach_inrad = 25; /// @@ -16,41 +16,62 @@ attach_ang = 45; // calculated -cover_lcircle_r = cover_zsz / (1 + 1/sqrt(2)); +cover_lcircle_r = cover_ysz / (1 + 1/sqrt(2)); base_len = cover_len - cover_lcircle_r; -attach_total_len = - attach_inrad + attach_tube_dia + attach_hole_dist + attach_hole_dia/2; +attach_straight_len = + attach_inrad + attach_tube_dia + attach_hole_dist + attach_hole_dia/2 + - attach_w / 2 + attach_hole_dist; module RearSideTemplate(){ polygon([[0.1,0], [-base_len,0], - [-base_len,-cover_zsz], - [0.1, -cover_zsz]]); - translate([-base_len, -cover_zsz + cover_lcircle_r]) + [-base_len,-cover_ysz], + [0.1, -cover_ysz]]); + translate([-base_len, -cover_ysz + cover_lcircle_r]) circle(r=cover_lcircle_r); } module AttachTemplate(){ hull(){ -// polygon([[0, 0], -// [-0.1, 0], -// [-0.1, -cover_zsz], -// [0, -cover_zsz]]); - translate([attach_cx, -attach_cdz]) rotate([0,0,-attach_ang]) { - polygon([[-attach_cx, attach_w/2], - [0, -attach_w/2], - [attach_total_len, -attach_w/2], - [attach_total_len, attach_w/2]]); - translate([attach_total_len, 0]) + polygon([[0, 0], + [-0.1, 0], + [-0.1, -cover_ysz], + [0, -cover_ysz]]); + translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) { + polygon([[-attach_cx, attach_w/2], + [0, -attach_w/2], + [attach_straight_len, -attach_w/2], + [attach_straight_len, attach_w/2]]); + translate([attach_straight_len, 0]) circle(r=attach_w/2); } } } -//module Tube(){ -// translate( +module Tube(){ + %translate([attach_cx, -attach_cdy, -20]) { + rotate_extrude(convexity=10) { + translate([attach_inrad + attach_tube_dia/2, 0]) + circle(r=attach_tube_dia/2); + } + } +} + +module Bolts(){ + %translate([0,0,-50]) linear_extrude(height=80) { + translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) { + translate([attach_inrad - attach_hole_dist - attach_hole_dia/2, 0]) + circle(r=attach_hole_dia/2, $fn=20); + translate([attach_inrad + attach_tube_dia + +attach_hole_dist + attach_hole_dia/2, 0]) + circle(r=attach_hole_dia/2, $fn=20); + } + } +} color("blue") RearSideTemplate(); AttachTemplate(); +Tube(); +Bolts();