Carsten, you might want to increase your CGAL and polyset cache. I screwed

mine up to 400MB, which lets me construct even an 600x400 array.

The approach is straight forward: calc a single cylinder, file X*Y shifted

copies into a list and feed the right parts into a polyhedron. CFG (f5)

takes 47s on my notebook, CGAL (f6) needs its time, as we know, about 60 min

on my machine. I can export an STL.

X=300;

Y=200;

c=cyl();

cList = [for(x=[0:X-1], y=[0:Y-1]) shift(c, (x*Y+y)*12,

[1+x*2+(y+1)%2*1,1+y*2,2.5])];

polyhedron(filter(cList,0), filter(cList,1));

cube([601,400,2.5]);

function cyl(r1=1.15, r2=1,h=1) =

[concat(cyl2(r1), cyl2(r2,h)), // points

[[5,4,3,2,1,0],[6,7,8,9,10,11], // verts

for(i=[0:5]) [0+i,(1+i)%6,6+(1+i)%6],

for(i=[0:5]) [i,6+(1+i)%6,6+i]]]; // verts

function cyl2(r=1,h=0,n=6) = [for(i=[0:n-1])

r*[sin(i*360/n),cos(i*360/n),h]];

function offs(L, i) = [for(x=L) [for(y=x) y+i]];

function T_(L, v) = [for(p=L) p+v];

function shift(obj, offs=0, t=[0,0,0]) = [T_(obj[0],t), offs(obj[1],offs)];

function filter(L,j) = [for(v=L) for(w=v[j]) w];

--

Sent from:

http://forum.openscad.org/_______________________________________________

OpenSCAD mailing list

[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org