-
Notifications
You must be signed in to change notification settings - Fork 4
/
y-end-motor.scad
66 lines (56 loc) · 1.39 KB
/
y-end-motor.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
include <configuration.scad>
include <common.scad>
include <lib/mcad/motors.scad>
motor_mount_depth = 6;
length =57.5;
height = 42.5;
difference()
{
//Motor mount body
translate([21.5,0,0]) union()
{
rounded_cube([length,height,motor_mount_depth], rounding=10, center = true);
// translate([-length/2+8,height/2-4]) cylinder(r=8, h=motor_mount_depth, center = true);
}
// Horizontal holes
// translate([0,threaded_rod_diameter /2])
frame_horizontal_struts(center=true, threaded=false);
// Motor mounts
translate([27.5,0,0])
linear_extrude(height=motor_mount_depth+1, center=true)
stepper_motor_mount(17, mochup=false, tolerance = 0.5);
}
translate([27.5,0,0])
stepper_motor_mount(17, mochup=true);
corner_pos = [[-1,-1], [1,-1], [1,1], [-1,1]];
module round(radius, corner)
{
intersection()
{
difference()
{
square([radius*2, radius*2], center=true);
circle(r=radius, center=true);
}
for(i=[0:3]) if (corner==i)
{
translate(corner_pos[i]*radius/2)
square([radius,radius], center=true);
}
}
}
module rounded_cube(dimensions, rounding, center=false)
{
offsets = dimensions-[rounding*2,rounding*2];
difference()
{
cube(dimensions, center = true);
//Rounded corners
linear_extrude(height=motor_mount_depth+1, center=true)
for(i=[0:3])
translate([
offsets[0]/2*corner_pos[i][0],
offsets[1]/2*corner_pos[i][1] ])
round(rounding,i);
}
}