This is for my personal random 3D models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

76 lines
2.0 KiB

h0 = 11.0;
h1 = 21.0;
radius = 4;
thickness = 1.5;
w0i = 37.5;
l0i = 66.0;
w1i = 53.0;
l1i = l0i;
$fn = 50;
w0o = w0i + 2*thickness;
l0o = l0i + 2*thickness;
w1o = w1i + 2*thickness;
l1o = l1i + 2*thickness;
c_pitch = 16.5;
c_offset = 9;
c_radius = 7.5/2;
c_h = 17;
cutout_h = 8;
cutout_w = 32;
screw_r0 = 4.0/2;
screw_r1 = 9.0/2;
screw_outer_r = screw_r1 + thickness;
difference()
{
// Body
hull()
for (x = [-1:2:1])
for (y = [-1:2:1])
{
translate([x * (w1o/2-radius), y * (l1o/2-radius), (h1+thickness)/2])
cylinder(h = h1 + thickness, r = radius, center = true);
}
// Cutout body
hull()
for (x = [-1:2:1])
for (y = [-1:2:1])
{
translate([x * (w1i/2-radius), y * (l1i/2-radius), h1/2 - 0.001])
cylinder(h = h1, r = radius, center = true);
}
// Cutout ceiling
hull()
for (x = [-1:2:1])
for (y = [-1:2:1])
{
translate([x * (w0i/2-radius), y * (l0i/2-radius), h1])
cylinder(h = h0 + 1, r = radius, center = true);
}
// Cutouts cables
for (x = [-1:2:1])
for (p = [0:1:3])
hull()
for (h = [0:1:1])
translate([x * (w1o/2 - thickness/2), -l1o/2 + c_offset + p*c_pitch, h * (c_h - c_radius)])
rotate([0, 90, 0])
cylinder(h = thickness + 0.001, r = c_radius, center = true);
// Cutouts screws
for(y = [-1:2:1])
translate([0, y* (l1o/2-thickness), cutout_h/2])
cube([cutout_w, 2*thickness, cutout_h +0.001], center = true);
}
goblet_h = h1 + thickness - cutout_h;
for(y = [-1:2:1])
translate([0, y*(l1o/2 + screw_r1), cutout_h + thickness/2])
difference()
{
hull()
{
cylinder(r=screw_outer_r, h=thickness, center=true);
translate([0, y*(-screw_outer_r + thickness/2), goblet_h/2 - thickness/2])
cube([screw_outer_r*2, thickness, goblet_h], center=true);
}
cylinder(r=screw_r0, h=h1*10, center=true);
translate([0, 0, h1/2])
cylinder(r=screw_r1, h=h1, center=true);
}