modules.scad
1.56 KB
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
46
47
48
49
50
51
52
53
54
55
include<vars.scad>
module materialDot(radius, height, roundness) {
roundness = roundness >= height/2 ? height/2-0.000001 : roundness;
translate([0,0, roundness]) minkowski() {
linear_extrude( height = height-roundness*2
, convexity = 10
, twist = 0 )
circle( r=radius-roundness);
sphere(r=roundness);
}
}
module shapeZ(x,y,z) {
translate([0,0,-25]) minkowski() {
cube([
x-(offset)*2,
y-(offset)*2,
1
]);
cylinder(
r=offset,
h=50
);
}
}
module handleShape(x,y,z,extra,bool,borders){
translate([
x/2 - handleWidth/2 - offset,
-( offset+1 ),
z-(2.06+roundborderInner+strength*3)
]) {
hull() {
translate([-extra,0,-1])cube([handleWidth+extra*2,5,1]);
translate([handleCorner,0,handleCorner-handleHeight]) rotate([-90,0,0]) union() {
cylinder(r=handleCorner+extra,h=5);
translate([handleWidth-handleCorner*2,0,0]) cylinder(r=handleCorner+extra,h=5);
}
}
if(borders==true) translate([-strength*2,0+gratesize+1,-4.5])
cube([handleWidth+strength*4,2,6]);
if(bool==true) {
if(borders==true) translate([-strength*2,0,-0.5])
cube([handleWidth+strength*4,1,2]);
hull() {
translate([-strength*2,0,-1.5])
cube([handleWidth+strength*4,1,1]);
translate([-strength*2,0.85,-(1+handleHeight+strength)])
cube([handleWidth+strength*4,1,1]);
}
}
}
}