52 lines
No EOL
1.1 KiB
OpenSCAD
52 lines
No EOL
1.1 KiB
OpenSCAD
szerokosc_szklanki = 45;
|
|
grubosc_szkla = 4;
|
|
|
|
wysokosc_uchwytu = 10;
|
|
dlugosc_uchwytu = 15;
|
|
grubosc_uchwytu = 2;
|
|
|
|
$fn=200;
|
|
|
|
cut_angle = 30;
|
|
|
|
glass_r = szerokosc_szklanki/2;
|
|
glass_t = grubosc_szkla;
|
|
|
|
h = wysokosc_uchwytu;
|
|
l = dlugosc_uchwytu;
|
|
t = grubosc_uchwytu;
|
|
|
|
sq_h = 2.5;
|
|
|
|
translate([glass_r-t-glass_t,0,0]) rotate([0,0,180+cut_angle/2])
|
|
difference() {
|
|
union() {
|
|
difference() {
|
|
cylinder(r=glass_r+t, h=h);
|
|
translate([0,0,-0.1]) cylinder(r=glass_r, h=h+0.1-sq_h);
|
|
cylinder(r=glass_r-glass_t-t, h=h+1);
|
|
}
|
|
difference() {
|
|
cylinder(r=glass_r-glass_t, h=h);
|
|
translate([0,0,-0.1]) cylinder(r=glass_r-glass_t-t, h=h+0.2);
|
|
}
|
|
}
|
|
translate([0,0,-0.1]) rotate_extrude(angle=360-cut_angle) square([glass_r*2, h+0.2]);
|
|
}
|
|
|
|
sq_w = 2.5;
|
|
sq_l = 15;
|
|
|
|
clamp_r = 7;
|
|
clamp_t = 1.5;
|
|
|
|
cut_size = 5;
|
|
|
|
translate([sq_l/2,0,h-sq_h/2]) union() {
|
|
cube([sq_l,sq_w,sq_h], center=true);
|
|
translate([sq_l/2 + clamp_r - clamp_t,0,-sq_h/2]) difference() {
|
|
cylinder(r=clamp_r,h=sq_h);
|
|
translate([0,0,-0.1]) cylinder(r=clamp_r-clamp_t,h=sq_h+0.2);
|
|
translate([clamp_r,0,sq_h/2]) cube([clamp_r*2,cut_size,sq_h*2], center=true);
|
|
}
|
|
} |