Files
gayle/cupholder/cupholder.scad
T
2026-07-12 11:43:05 -07:00

85 lines
2.1 KiB
OpenSCAD

poses = [
[-20, -20, -15],
[-20, 20, 15],
[20, -20, -45],
[20, 20, 45],
];
for (pos = poses)
translate([pos[0], pos[1], 0])
rotate([0, 0, pos[2]]) {
difference() {
union() {
difference() {
cylinder(h=15, d1=25, d2=27, $fn=100);
translate([0, 0, 2])
cylinder(h=13.01, d1=21, d2=23.5, $fn=100);
translate([0, 0, -0.01])
difference() {
cylinder(h=1.01, d=26, $fn=100);
translate([0, 0, -0.01])
cylinder(h=1.01, d=23, $fn=100);
}
}
translate([0, 0, 1.0])
torus(r_major=11.5, r_minor=1.0, xs=1.06, $fn=100);
}
for (a = [0, 120, 240])
rotate([0, 0, a]) {
translate([10, 0, 5])
cube([8, 4, 10.01], center=true);
translate([11, 0, 10])
rotate([0, 90, 0])
cylinder(h=6, d=4, center=true, $fn=100);
}
}
translate([0, 0, 15])
torus(r_major=12.625, r_minor=0.875, $fn=100);
}
difference() {
union() {
cylinder(h=10, d1=42, d2=44, $fn=100);
translate([0, 0, 10.1])
torus(r_major=18.5, r_minor=2, xs=1.75, $fn=100);
}
translate([0, 0, 5])
cylinder(h=5.01, d=24, $fn=100);
translate([0, 0, 10])
torus(r_major=12, r_minor=3, ys=1.66, $fn=100);
for (pos = poses)
translate([pos[0], pos[1], 0])
rotate([0, 0, pos[2]]) {
translate([0, 0, 2])
cylinder(h=13.01, d1=21, d2=23.5, $fn=100);
}
translate([0, 0, -0.01])
difference() {
cylinder(h=1.01, d=43, $fn=100);
translate([0, 0, -0.01])
cylinder(h=1.01, d=40, $fn=100);
}
}
translate([0, 0, 1.0])
torus(r_major=20, r_minor=1.0, xs=1.1, $fn=100);
module torus(r_major, r_minor, xs=1.0, ys=1.0) {
rotate_extrude()
translate([r_major, 0, 0])
scale([xs, ys, 1.0])
circle(r=r_minor);
}