New paste Repaste Download
module Grid(num_x, num_y, spacing_x, spacing_y) {
  for ($xi=[0:num_x-1]) {
    for ($yi=[0:num_y-1]) {
      $ei = $xi + num_x*$yi;
      translate([spacing_x*$xi, spacing_y*$yi, 0]) children();
    }
  }
}
module Element() {
  text(str($params[$ei]));
}
vals = [for (x=[0:10*9-1]) x*x];
Grid(10, 9, 50, 15, $params=vals) Element();
Filename: None. Size: 353b. View raw, , hex, or download this file.

This paste expires on 2024-11-22 19:49:39.344856. Pasted through web.