-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsquaredMapPieceFrame.scad
81 lines (77 loc) · 2.82 KB
/
squaredMapPieceFrame.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
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
nozzle=0.4;
layerHeight=0.2;
holeExtra=0.1;
width = 43;
height = 3; // multiple of layerHeight
border = 4*nozzle; // multiple of nozzle
extra = 10;
carpetHeight = 1; // multiple of layerHeight
thickness=border+holeExtra; // thickness - holeExtra must be multiple of nozzle.
totalWidth=width+(2*border);
$fn=100;
difference(){
union(){
cube([width+(2*border),width+(2*border),height+carpetHeight],false);
//dalt
translate([totalWidth/2-0.5*thickness,totalWidth,0]){
cube([2*thickness,thickness,height+carpetHeight]);
}
//dreta
translate([totalWidth,totalWidth/2-1.5*thickness,0]){
cube([thickness,2*thickness,height+carpetHeight]);
}
//baix
translate([totalWidth/2-1.5*thickness,-thickness,0]){
cube([2*thickness,thickness,height+carpetHeight]);
}
// esquerra
translate([-thickness,totalWidth/2-(0.5*thickness),0]){
cube([thickness,2*thickness,height+carpetHeight]);
}
}
union(){
translate([border,border,carpetHeight]){
cube([width,width,height+extra],false);
translate([separation,totalWidth,0]){
anchor(separation);
}
}
union(){
holeSize=width/6;
startOffset=totalWidth/4;
endOffset=3*startOffset;
//dalt esquerra
translate([startOffset,startOffset,-extra]){
cylinder(height+carpetHeight+2*extra,holeSize,holeSize);
}
//baix esquerra
translate([startOffset,endOffset,-extra]){
cylinder(height+carpetHeight+2*extra,holeSize,holeSize);
}
//dalt dreta
translate([endOffset,startOffset,-extra]){
cylinder(height+carpetHeight+2*extra,holeSize,holeSize);
}
//baix dreta
translate([endOffset,endOffset,-extra]){
cylinder(height+carpetHeight+2*extra,holeSize,holeSize);
}
}
//dalt
translate([totalWidth/2-1.5*thickness-holeExtra,totalWidth-thickness,-extra]){
cube([2*thickness+2*holeExtra,thickness+2*holeExtra,height+carpetHeight+3*extra]);
}
//dreta
translate([totalWidth-thickness,totalWidth/2-0.5*thickness-holeExtra,-extra]){
cube([thickness+2*holeExtra,2*thickness+2*holeExtra,height+carpetHeight+3*extra]);
}
//baix
translate([totalWidth/2-0.5*thickness-holeExtra,-2*holeExtra,-extra]){
cube([2*thickness+2*holeExtra,thickness+2*holeExtra,height+carpetHeight+3*extra]);
}
//esquerra
translate([-2*holeExtra,totalWidth/2-1.5*thickness-holeExtra,-extra]){
cube([thickness+2*holeExtra,2*thickness+2*holeExtra,height+carpetHeight+3*extra]);
}
}
}