-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathz-slider3.scad
79 lines (75 loc) · 2.75 KB
/
z-slider3.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
include <constants.scad>;
use <vslot.scad>;
xSectionCountWidth=2;
xSectionCountDepth=1;
zSectionCountWidth=2;
zSectionCountDepth=1;
screwDiameter=5;
tolerance=.8;
sliderTolerance=1.1;
wallWidth=7;
profileSize=20;
separation = 3;
isOpen = true;
screwOffset=5;
blockDepth = (xSectionCountDepth+zSectionCountDepth)*profileSize + separation + 2*wallWidth;
halfSize = false;
xExtrusionScrewPoints =
halfSize
? [wallWidth+screwDiameter/2]
: [wallWidth+screwDiameter/2,xSectionCountWidth*profileSize+wallWidth-screwDiameter/2];
openAreaOffset = isOpen ? profileSize - 5.5 : 0;
difference() {
hull() {
translate([0, openAreaOffset + wallWidth/2, 0])
cylinder(r=wallWidth/2,h=xSectionCountWidth*profileSize+2*wallWidth, $fn=90);
translate([xSectionCountWidth*profileSize+wallWidth, openAreaOffset + wallWidth/2, 0])
//rotate([-90,0,0])
cylinder(r=wallWidth/2,h=xSectionCountWidth*profileSize+2*wallWidth, $fn=90);
translate([0, blockDepth, 0])
//rotate([-90,0,0])
cylinder(r=wallWidth/2,h=xSectionCountWidth*profileSize+2*wallWidth, $fn=90);
translate([xSectionCountWidth*profileSize+wallWidth, blockDepth, 0])
//rotate([-90,0,0])
cylinder(r=wallWidth/2,h=xSectionCountWidth*profileSize+2*wallWidth, $fn=90);
};
translate([wallWidth/2,wallWidth,0])
rotate([0,0,0])
color("red")
drawVslotExtrusion(
height=blockDepth,
sectionCountWidth=zSectionCountWidth,
sectionCountDepth=zSectionCountDepth,
topIndent=true,
bottomIndent=true,
rightIndent=true,
leftIndent=true,
oversize=sliderTolerance
);
translate([
halfSize
? ((xSectionCountWidth/2)*profileSize - wallWidth/2)
: xSectionCountWidth*profileSize + 3/2 * wallWidth,
wallWidth + zSectionCountDepth*profileSize + separation + wallWidth/2,
wallWidth])
rotate([0,-90,0])
color("red")
drawVslotExtrusion(
height=
halfSize
? ((zSectionCountWidth*profileSize)/2)
: (zSectionCountWidth*profileSize+wallWidth*2),
sectionCountWidth=xSectionCountWidth,
sectionCountDepth=xSectionCountDepth,
topIndent=true,
bottomIndent=true,
rightIndent=true,
leftIndent=true,
oversize=tolerance,
screwHeight=wallWidth*2,
screwHeight=blockDepth,
screwOffset=screwOffset,
bottomScrewPoints = xExtrusionScrewPoints,
backScrewPoints = [profileSize/2]
);
};