//Basic Variables wall= 0.6; // thickness of the wall between the cells cellsize= 4.85; // diameter of the inner circle of a cell cellhight= 11; // lowest hight of a cell (without the pyramid bottom) //Variables for honeycomb size coll= 5; //number of collons rows= 5; //number of rows //------------------------------------ //Variables for CellGeometry a= (cellsize / 2) / sin(60); // side length of the hexagon ph= a / (2 * sqrt(2)); // special hight to construct the peak of the pyramid cell-bottom //calculating honeycomb size rowh= a + a / 2 + wall / 2 / cos(30) + wall / 2 * tan(30); // hight of a row collw= cellsize + wall; // width of a collon wmin= 2 * a + wall / 2 / cos(30) + wall / 2 * tan(30); //min width of honeycomb h= 2 * cellhight + 1; //hight of honeycomb l= collw * coll; //lenth of honeycomb w= wmin + rowh * (rows - 1); //width of honeycomb // Main geometry difference() { Base(); Cells(); } // Core geometric primitives. module Base() { cube([l,w,h]); } module CellGeometry() { polyhedron( points=[ [0,-a,0], [cellsize / 2,-a / 2,0], [cellsize / 2,a / 2,0], [0,a,0], [-cellsize / 2,a / 2,0], [-cellsize / 2,-a / 2,0], [0,-a,cellhight + 1 - ph], [cellsize / 2,-a / 2,cellhight + 1], [cellsize / 2,a / 2,cellhight + 1 - ph], [0,a,cellhight + 1], [-cellsize / 2,a / 2,cellhight + 1 - ph], [-cellsize / 2,-a / 2,cellhight + 1], [0,0,cellhight + 1 + ph] ], faces=[ [0,5,4,3,2,1], [0,1,7,6], [1,2,8,7], [2,3,9,8], [3,4,10,9], [4,5,11,10], [5,0,6,11], [11,6,7,12], [11,12,9,10], [9,12,7,8] ], convexity = 10 ); } module CellI() translate([collw / 2,-(a / 2 + wall / 2 * tan(30)),2 * cellhight + 2]) rotate([0,180,0]) CellGeometry(); module CellA() translate([0,0,-1]) rotate([0,0,60]) CellGeometry(); module CellrowIshort() { for(i=[0:coll - 1]) translate([collw * i,0,0]) CellI(); } module CellrowIlong() { for(i=[0:coll]) translate([collw * i - collw / 2,a + wall / 2 / cos(30) + a / 2 + wall / 2 * tan(30),0]) CellI(); } module CellrowAlong(){ for(i=[0:coll]) translate([collw * i,0,0]) CellA(); } module CellrowAshort() { for(i=[0:coll - 1]) translate([collw * i + collw / 2,a + wall / 2 / cos(30) + a / 2 + wall / 2 * tan(30),0]) CellA(); } module Cells() { for(i=[0:2:rows + 1]) translate([0,(a + wall / 2 / cos(30) + a / 2 + wall / 2 * tan(30)) * i,0]) { CellrowIshort(); CellrowAlong(); } for(i=[1:2:rows + 1]) translate([0,(a + wall / 2 / cos(30) + a / 2 + wall / 2 * tan(30)) * (i - 1),0]) { CellrowIlong(); CellrowAshort(); } }