KiCadと3次元モデル(5)


// dimensions in mm
 
a=7.0;
b=7.0;
c=13.5-(5.8+1.8+3.9);

h1=1.8;
r1=25.4/4/2;

h2=5.8;
r2=r1*0.9;
 
xoff=a/2;
yoff=b/2;
  
nx=2;
ny=2;
gx=5.08;
gy=gx;
k=1.02;
k2=1.25/2;
h=3.9;
 
xoffset=(a-gx*(nx-1)-k2)/2;
yoffset=(b-gy*(ny-1)-k2)/2;
  
cube([a, b, c]);
  
translate([xoff,yoff,c])
        cylinder(h1, r1, r1, false,$fn=13);

difference() {
translate([xoff,yoff,c+h1])
        cylinder(h2, r2, r2, false,$fn=18);

translate([xoff,yoff,c+h1+h2*0.8])
        cylinder(h2*0.3, r2*0.9, r2*0.9, false,$fn=18);
}
 
for (x=[0:nx-1]) {
    for (y=[0:ny-1]) {
    translate([xoffset+gx*x,yoffset+gy*y,-h])
        cube([k, k, h]);
    }
}

translate([xoff, yoff, -h])
cylinder(h, k2, k2, false, $fn=20);

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.