123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- include <MCAD/polyholes.scad>;
- include <MCAD/units.scad>;
-
- include <truncated_teardrop.scad>;
-
-
- sink_0_1 = [26*mm, 49*mm, 18*mm, 4*mm, 10*mm];
- sink_0_2 = [26*mm, 48*mm, 18*mm, 4*mm, 10*mm];
- sink_0_3 = [25*mm, 30*mm, 17*mm, 4*mm, 10*mm];
-
- function sink_width(board) = board[0];
- function sink_length(board) = board[1];
- function sink_screw_spacing(board) = board[2];
- function sink_screw_distance(board) = board[3];
- function sink_connector_cutout(board) = board[4];
-
-
- /*
- * A general-purpose mount for the PD Buddy Sink
- */
- module sink_mount(layer_thickness=0.25*mm, height=8*mm, nut_depth=4*mm,
- cutout=0.5*mm, bolt_tolerance=0.3*mm, nut_tolerance=0.05*mm,
- board=sink_0_3) {
- w = sink_width(board);
-
- difference() {
- /* Body of the mount */
- cube([8*mm, w, height]);
-
- /* Bolt hole bottom height. Leave one layer_thickness as a bridge. */
- bhbot = nut_depth + layer_thickness;
- /* Bolt holes */
- translate([4*mm, (w - sink_screw_spacing(board))/2, bhbot])
- polyhole(d=3*mm + bolt_tolerance, h=height - bhbot + epsilon);
- translate([4*mm, (w + sink_screw_spacing(board))/2, bhbot])
- polyhole(d=3*mm + bolt_tolerance, h=height - bhbot + epsilon);
-
- /* Nut holes */
- translate([4*mm, (w - sink_screw_spacing(board))/2, -epsilon])
- rotate([0, 0, 30])
- cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
- translate([4*mm, (w + sink_screw_spacing(board))/2, -epsilon])
- rotate([0, 0, 30])
- cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
-
- /* Small cutout to clear any solder bulges under the USB connector */
- translate([-epsilon, (w - sink_connector_cutout(board))/2, height - cutout])
- cube([8*mm + 2*epsilon, sink_connector_cutout(board), cutout + epsilon]);
- }
- }
-
- /*
- * A bracket for mounting the PD Buddy Sink on a panel
- */
- module sink_bracket(layer_thickness=0.25*mm, height=8*mm, nut_depth=4*mm,
- cutout=0.5*mm, bolt_tolerance=0.3*mm, nut_tolerance=0.05*mm,
- board=sink_0_3) {
- w = sink_width(board);
- halfend_width = 8*mm;
- bracket_width = w + 2*halfend_width;
-
- mount_distance = 5*mm;
-
- difference() {
- union() {
- cube([8*mm, halfend_width, height]);
-
- translate([0, halfend_width, 0])
- sink_mount(layer_thickness=layer_thickness, height=height,
- nut_depth=nut_depth, cutout=cutout,
- bolt_tolerance=bolt_tolerance,
- nut_tolerance=nut_tolerance,
- board=board);
-
- translate([0, halfend_width + w, 0])
- cube([8*mm, halfend_width, height]);
- }
-
- /* Bolt holes */
- translate([-epsilon, mount_distance, height/2])
- truncated_teardrop(radius=(3*mm + bolt_tolerance)/2,
- length=8*mm + 2*epsilon);
- translate([-epsilon, bracket_width - mount_distance, height/2])
- truncated_teardrop(radius=(3*mm + bolt_tolerance)/2,
- length=8*mm + 2*epsilon);
-
- /* Nut holes */
- translate([4*mm, mount_distance, height/2])
- rotate([0, 90, 0])
- rotate([0, 0, 30])
- cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
- translate([4*mm, bracket_width - mount_distance, height/2])
- rotate([0, 90, 0])
- rotate([0, 0, 30])
- cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
- }
- }
-
-
- sink_bracket(layer_thickness=0.25);
|