# Multiple copies evenly spaced

I am interested to know how others approach a very common task.

In building design, you often have repetitions of elements like rafters or studs. Usually, they are set at fixed distances apart but sometimes you want them to be evenly spaced at an approximate distance apart.

If I am designing a window with mullions, I might decide I want five equal sized gaps. I would normally draw the surrounding frame and then use construction lines: two to represent the width of the frame/mullions, then copy to the far side, then divide by number 5. Easy enough but it gets harder when the number of elements increases as you donâ€™t know in advance how many divisions there will be. In that case, I usually measure the overall distance, divide by the approximate spacing to get the number before copying my element from one end to the other and then dividing by the number of gaps calculated.

I wondered if there was a faster way of doing this, either by cunning use of native tools or by use of an extension. The extension might be a fancy version of the Move-Copy tool in which you start by selecting an item, then input an approximate spacing, then select two points to start and finish, and the rest is then automated. Probably asking too much!

1 Like

Yes, thatâ€™s similar to what I described I think. But suppose you have a roof that is 12.2 m long. You want rafters at 400mm spacings. Now I have to do some mental arithmetic: 12200/400 = 30.5. To get regular spacings, I need to round up to 31. Now I can copy and divide by 31. Not so hard to do but if you are doing a number of such calculations in quick succession it does take time and can be prone to arithmetical error. I was just looking for a way of speeding it up.

I think trial and error would take even longer than calculation!

We have standard rafters at either 400mm or 600mm and would do exactly as you describe if they are hidden within the structure. But sometimes, you want to make a feature of them. Then it is important that you donâ€™t end up with an odd closing gap. Instead, you bunch the rafters closer together to make the spacings even.

The calculation is simple enough. If I were making one for a spreadsheet it would look like this:

N = ROUNDUP(L/S)

Where

L = Length elements are to be distributed along (from one side of element to furthest end of line)

S = approximate spacing

N = number of repeats

The macro/extension would then use N to copy the element. L would be determined by drafting input since SU would need to know both the length and direction. S would have to be user input as the system cannot be expected to guess that.

To get an even spacing on mulls I usually put the midpoint on the interior of my frame and then divide. But thatâ€™s just how I do it. Actually thatâ€™s only when Iâ€™m using a half profile as the window frame.

Iâ€™ve done that but now I do it with less or maybe just different effort.

2 Likes

Construction lines apart, thatâ€™s exactly my method when I know in advance how many divisions I want. In something small like a window, I normally do know. But when it comes to something like rafters or studs that are to be exposed, I donâ€™t know in advance and cannot easily guess.

If I knew how to code, Iâ€™d write a script because it is pretty simple.

If you draw a line the length of your work minus the thickness of one of your rafters, then divide the line you can get a pretty good Idea on you spacing just by sliding your mouse left and right.

1 Like

Letâ€™s say I start with a roof plate and have drawn a rafter on it to the far left of the plate. Length L would be the dimension from the right side of the rafter to the right hand end of the plate.

As Dave said earlier, here in the states I always layout at 16" or 24"s (sometimes 12" if Iâ€™m looking for less deflection). But for exposed rafter tails that are just ornamentation, then I would do just what you are saying.

I think we are all actually saying the same thing. I do know how to set things out evenly but I was just investigating if there was a speedier way than the longhand version (I know, call me lazyâ€¦). I think the answer is that there probably isnâ€™t, as I suspected.

Of course, you could always open the Ruby Console and type

n=(l.to_f/s).round

Note: the parens are necessary and the to.f is just to make sure you donâ€™t get integer division in case l and s are integers.

Steve, could you post an example of what youâ€™re saying. Iâ€™m not adept at the ruby console, so your formula is lost on me.

Thanks.

I just translated @simoncbevans spreadsheet formula to Ruby (actually mistranslated slightly as one needs to round up not just round). So, if the length L is 4500mm and the approximate spacing S is 400mm, in the Ruby Console type

(4500.to_f/400).ceil

the console will respond with 12

1 Like

Rick Wilsonâ€™s path copy would do this to some extent but you would have to add a path of the length you need and it will add copies at the specified spacing only to the extent of the line length, which does eliminate the math and guesswork for how many you need, but you would need to adjust the last rafter as it may be off if not a clean divisible amount. Rafter should be a component as axis is to be specified.

A more robust way would be to use Profile builder, again it would need a path to work from, but you can specify the spacing and then the end offset amount by the width of the rafter. The example shown is 24" spacing with a setback of 4" which is the width of the rafter used.

Use the divide function to determine the number and spacing without having to strain your brain cells, then array.

1 Like

but the question was how to make the divisions a specific amount 16" 24" etc. I think â€śSimon saysâ€ť he knows how to do even spacing with the move tool either by *x or / ? as heâ€™s trying to lay rafters at specific distances without guessing or having to calculate the amount along a particular run.

I use that to figure out balustery all the time. Just slide left and right to find what comes closest but under four inches.

There are many good suggestions here so thanks to everyone for supplying them.

Here is my normal workflow:

Step 1 - Determine length L, the line along which the array will be distributed, from the nearside of the object to be copied to the line end.
Step 2 - Use calculator to determine number of copies by dividing L by the approximate spacing.
Step 3 - Select item to be copied.
Step 4 - Select Move command.
Step 5 - Tap moderator key to induce Move-Copy.
Step 6 - Click ends of line L to determine source point and destination point.
Step 7 - Divide by number of copies calculated in Step 2.

If I knew how to code, I would write a script that, when run, would start by showing a dialog box asking the spacing to be input. It might also ask whether the spacing is to be exact or approximate. You would then do all the above steps from 3 to 6 but the script would do the rest. If you choose approximate spacing the spaces between the copies would be identical. If you choose exact, it would space all items at the set spacing. as many as the length allows, plus one on the end with a closing space.

If this became an extension it might be called Linear Array, say. I have described above a one dimensional array, but if you selected the whole linear array created and redid the process, you would get a two dimensional one. A third time could create a 3 dimensional one.

Until such time I would think PB3 is your best option?

I know exactly what you are talking about, but you might be missing a step. Somewhere you need to define the thickness of your material.
I only suggest that because Iâ€™m always stuck with laying out balustrade with what has been built at random. This screenshot is four different layouts for the balusters, to make then work to the â€śfour-inch sphere ruleâ€ť

here in the U.S.

1 Like