Distribute Objects with specific gap along a straight line or length

Hello,

Im currently making some diagrams and I have many drawings. Each drawing has a bounding box.

The size to print is A1. Thats 59.4cm horizontally in portrait.

I want to distribute each drawing so that it has the same gap between them and the margin of the page. Each bounding box is different. See this file for better understanding of what I need to do. Boxes with Page.3dm (151.0 KB)

How can I achieve this?

Well, without resorting to a script, there is one easy way to do this “manually”… If you don’t have too many items.

First, grab the first box and its contents and snap its left edge to the left edge of the drawing margin. Then take the next box plus contents and snap it from a point on its left edge, perpendicular to the first one (use near and perp osnaps). Do this for all boxes.

Then measure the leftover distance and divide by the number of spaces you need. Select the whole lot minus the first box and move right the increment distance. Deselect the next left box and repeat. Do the same for the rest.

It actually takes more time to type the instructions than to do it.

Obviously, if you need to do this repeatedly, a script will be better.

–Mitch

Pascal’s script Distribute Objects will do this

available here:

http://wiki.mcneel.com/people/pascalgolay

As an aside for V6 would be nice when you add a script to have the option for it to copy the file to some central folder automatically. I’m famous for downloading scripts then adding them from downloads folder, later to empty the downloads folder and script breaks etc.

Indeed, another easy way to do it is to measure the total distance of the boxes, subtract that to the page length (54.9cm) and divide it by the number of gaps.

Thank you anyways, but I yes I was talking about a more industrialized way hehe

I have that script and use it a lot, but its not enough for this task. I have to specify a distance along which to distribute.

Each row of boxes is different, thus I would have to calculate each row of boxes gap and then apply distribute.

FYI, the Rhino WIP has as new Distribute command!

http://docs.mcneel.com/rhino/6/help/en-us/index.htm#commands/distribute.htm

1 Like

Unless I am missing something… Distribute has an option for equalizing the gap vs. centres.

I need a gap between the margins too. Is that possible? Maybe its just me who doesnt know how to use all the options on the command.

Is this what you’re going for? I just added some polylines at the margin and included them when running distribute.

That would do it, thank you sir