KiCadと3次元モデル(4)

これは、トグル・スイッチです。

そんなに正確ではありませんが、私の用途には十分でしょう。

// dimensions in inches

a=0.450;
b=0.500;
c=0.3350+0.060;
h1=0.350;
h2=0.410;
r1=0.25/2;
r2=0.115/2;

xoff=a/2;
yoff=b/2;
 
nx=2;
ny=3;
gx=0.190;
gy=0.185;
k=0.073/2;
h=0.201;

xoffset=(a-gx*(nx-1))/2;
yoffset=(b-gy*(ny-1))/2;
 
cube([a, b, c]);
 
translate([xoff,yoff,c])
        cylinder(h1, r1, r1, false,$fn=16);

translate([xoff,yoff,c+h1*0.9]) {
        rotate(30,[1,0,0])
        cylinder(h2, r2, r2, false,$fn=10);
 
}

for (x=[0:nx-1]) {
    for (y=[0:ny-1]) {
    translate([xoffset+gx*x,yoffset+gy*y,-h])
        cylinder(h, k, k, false);
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.