Assemblies and their properties in GH

I keep coming back to this design issue. In normal programming, you store the object and props in a blob/array then replicate then render where you want.

In GH, you’re stuck to the objects, properties (colors) go separately…

Create a part for an assembly (like a car’s wheel) with multiple parts, each with their color. Then i want to replicate this part on each corner of the car (flipped, scaled or oriented another way) - with the preassigned colors (properties)…

I know GH is not the usual programming logic… Trying to wrap my head on this…

Best i got is…


wheel props.gh (25.6 KB)
But colors dont carry over…
image

What’s the right way of doing this?
OK, im trying to compute this the old way or ?

How do you scale this up?

Making the ‘assembly’s’ properties carry over? (Pointer to object → transform)

Maybe the right approach would be to make a block, where each of the objects you showed are parts in the block definition with their own colors. This will keep the color properties, whenever you insert a new block instance. Blocks can also be transformed and scaled.
Elefront plugin enables creation and manipulation of blocks.

1 Like