X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=led-strip-end-slanted.scad;fp=led-strip-end-slanted.scad;h=10d4d1958e0b91364090613d30fde6bec0f4fcd1;hb=c93523e597fac880dc2f16f9d04019186f237c2a;hp=0000000000000000000000000000000000000000;hpb=2e61345df1e55138415676f016fca99e112cb5c3;p=things.git diff --git a/led-strip-end-slanted.scad b/led-strip-end-slanted.scad new file mode 100644 index 0000000..10d4d19 --- /dev/null +++ b/led-strip-end-slanted.scad @@ -0,0 +1,72 @@ +eps = 0.01; +infty = 100; + +wall = 1.5; + +magnet_w = 5 + 0.3; +magnet_l = 10 + 0.3; +magnet_h = 2.5; +magnet_clip_w = 0.5; + +angle = 5; +angled_w = 3; + +inner_bottom_l = 21; +inner_bottom_w = 2; +inner_bottom_off = 2.0; +inner_side_l = 4; +inner_side_w = wall; +inner_side_off = 1; +inner_h = 5; + +outer_l = inner_bottom_l + 4; +outer_w = 10; + +cable_h = 3; +cable_w = 5.5; + +module body() { + difference() { + // base plate + cube([outer_l, outer_w, wall]); + // cable hole + translate([outer_l/2-cable_w/2, inner_bottom_off+inner_bottom_w, -eps]) + cube([cable_w, cable_h, wall+2*eps]); + } + + // inner bottom + translate([outer_l/2-inner_bottom_l/2, inner_bottom_off, 0]) + cube([inner_bottom_l, inner_bottom_w, inner_h+wall]); + // inner sides + for (x = [-1, 1]) { + translate([outer_l/2, inner_bottom_off+inner_bottom_w, 0]) + scale([x, 1, 1]) + translate([inner_bottom_l/2-inner_side_off-inner_side_w, 0, 0]) + cube([inner_side_w, inner_side_l, inner_h+wall]); + } + + difference() { + // angled outer bottom + hull() { + cube([outer_l, eps, 2*wall+magnet_w]); + translate([0, -angled_w, 0]) + rotate([0, 0, -angle]) + cube([outer_l, eps, 2*wall+magnet_w]); + } + // magnet hole + rotate([0, 0, -angle]) + translate([outer_l/2-magnet_l/2, -angled_w-eps, wall]) + difference() { + cube([magnet_l, magnet_h, magnet_w]); + for (z = [0, magnet_w]) + translate([magnet_l/3, 0, z]) + rotate([0, 90, 0]) + cylinder(r=magnet_clip_w, + h=magnet_l/3, $fn=4); + } + } +} + +body(); + +