[OpenSCAD] too many hexagons crashes openscad (how many is too many?)

wb a at webbrain.io
Sun Oct 28 11:10:35 EDT 2018

I am a complete beginner trying to build a somewhat unusual object.
I would like to 3D print in metal a thin sheet with 100,000 hexagons on top
of it.
However, once I go past 20,000 object openscad crashes every time.

This is my code so far:

union() {


    for (x = [2:2:200], // <--- I WANT TO INCREASE THIS VALUE to 600
	 y = [2:2:200])   // <--- I WANT TO INCREASE THIS VALUE to 400
// ((x/2)%2) to alternate even and odd rows
	    // rotate([0,0,15*y])
	    cylinder($fn = 6, h = 1, r1 = 1.15, r2 = 1, center = true);

Which produces something like this:

I may be missing something obvious which makes the code take too much
memory.  Is there an alternative, or have I hit the limits?  Otherwise, does
it simply seem like a limitation from my computer?

Thank you for any guidance.

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list