I was trying to use grid_copies() for a situation where each copy needs an alteration based on their index, but I keep getting a [WARNING: Ignoring unknown variable '$idx' error.. Meanwhile if I replace $idx with $col, that still works.
For example, this works:
include <BOSL2/std.scad>
grid_copies(spacing=8, n=8)
color(($row+$col)%2?"black":"red")
cube([8,8,0.01], center=false);
But this does not:
include <BOSL2/std.scad>
grid_copies(spacing=8, n=8)
color(($idx)%2?"black":"red")
cube([8,8,0.01], center=false);
Unless recently, $idx was not documented to work for grid_copies() and this was correct. Sometime recently this was changed. Are you running the latest BOSL2?
I was trying to use grid_copies() for a situation where each copy needs an alteration based on their index, but I keep getting a
[WARNING: Ignoring unknown variable '$idx'
error.. Meanwhile if I replace $idx with $col, that still works.For example, this works:
But this does not: