In many constructions we encounter the need to create long elements (bars, pipes, profiles) - hereinafter referred to as bars, made of standard shorter elements of specified length. Examples of such constructions are balustrades, ladders, conveyors and the like.
Let us suppose that in a warehouse we have standard bars (replacement pipes, profiles, etc.), which have a specific length X.
Here a question arises: How many bars of X length I need in order to build one long bar of length L?
Other questions also arise here:
1. | Sometimes L is not a multiple of X and then the last part must be cut. Therefore, a question arises: How long is the cut element? |
2. | It happens that the cut part cannot be shorter than a specified length Lmin. If it happens, then not only the last part must be cut, but also the penultimate one. For the practical reasons it is assumed here that both cut elements are supposed to be equal. |
3. | It happens also that all parts should be a multiple of some P (pitch) number. If it happens, such an information must be added in the following functions. |
Therefore, the following functions are available for users.
FullBarQty(L;X;Lmin;P)
This function returns the number of complete sections of X length, which lies entirely in a section of L length.
Explanation concerning Lmin and P values is presented above. If these values have no meaning to the user, we assume that they are of "0" value.
CutBarQty(L;X;Lmin;P)
This function returns the number of cut pieces. As you may guess, possible values are „0” or „1”. If Lmin >0 then it may happen that the value of this function is "2".
CutBarLength(L;X;Lmin;P)
This function returns the length of an average section (or cut sections) that are left after putting the complete X sections into L length
The value Lmin is the shortest available length of such a section. If it happens that the calculations show that the cut section is shorter than Lmin, then the program calculates quantity and length in such a way that even penultimate part of the bar is cut. In this case we assume that the lengths of cut sections are equal.
FullBarLength(L;X;Lmin;P)
In principle, this function would be unnecessary because FullBarLenght is normally equal to X. However, it may happen that even the complete rods need cutting.
This case is described below:
Previously, it was necessary to explain „P” value. In some cases it is essential that the calculated sections length in FullBarLength and CuttBarLength is a multiple of the value P (pitch). It concerns such products as roller conveyors, ladders, balustrades, etc. (For products in which this value is not essential, enter P=0.)
The value P (if only it is greater than zero) slightly corrects (usually down) the expected values of length of the sections (FullBarLength and CutBarLength). Therefore, it may happen that the sum of all FullBarLenght and CuttBarLenght sections is not exactly equal to L that was imposed by an operator.
It needs to be remembered that when L<X, then CuttBarLengt(…)=L and CutBarQty(…) = 1