chiark / gitweb /
fairphone-case: move legs near hinge closer to hinge
[reprap-play.git] / filamentteeth.scad
1 // -*- C -*-
2 //
3 // filamentteeth.scad
4 //
5 // 3D design for clips to hold FFF filament
6 // Copyright 2012,2016 Ian Jackson
7 //
8 // This work is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // This work is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this work.  If not, see <http://www.gnu.org/licenses/>.
20
21
22 d=0.01;
23 teethw=1.5;
24
25 module FilamentTeeth(fdia, h, teethw=teethw,
26                          stembendd=0.5, stembendl=7, teethxl=1.5) {
27   gapw = fdia-stembendd*2;
28   teethbigw = gapw + teethw*2;
29   basew = fdia+teethw*2-stembendd*2;
30   based = basew/3;
31
32   translate([-based, -basew/2, 0]) cube([based, basew, h]);
33   difference() {
34     union() {
35       translate([-d, -teethbigw/2, 0])
36         cube([d+stembendl + teethw, teethbigw, h]);
37 //  translate([
38 //  stembigw = fdia + stembend
39 //  translate([-d, -stemw, 
40       linear_extrude(height=h) {
41         translate([stembendl-fdia/2, 0]) circle(fdia/2+teethw, $fn=30);
42       }
43     }
44     translate([0,0,-1]) {
45       translate([0,-gapw/2])
46         cube([stembendl+teethxl+1, gapw, h+2]);
47       linear_extrude(height=h+2) {
48         translate([stembendl-fdia/2, 0]) circle(fdia/2, $fn=30);
49       }
50     }
51   }
52
53   for (mirr=[0:1]) {
54     mirror([0,mirr,0]) {
55       translate([stembendl + teethw, gapw/2, 0])
56         rotate([0,0,30])
57         cube([teethxl, teethw, h]);
58     }
59   }
60 }
61