1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- mosfet_width = 60 + 3;
- mosfet_height = 40 + 3;
- mosfet_depth = 2;
-
- mosfet_holes_x = 56;
- mosfet_holes_y = 36;
- mosfet_dia = 2.2;
-
- wall = 5.0;
- mosfet_wall_dist = 15.0;
- mosfet_mount_dist = 2.0;
- mount_dia = 4.2;
-
- cutout_len = 20;
- cutout_dist = 4;
-
- $fn = 42;
-
- module prism(l, w, h) {
- polyhedron(
- points = [[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
- faces = [[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
- );
- }
-
- module mosfet() {
- cube([mosfet_width, mosfet_height, mosfet_depth]);
-
- for (x = [-1, 1])
- for (y = [-1, 1])
- translate([mosfet_width / 2 + x * mosfet_holes_x / 2, mosfet_height / 2 + y * mosfet_holes_y / 2, -mosfet_mount_dist - wall - 1])
- cylinder(d = mosfet_dia - 0.2, h = mosfet_mount_dist + wall + 1);
- }
-
- module mount() {
- translate([0, -wall, 0])
- difference() {
- union() {
- cube([mosfet_width + mosfet_wall_dist + 20, wall, mosfet_height]);
-
- translate([mosfet_width + mosfet_wall_dist + 7.5, wall, 0])
- cube([5, 1, mosfet_height]);
-
- for (x = [-1, 1])
- for (y = [-1, 1])
- translate([mosfet_width / 2 + x * mosfet_holes_x / 2, wall, mosfet_height / 2 + y * mosfet_holes_y / 2])
- rotate([-90, 0, 0])
- cylinder(d = 7, h = mosfet_mount_dist);
- }
-
- for (i = [-15, 15])
- translate([mosfet_width + mosfet_wall_dist + 10, -1, mosfet_height / 2 + i])
- rotate([-90, 0, 0])
- cylinder(d = mount_dia, h = wall + 3);
-
- for (x = [-1, 1])
- for (y = [-1, 1])
- translate([mosfet_width / 2 + x * mosfet_holes_x / 2, -1, mosfet_height / 2 + y * mosfet_holes_y / 2])
- rotate([-90, 0, 0])
- cylinder(d = mosfet_dia, h = wall + mosfet_mount_dist + 2);
-
- for (i = [0, 1, 2, 3])
- translate([mosfet_width / 2, 0, mosfet_height / 2])
- rotate([0, 90 * i, 0])
- translate([cutout_len * sqrt(2) / 2 + cutout_dist, -1, -cutout_len * sqrt(2) / 2])
- rotate([45, 0, 90])
- prism(wall + 2, cutout_len, cutout_len);
- }
- }
-
- module assembly() {
- %translate([0, mosfet_mount_dist, mosfet_height])
- rotate([-90, 0, 0])
- mosfet();
-
- mount();
- }
-
- rotate([90, 0, 0])
- assembly();
|