3d/Cutin_Cup.scad

26 lines
608 B
OpenSCAD
Raw Normal View History

2018-01-27 17:09:26 +00:00
HEIGHT=30;
DIAMETER=100;
WALL_THICKNESS=5;
CUTIN_COUNT=4;
CUTIN_WIDTH=10;
CUTIN_HEIGHT=10;
$fn = 180;
difference() {
// the main body
difference() {
cylinder(h=HEIGHT + WALL_THICKNESS, d=DIAMETER + WALL_THICKNESS*2);
translate([0, 0, WALL_THICKNESS])
cylinder(h=HEIGHT, d=DIAMETER);
}
// cut-ins
translate([0, 0, HEIGHT - CUTIN_HEIGHT + WALL_THICKNESS])
for(i = [0 : CUTIN_COUNT - 1]) {
rotate([0, 0, (360 / CUTIN_COUNT) * i])
translate([-CUTIN_WIDTH/2, 0, 0])
cube([CUTIN_WIDTH, DIAMETER/2 + WALL_THICKNESS, CUTIN_HEIGHT]);
}
}