diff options
-rw-r--r-- | Optokopplerhalterung.scad | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Optokopplerhalterung.scad b/Optokopplerhalterung.scad index 2115720..8f18c36 100644 --- a/Optokopplerhalterung.scad +++ b/Optokopplerhalterung.scad @@ -20,16 +20,34 @@ module Sechseck(a,d) { module Wabe(x,y,d,a) { intersection() { cube([x,y,d]); - for (dy=[0:2*y/(sqrt(3)*a)]) + for (dy=[0:2*y/(sqrt(3)*a)+1]) for (dx=[0:3*a:x]) - translate([a+dx+(dy%2 == 1 ? 3/2*a : 0),a+dy*sqrt(3)/2*a,0]) + translate([a+dx+(dy%2 == 1 ? 3/2*a : 0),dy*sqrt(3)/2*a,0]) Sechseck(a,d); } } module Rahmen(x,y,z,d) { difference() { - cube([x,y,z]); + union() { + cube([x,y,d]); + for (i = [0:1]) + translate([(x-d)*i,0,z]) + hull() { + translate([0,0,d-z]) + cube([d,y,d]); + rotate([0,90,0]) + Wabe(z,y,d,a); + }; + for (i = [0:1]) + translate([0,d+(y-d)*i,z]) + hull() { + translate([0,-d,-z]) + cube([x,d,d]); + rotate([90,90,0]) + Wabe(z,x,d,a); + }; + }; for (f=[[-1,1,1],[1,-1,1],[1,1,-1]]) translate([f[0]*d,f[1]*d,f[2]*d]) cube([x-f[0]*2*d,y-f[1]*2*d,z]); |