-1
我试图通过forloop访问并分配给坐标的值赋给它们的单个变量,如下所示,或者至少能够在矩阵中分别访问这些值。OpenSCAD如何访问矩阵内的值
for (coordinates = [ [ 15, 15, 2],
[ 15, -15, 2],
[ -15, -15, 2],
[ -15, 15, 2] ])
{
x = coordinates[0];
y = coordinates[1];
z = coordinates[2];
translate([x+4, y, z]){
cube([x,y,z]);
}
}