-
Notifications
You must be signed in to change notification settings - Fork 3
/
bat.scad
45 lines (39 loc) · 982 Bytes
/
bat.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
include <bat-contour.scad>;
wallThick = 2;
cutterMinimum = 0.4;
baseHeight = 2;
height = 10;
flangeWidth = 6;
// baseShape(5);
cutter();
module cutter() {
//cube([7,5,1], center=true);
minkowski(){
outline();
cylinder(r1 = wallThick/3, r2 = cutterMinimum/3, h = height);
};
//%cube([.5, .5, height*3], true);
flange();
}
module flange(){
difference(){
minkowski(){
baseShape(baseHeight/3);
cylinder(r = flangeWidth, h = baseHeight/3);
}
translate([0,0,-0.01])baseShape(baseHeight*1.1);
};
}
module outline(){
difference(){
minkowski(){
baseShape(baseHeight/3);
cylinder(r = cutterMinimum/3, h = baseHeight/3);
}
translate([0,0,-0.01])baseShape(baseHeight*1.1);
};
};
module baseShape(H){
// linear_extrude(file = inputfile, height=H);
scale(4) linear_extrude(height=H, center=true, convexity=10, slices=2) path3130();
}