diff options
-rw-r--r-- | Schluesselanhaenger.scad | 101 |
1 files changed, 57 insertions, 44 deletions
diff --git a/Schluesselanhaenger.scad b/Schluesselanhaenger.scad index c46b5a7..6cf5d34 100644 --- a/Schluesselanhaenger.scad +++ b/Schluesselanhaenger.scad @@ -4,53 +4,66 @@ b = 30; alpha = 30; r = 2.5; rBohrung = 1; +gravurTiefe = 0.5; -rotate_extrude(angle = 180, $fn = 100) - translate([h/2,0,0]) - circle(r = d/2, $fn = 100); -for (i=[-1:2:1]) { - translate([i*h/2,0,0]) - rotate([90,0,0]) - linear_extrude(b) +difference() { + union() { + rotate_extrude(angle = 180, $fn = 100) + translate([h/2,0,0]) circle(r = d/2, $fn = 100); - rotate([0,90*(i+1),0]) { - translate([0,-b,0]) - rotate_extrude(angle = -alpha, $fn = 100) - translate([h/2,0,0]) - circle(r = d/2, $fn = 100); - translate([-h/2*cos(alpha),-b-h/2*sin(alpha),0]) - rotate([90,0,alpha]) - linear_extrude((h/2-r)/tan(alpha)) + for (i=[-1:2:1]) { + translate([i*h/2,0,0]) + rotate([90,0,0]) + linear_extrude(b) + circle(r = d/2, $fn = 100); + rotate([0,90*(i+1),0]) { + translate([0,-b,0]) + rotate_extrude(angle = -alpha, $fn = 100) + translate([h/2,0,0]) + circle(r = d/2, $fn = 100); + translate([-h/2*cos(alpha),-b-h/2*sin(alpha),0]) + rotate([90,0,alpha]) + linear_extrude((h/2-r)/tan(alpha)) + circle(r = d/2, $fn = 100); + } + } + translate([0,-b-h/2*sin(alpha)+r*sin(180-alpha)-(h/2-r)/tan(alpha)*cos(alpha),0]) { + rotate([0,0,-180+alpha]) + rotate_extrude(angle = 180 - 2*alpha, $fn = 100) + translate([r,0,0]) + circle(r = d/2, $fn = 100); + rotate_extrude(angle = 360, $fn = 100) + translate([rBohrung + d/2,0,0]) circle(r = d/2, $fn = 100); - } -} -translate([0,-b-h/2*sin(alpha)+r*sin(180-alpha)-(h/2-r)/tan(alpha)*cos(alpha),0]) { - rotate([0,0,-180+alpha]) - rotate_extrude(angle = 180 - 2*alpha, $fn = 100) - translate([r,0,0]) - circle(r = d/2, $fn = 100); - rotate_extrude(angle = 360, $fn = 100) - translate([rBohrung + d/2,0,0]) - circle(r = d/2, $fn = 100); -} -translate([0,0,-d/2]) - linear_extrude(d) - difference() { - union() { - translate([-h/2,-b]) - square([h,b]); - for (i=[0:1]) - translate([0,-b*i,0]) - circle(r = h/2, $fn = 100); + } + translate([0,0,-d/2]) + linear_extrude(d) + difference() { + union() { + translate([-h/2,-b]) + square([h,b]); + for (i=[0:1]) + translate([0,-b*i,0]) + circle(r = h/2, $fn = 100); + translate([0,-b-h/2*sin(alpha)+r*sin(180-alpha)-(h/2-r)/tan(alpha)*cos(alpha)]) + circle(r = r, $fn = 100); + polygon([ + [-h/2*cos(alpha),-b-h/2*sin(alpha)], + [-r*cos(alpha),-b-h/2*sin(alpha)-(h/2-r)/tan(alpha)*cos(alpha)], + [r*cos(alpha),-b-h/2*sin(alpha)-(h/2-r)/tan(alpha)*cos(alpha)], + [h/2*cos(alpha),-b-h/2*sin(alpha)], + ]); + } translate([0,-b-h/2*sin(alpha)+r*sin(180-alpha)-(h/2-r)/tan(alpha)*cos(alpha)]) - circle(r = r, $fn = 100); - polygon([ - [-h/2*cos(alpha),-b-h/2*sin(alpha)], - [-r*cos(alpha),-b-h/2*sin(alpha)-(h/2-r)/tan(alpha)*cos(alpha)], - [r*cos(alpha),-b-h/2*sin(alpha)-(h/2-r)/tan(alpha)*cos(alpha)], - [h/2*cos(alpha),-b-h/2*sin(alpha)], - ]); + circle(r = rBohrung + d/2, $fn = 100); } - translate([0,-b-h/2*sin(alpha)+r*sin(180-alpha)-(h/2-r)/tan(alpha)*cos(alpha)]) - circle(r = rBohrung + d/2, $fn = 100); } + translate([0,-b/2,d/2-gravurTiefe]) + rotate([0,0,90]) + linear_extrude(2*gravurTiefe) + text("links", size = 0.8*h, halign = "center", valign = "center"); + translate([0,-b/2,-d/2+gravurTiefe]) + rotate([0,180,-90]) + linear_extrude(2*gravurTiefe) + text("rechts", size = 0.8*h, halign = "center", valign = "center"); +}
\ No newline at end of file |