-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathz-slider-carriage-insert.scad
81 lines (75 loc) · 2.8 KB
/
z-slider-carriage-insert.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
use <vslot.scad>;
sectionCountWidth=1;
sectionCountDepth=2;
screwDiameter=5;
tolerance=.9;
wallWidth=2;
profileSize=20;
sideNum = 1;
allTogether = true;
holeDistWidth=83;
holeDistHeight=31;
blockHeight = wallWidth*2 + sectionCountWidth*profileSize;
blockWidth = wallWidth*2 + sectionCountDepth*profileSize;
cubeX = holeDistHeight+screwDiameter+2*wallWidth;
cubeZ = holeDistWidth+screwDiameter+2*wallWidth;
mirror([sideNum == 1 ? 0 : 1, 0, 0])
difference() {
cube([cubeX,blockWidth,cubeZ]);
translate([wallWidth+screwDiameter/2, 0, wallWidth+screwDiameter/2])
{
rotate([-90,0,0])
cylinder(r=screwDiameter/2,h=blockWidth, $fn=90);
translate([0, 0, holeDistWidth])
rotate([-90,0,0])
cylinder(r=screwDiameter/2,h=blockWidth, $fn=90);
}
translate([wallWidth+screwDiameter/2 + holeDistHeight, 0, wallWidth+screwDiameter/2])
{
rotate([-90,0,0])
cylinder(r=screwDiameter/2,h=blockWidth, $fn=90);
translate([0, 0, holeDistWidth])
rotate([-90,0,0])
cylinder(r=screwDiameter/2,h=blockWidth, $fn=90);
}
translate([(cubeX-(sectionCountWidth*profileSize))/2,wallWidth,0])
drawVslotExtrusion(
height=cubeZ,
sectionCountWidth=sectionCountWidth,
sectionCountDepth=sectionCountDepth,
topIndent=true,
rightIndent=true,
leftIndent=true,
bottomIndent=true,
oversize=tolerance,
//screwOffset,
topScrewPoints = [cubeZ/2, cubeZ/2 + profileSize]
//rightScrewPoints = [],
//topScrewPoints = [],
//bottomScrewPoints = [],
//backScrewPoints = []
);
if (allTogether != true)
{
translate ([sideNum == 1 ? 0 : cubeX, 0, 0])
mirror([sideNum == 1 ? 0 : 1, 0, 0]) {
linear_extrude(h=cubeZ)
polygon(points=[
[0,wallWidth-tolerance/2],
[(cubeX-(sectionCountWidth*profileSize))/2-tolerance/2,wallWidth-tolerance/2],
[cubeX-(cubeX-(sectionCountWidth*profileSize))/2+tolerance/2,blockWidth-wallWidth+tolerance/2],
[cubeX+tolerance/2, blockWidth-wallWidth+tolerance/2],
[cubeX+tolerance/2, blockWidth+tolerance/2],
[0, blockWidth]
]);
}
}
/*
translate([-(holeDistHeight-blockHeight)/2+holeDistHeight, 0, cylinderRadius])
rotate([-90,0,0])
cylinder(r=cylinderRadius,h=blockWidth, $fn=90);
translate([-(holeDistHeight-blockHeight)/2+holeDistHeight, 0, cylinderRadius+holeDistWidth])
rotate([-90,0,0])
cylinder(r=cylinderRadius,h=blockWidth, $fn=90);
*/
}