 1.  ## Math Help

Hi everybody;

I need some help to solve a mathematical problem for one of my Revit families, the family I'm trying to create is a "Claustra" sorry but I didn't find the right name in English, It's a kind of Wooden Grid (see pic below) So my problem is that I need to be able to change the size of the grid length and still having always a distance between each element which is equal to 130 mm, til here no problem I've created a formula (a very simple one) which calculates the number of elements based on the total length of the grid (Which is my first parameter) divided by the distance between elements (second parameter) which drives to the number of elements which is an Integer parameter, the problem is that I'm having a distance which is not equal to the distance between elements that I need, I'm always having a random distance at the end of the grid, I mean if I change the length values I will have a distance which is always different regarding the total length of the element (see images)   Hope this make sense!!

How can I solve this? I know maybe is a very simple one but I'm stacked here Thanks in advance ans have a nice weekend!!    Reply With Quote

2. 1  Is the spacing between elements always going to be 130? Why is your input not the number of grids but the length of the claustra? You will always have a remainder on the last grid element unless you have a rounding formula.  Reply With Quote

3. 1  No real solution for this, if both the distance between the elements and the total length is given.

Possible options to solve this:

- Align the array to center this way the remainder will split between the two ends.
- Do not use the exact distance, but something close to it. I mean calculate the number of the grids from the distance, divide the full length with the number of grids, than use this distance. It will be close to the defined distance, and the model will look good.  Reply With Quote

4.   Originally Posted by Andrew K Is the spacing between elements always going to be 130? Why is your input not the number of grids but the length of the claustra? You will always have a remainder on the last grid element unless you have a rounding formula.
Hi, and thank you for your reply, yes the distance between elements must be always 130 mm*

My input is the length because I don't figure out another solution!!, but i'm open to suggestions

Thank you again  Reply With Quote

5.   Originally Posted by infeeeee No real solution for this, if both the distance between the elements and the total length is given.

Possible options to solve this:

- Align the array to center this way the remainder will split between the two ends.
- Do not use the exact distance, but something close to it. I mean calculate the number of the grids from the distance, divide the full length with the number of grids, than use this distance. It will be close to the defined distance, and the model will look good.
Thank you so much for your suggestion I'll give it a try!!  Reply With Quote

6.  you need to have 2 lengths

L desired length
l real length of lattice
n number of vertical elements

e thickness of the element

n = (L-e) / 130 +1
l = (n-1) * 130 + e  Reply With Quote

7.   Originally Posted by duende123 you need to have 2 lengths

L desired length
l real length of lattice
n number of vertical elements

e thickness of the element

n = (L-e) / 130 +1
l = (n-1) * 130 + e
Ok this is interesting, I'll try to use your formula in my family, thank you so much  Reply With Quote

8.  I forgot it
n has to be integer

(which is nonsense because if it were not interger you could not do the array)
(sorry)   Reply With Quote

9.   Originally Posted by duende123 I forgot it
n has to be integer

(which is nonsense because if it were not interger you could not do the array)
(sorry) No problem, I was trying to put your idea in my family and I was a little bit confused, anyway thank you for the reply  Reply With Quote

10.  Try it
In this kind of thing there are two situations
Mandatory space
Desired Length -> Real Length
Mandatory Length
Desired spacing -> Real spacing

If everything is very confusing we can go to Spanish
(poor thing until this helped me to translate)  Reply With Quote

parameter 