-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomizableZAxisShim.scad
76 lines (62 loc) · 3.08 KB
/
CustomizableZAxisShim.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
// Customizable Z-axis shim for FlashForge Creator Pro 2016 by DrLex
// Based on Thing:1475239 by ben8p and Thing:557994 by Atomist
// Released under Creative Commons - Attribution - Share Alike license
// v2.1, 2019/08/10
// The distance you want the Z homing to be lowered.
ShimHeight = 3; // [1:0.1:10]
// How thick the clamping part should be.
ClampHeight = 4; // [2:0.1:10]
// Print the thickness on the model?
Label = "yes"; // [yes, no]
// Useful for very thin thims where Shimheight is smaller than ClampHeight.
Reinforce = "no"; // [yes, no]
/* [Hidden] */
RodDistance = 100; // [80:0.1:120]
RodDiameter = 19; // [15:0.1:25]
RodRadius = RodDiameter/2;
RodCenter = RodDistance/2 + 0.1;
MaxX = RodCenter - 2.85;
ClampScale = [1, 1.062, 1];
difference() {
union() {
difference() {
union() {
translate([-MaxX, 3, 0]) cube([2*MaxX, 13.88, ShimHeight]);
translate([0, -2.0, ClampHeight/2]) cube([RodDistance, 10, ClampHeight], center=true);
translate([RodCenter, -7.15, ClampHeight/2]) scale(ClampScale) cylinder(r=RodRadius + 2, h=ClampHeight, center=true, $fn=32);
translate([-RodCenter, -7.15, ClampHeight/2]) scale(ClampScale) cylinder(r=RodRadius + 2, h=ClampHeight, center=true, $fn=32);
}
// Rod holes
translate([RodCenter, -7.15, 9]) scale(ClampScale) cylinder(r=RodRadius, h=20, center=true, $fn=32);
translate([-RodCenter, -7.15, 9]) scale(ClampScale) cylinder(r=RodRadius, h=20, center=true, $fn=32);
// Side screw holes
translate([MaxX, 7.155, 9]) cylinder(r=3.1, h=20, center=true);
translate([-MaxX, 7.155, 9]) cylinder(r=3.1, h=20, center=true);
// Chop off the sides
translate([MaxX, -2*RodDiameter, -5]) cube([RodDiameter, 4 * RodDiameter, 20]);
translate([-MaxX - RodDiameter, -2*RodDiameter, -5]) cube([RodDiameter, 4 * RodDiameter, 20]);
// Chop off the center
translate([0, -10, 9]) cube([2*(RodCenter - RodRadius - 2), 20, 20], center=true);
if(ClampHeight > ShimHeight) {
// Remove pieces of the clamps sticking out
translate([-MaxX - 1, 3, ShimHeight]) cube([2*MaxX + 2, 13.88, 20]);
}
}
if(Reinforce == "yes") {
translate([0, 1.85, ClampHeight/2]) isoTrapezoidX(22, 30, 3.7, ClampHeight);
}
}
// Space for leadscrew bearing
if(Reinforce == "yes") {
translate([0, 0, ClampHeight/2]) isoTrapezoidX(18, 28, 5, ClampHeight+0.1);
}
else {
translate([0, 0, 9]) cube([21.35, 7, 20], center=true);
}
if(Label == "yes") {
translate([MaxX-9, 4, ShimHeight - 0.2]) linear_extrude(1, convexity=3) text(str(ShimHeight, " mm"), 4.5, font="Roboto", halign="right", $fn=14);
}
}
module isoTrapezoidX(sizeXTop, sizeXBtm, sizeY, sizeZ) {
linear_extrude(height=sizeZ, center=true) polygon([[-sizeXTop/2, sizeY/2], [sizeXTop/2, sizeY/2], [sizeXBtm/2, -sizeY/2], [-sizeXBtm/2, -sizeY/2]]);
}