etc: trivial clip for holding the rear tray of a laserjet 6
[clinton/3d-models.git] / led-clip / new-led-clip.scad
1 /* Customizable Clip for mounting strip LEDs
2 Copyright (c) 2015 Clinton Ebadi <clinton@unknownlamer.org>
3
4 This program is free software: you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see
16 <http://www.gnu.org/licenses/>.
17 */
18
19 // TODO:
20 // - make this a module
21
22 use <MCAD/teardrop.scad>
23
24 // All lengths in mm
25
26 wall_height = 4; // How tall should the wall be?
27 wall_width = 3.2; // How thick should the walls be at their base?
28 extra_wall_height = 10; // How tall should the horizontal mounting tab be? 0 = no tab.
29
30 base_height = 2.5; // Thickness of the base
31 base_length = 30; // Length of the clip
32
33 strip_width = 10; // Width of LED strip
34
35 hole_radius = 2; // Size of mounting holes
36
37 x_midpoint = (wall_width*2 + strip_width) / 2;
38
39 difference () {
40 rotate([90,0,0]) {
41 linear_extrude(height = base_length) {
42 translate ([0, wall_height + base_height, 0]) square([wall_width, extra_wall_height]);
43 difference () {
44 square ([wall_width * 2 + strip_width, wall_height + base_height]);
45 polygon (points = [[wall_width, base_height], [wall_width + strip_width, base_height],
46 [(wall_width*2 + strip_width) / 2, (wall_height + base_height) * 3]],
47 paths = [[0, 1, 2]]);
48 }
49 }
50
51 }
52 translate ([x_midpoint, -base_length / 2, -0.1]) cylinder (h = base_height + 0.2, r = hole_radius, $fn = 20);
53 translate([0.1, -base_length/2, (base_height + wall_height + extra_wall_height) - hole_radius*2 ]) teardrop (radius = hole_radius, length = wall_width*2 + 0.2, angle = 90);
54
55 }
56