forked from Jaydmdigital/Kossel_2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendstop.scad
71 lines (59 loc) · 2.48 KB
/
endstop.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
include <configuration.scad>;
use <microswitch.scad>;
thickness = 7; // 1mm thicker than linear rail.
width = extrusion; // Same as vertical extrusion.
height = 15;
fin_w=6;
$fn=120;
layer_height = 0.2;
//left=-1; right=1;
side = -1;
module screw_socket_cone() {
union() {
scale([1, 1, -1]) rotate(45)cylinder(r=11/2*sqrt(2), h=5.5, $fn=4);
}
}
module endstop(offset=thickness/2,neg=1) {
difference() {
union() {
minkowski(){
cube([width-6, thickness/2, height-6], center=true);
rotate([90,0,0])cylinder(h=thickness/2, r=3, center=true);
}
//translate([0, 0, -height/4])cube([width+2, thickness, height/2], center=true);
// translate([neg*(-(width+2+thickness-2)/2), 0, -height/4])cylinder(h=height/2, r=thickness/2, center=true);
translate([0, fin_w/2, 0]) cube([fin_w, fin_w, height], center=true);
// translate([width/2-offset, width/2+2, -height/4]) rotate(90) cube([width+thickness-thickness/2, thickness, height/2], center=true);
}
//cutout screw adjustment hole
//translate([neg*(-(width+2+thickness-2)/2), 0, -height/4]) cylinder(h=height, r=m3_wide_radius, center=true);
//translate([neg*(-(width+2+thickness-2)/2), 0, height/4 - 2.3])
//translate([width/2+neg*offset, (thickness+width)/2, -height/4]) cylinder(h=height, r=m3_wide_radius, center=true);
// translate([width/2+neg*offset, (thickness+width)/2, -height/4+ 2.3])rotate(30) cylinder(h=height/2, r=m3_nut_radius, center=true, $fn=6);
translate([0, 0, 3]) rotate([90, 0, 0]) {
cylinder(r=m3_wide_radius, h=20, center=true);
translate([0, 0, 3.6-thickness/2]) {
cylinder(r=3, h=10);
translate([0, 5, 5]) cube([6, 10, 10], center=true);
}
translate([0, 0, -thickness/2-1]) scale([1, 1, 1])screw_socket_cone();
// cylinder(r1=m3_wide_radius, r2=7, h=4);
}
translate([0, -3-thickness/2, -2]) rotate([0, 180, 0]) {
// screw holes for microswitch();
for (x = [-9.5/2, 9.5/2]) {
translate([x, 0, 0]) rotate([90, 0, 0]) cylinder(r=1.9/2, h=40, center=true);
}
}
}
}
translate([0,extrusion/2+thickness/2,-60/2]) %difference(){
import("./assembly/2020_1000mm.stl", convexity=10);
translate([-12,-12,60])cube([24,24,(1000-60)+2]);
}
//translate([0, 0, height/2]) endstop(-thickness/2,side);
translate([0, 0, height/2]) endstop(2,1);
%rotate([180,0,0])
//translate([side*(width-3), -(7.5+thickness/2), height/2+5])
translate([0,-(width+thickness), height/2+5])
endstop(-thickness/2,side);