chiark / gitweb /
rpi-mount: Introduce pi_mount_z parameter
[reprap-play.git] / rpi-mount.scad
1 // -*- C -*-
2
3 include <utils.scad>
4
5 pi_board_gap = 0.5;
6 pi_board_support_z = 2;
7
8 pi_sz   = [ 66.0, 30.5 ] + pi_board_gap * [1,1];
9
10 pi_nom_sz = [ 65, 30 ];
11 pi_nom_centres_in = 3.5;
12 pi_solder_side_gap = 1.5 * 2;
13 pi_screw_hole_dia  = 2.3;
14 pi_screw_hole_wall = 2.3;
15
16 module PiMount(pi_mount_z=5){
17   sxy = pi_nom_sz/2 - [1,1] * pi_nom_centres_in;
18   for (mx=[0,1]) mirror([mx,0,0]) for (my=[0,1]) mirror([0,my,0]) {
19     difference(){
20       union(){
21         linextr(-0.1, pi_mount_z + pi_board_support_z, convexity=1)
22           rectfromto( pi_nom_sz/2 - 2 * [1,1] * pi_nom_centres_in,
23                       pi_sz/2 + [1,1] * board_support_wall);
24         linextr(-0.1, pi_mount_z - pi_solder_side_gap, convexity=1)
25           translate(sxy)
26           square(center=true, pi_screw_hole_dia + pi_screw_hole_wall*2);
27       }
28       linextr(pi_mount_z, pi_mount_z + 5, convexity=1)
29         rectfromto(-[10,10], pi_sz/2);
30       translate( sxy )
31         linextr(-1, pi_mount_z + 10, convexity=1)
32         circle(r= pi_screw_hole_dia/2);
33     }
34   }
35 }