Divide a beam

In the shop there are 4 meters beams. I have some elements of different lengths and i want to know how many beams i have to buy- i want grasshopper to make groups of these lengths that equals 4 meters altogether. Is it possible do it not manually?

Hi @lenajablonska,

Sure thats possible!

How to approach this differs based on the way your geometry or data is set up, for example if your elements in Grasshopper are created from a Curve or Axis you can get the Length of the Axis via the CurveLength component and the number of beams needed is the length divided by 4 Meters rounded up.

To give a better solution, some Screenshots, or even better the file in question would be needed.

I have brept from rhino and a few groups like this one on the screenshot. I want to group these lengths in groups of 4 meters or a bit less, to estimate how many beams i have to buy

For Rectangular beams you can extract the faces and use the bigger surface dimension, it will be fairly accurate.

divideBeam.gh (23.1 KB)