chiark / gitweb /
2e4fb5ced435cb0a3c5f540c2132f50f4f484e83
[reprap-play.git] / screw-recess-test.scad
1 // -*- C -*-
2
3 cubez = 12;
4
5 shaftdia = 4 + 0.5;
6 recessdia = 10 + 1.0;
7
8 shaftz = cubez;
9 recessz = 5;
10
11 recesstopz = recessz + 0.5*recessdia + 0.1;
12 xblocky = shaftdia + 0.1;
13
14 cubexy = recessdia + 10;
15
16 module RecessCylinder(h){
17   translate([0,0,-1]) cylinder(r=recessdia/2, h=h+1, $fn=40);
18 }
19
20 module Hole(){
21   translate([0,0,-1]) cylinder(r=shaftdia/2, h=shaftz+2, $fn=20);
22   RecessCylinder(recessz);
23   intersection(){
24     translate([-recessdia*1.5, -xblocky/2, -1])
25       cube([recessdia*3, xblocky, recesstopz+3]);
26     translate([0, -recessdia, recesstopz])
27       rotate([0,135,0]) cube([recessdia, recessdia*2, 10]);
28     RecessCylinder(recesstopz+1);
29   }
30 }
31
32 module Test(){
33   difference(){
34     translate([-cubexy/2, -cubexy/2, 0])
35       cube([cubexy,cubexy,cubez]);
36     Hole();
37   }
38 }
39
40 Test();
41 //Hole();