Change Linear Array Spacing in Grasshopper?

grasshopper
array

(Campbell) #1

Hi,

Thanks in advance, I’m relatively new to Grasshopper.

My goal is to create a definition to aid me in the layup (or stacking) of several pieces of hard wood. Currently, I don’t know the thickness of these boards, they could be anywhere from 1.5"-1.75". I wanted to use Grashopper to create an array to represent a stack of boards that will add up to a final length of 25." Since I do not yet know the thicknesses of my boards, the goal is to create an array that would change the spacing of the members of the array based on the final board thickness (which I won’t know until I plane my material in several weeks.)

My first attempt involved creating a linear array where I set the base geometry (a line that represents one board in the stack) and the direction (in this case the Y direction.) I attempted to create the “count” by dividing the length of one side of my final stack (25") by a number slider from 0<1.75 (the slider representing the thickness of each board.) However, as you can see, the spacing between the lines in the array remains the same and only the count changes.

I’m using Grasshopper and Rhino 5 for Windows.

How best should I proceed?

thanks,
C


(Michael Pryor) #2

Read the direction input description. Linear Array direction and Interval.

Plug a number value (slider) into the factor input of unit y component.


(Campbell) #3

Hi Michael,

Thank you so much, that ultimately answers my question and is a great solution (now seems obvious) thanks for your patience!

As a follow up, if I wanted the count of objects within my array to relate directly back to this factor, how would I restructure my definition?

In other words, my goal is to create an array where the number of members within the array is determined by the number of times the final geometry (25") can be divided by a certain thickness (between 1.5" and 1.75")

It’s simple enough to have a separate number slider to determine the count, but I’d like it to be automatically set based on 25/x. I attempted plugging the same Unit Y component in as the count as well but it didn’t have the desired result.

thanks again,
C


#4

Take a look at this thread: