modules.scad
2.75 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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 = 100
, twist = 0 )
circle( r=radius-roundness);
sphere(r=roundness);
}
}
module shapeZ(x,y,z) {
translate([0,0,-250]) minkowski() {
cube([
x-(offset)*2,
y-(offset)*2,
1
]);
cylinder(
r=offset,
h=500
);
}
}
module volume(x,y,z,extra) {
hull() {minkowski() {
translate([strength*1.5,strength*1.5,0]) cube([
x-(offset)*2-strength*3,
y-(offset)*2-strength*3,
1
]);
sphere(r=roundborderInner+extra);
}
minkowski() {
translate([0,0,z]) cube([
x-(offset)*2,
y-(offset)*2,
1
]);
sphere(r=roundborderInner+extra);
}
}
}
module handleShape(x,y,z,extra,bool,borders){
union() {
if(bool==true) volume(x,y,z,0);
translate([
x/2 - handleWidth/2 - offset,
-( offset+10 ),
z-(20.6+roundborderInner+strength*3)
]) {
if(bool==true && borders!=false){
translate([-strength*2,0,0]) rotate([90,0,90]) linear_extrude(height = 140, center = false, convexity = 10)
polygon(points=[[-10,-50]
,[25.7-2,-50]
,[25.4-2,-32.5]
,[18.5,-32.5]
,[10,-5]
,[10,strength]
,[20,strength]
,[20,10]
,[-10,10]
]);
}
hull(){
/* #translate([-extra,0,-10])cube([handleWidth+extra*2,50,10]); */
rotate([-90,0,0]) union() {
translate([2.5,2.5,0]) cylinder(r=2.5+extra,h=50);
translate([handleWidth-2.5,2.5,0]) cylinder(r=2.5+extra,h=50);
}
translate([handleCorner,0,handleCorner-handleHeight]) rotate([-90,0,0]) union() {
cylinder(r=handleCorner+extra,h=50);
translate([handleWidth-handleCorner*2,0,0]) cylinder(r=handleCorner+extra,h=50);
}
}
}
/* shapeZ(x,y,z); */
/* translate([-strength*2,0+gratesize+10,-45]) */
/* cube([handleWidth+strength*4,60,60]); */
}
}