Coloring Arrayed Box Faces: Fixed vs. Random Logic
Subject: Issue with logic when assigning multiple colors to Box faces in an array
Hi everyone,
I am working on a parametric model in Grasshopper where I have an array of boxes. I am trying to achieve a specific coloring logic for each box, but currently, only one color is being applied to the entire array.
My Goal: For every single box in the array:
- Three specific faces must be assigned three fixed colors: Beige, Grass Green, and Light Yellow (one color per face).
- The remaining three faces should be assigned colors randomly selected from the same palette (Beige, Grass Green, Light Yellow).
The Problem: I am struggling with the component logic. Instead of each box having a mix of fixed and random colors, the entire array is showing only one uniform color. I suspect I might be mishandling the Data Tree or the Item Index when feeding colors into the Custom Preview or the Deconstruct Brep component.
Could anyone point out where the logic might be failing? How should I structure the list of colors to match the face indices of each box in the array?
Thanks in advance for your help!
The link is now updated with public access. You can download the .gh file here
https://drive.google.com/file/d/1CU5vppWkAGXPQ_OZNt8tGYAmGKJJ6oo8/view?usp=sharing