3d/Case_Flashlight.scad

45 lines
1.3 KiB
OpenSCAD
Raw Normal View History

2017-11-26 21:48:30 +00:00
// Bike handlebar mount for this flashlight:
// https://www.amazon.de/gp/product/B01GPUBCFK
WALLSIZE=5;
CIRCLE_ROUNDS=18;
difference() {
union() {
difference() {
cylinder(d=35+WALLSIZE, h=WALLSIZE, $fn=CIRCLE_ROUNDS);
cylinder(d=30, h=WALLSIZE, $fn=CIRCLE_ROUNDS);
}
translate([0, 0, WALLSIZE])
difference() {
cylinder(d1=35+WALLSIZE, d2=40+WALLSIZE, h=30, $fn=CIRCLE_ROUNDS);
cylinder(d1=35, d2=40, h=30, $fn=CIRCLE_ROUNDS);
}
difference() {
union() {
translate([0, 0, WALLSIZE+30])
difference() {
cylinder(d1=40+WALLSIZE, d2=30+WALLSIZE, h=35, $fn=CIRCLE_ROUNDS);
cylinder(d1=40, d2=30, h=35, $fn=CIRCLE_ROUNDS);
}
translate([0, 0, WALLSIZE+65])
difference() {
cylinder(d=30+WALLSIZE, h=70, $fn=CIRCLE_ROUNDS);
cylinder(d=30, h=70, $fn=CIRCLE_ROUNDS);
}
}
}
translate([0, 0, 135+WALLSIZE])
difference() {
cylinder(d=30+WALLSIZE, h=WALLSIZE, $fn=CIRCLE_ROUNDS);
cylinder(d=20, h=WALLSIZE, $fn=CIRCLE_ROUNDS);
}
}
translate([-20-WALLSIZE, 0, 0])
cube([40+WALLSIZE*2, 30, 135+WALLSIZE*2]);
}