Arraying along a surface with no rotation of object

Hi There,

I’m trying to array an object along a surface so that the objects themselves remain in the same orientation.

So if you imagine the lines which are arrayed along the flat surface below were actually arrayed along the curved surface above it, and all of the lines remain upright and in the same grid (so that they remain in the same position from the top view)

I’ve tried arraysrf but the result is that all of the lines become angled in many directions and the grid is disrupted.

Many thanks for looking.

Best

Joe

I think that Grasshopper is currently the only general-case solution for this, in your specific case a simple script could be made to move/copy each element to its Z-projection point on the surface.

–Mitch

In the particular case you show, you could get a ‘cheat’ result by copying the freeform surface directly below the one shown at a distance equal to the length of the vertical lines that you’re trying to array on the surface. Then you could extend all of those vertical lines so that the go through both the top and bottom freeform surfaces, then just use the latter to trim all the lines.

Thanks Mitch and Matte,

No I’m looking to be able to do this with more complex shapes

Mitch can you recommend a grasshopper tutorial that would be able to guide me in the right direction?

I’m on Mac so will be using the ‘Explicit History’ Command…

Thanks

Joe

Sorry, I didn’t get back to this yesterday.

The critical problem here is to identify the point where you want the objects to “hit” the surface. In the case of your example with lines, this is very simple, you can just use the endpoints of the lines. However, as you stated that these represent in reality more complex objects, the case becomes less trivial. Imagine the lines were cylinders of a certain diameter instead. In projecting the cylinders up to your curved surface, the cylinder ends will not be flat to the surface obviously. So you have to decide - do you want them to “just touch” (first point of contact), touch the centerline (partialy embedded) or be fully embedded? All are possible, but each requires a slightly different algorithm. And if the objects are more complex than cylinders, perhaps all different sizes/shapes, it gets more complicated to decide where to place the projection…

Once the “contact” point has been determined, the actual moving of the objects is pretty trivial, just a displacement vector. The trick in something like Grasshopper is keeping the accounting of the objects organized so that each object gets the correct displacement. I will try to put together a couple of simple defs to show you how I would go about this.

Edit:
OK, here are a couple of definitions and accompanying Rhino files. One is with something similar to your line example, the other is for something volumetric like boxes. The second type I use occasionally for projecting/embedding building volumes into a terrain model for prototyping. There are some brief explanations in the gh files as to what each part does, but they are in no way intended to be a tutorial on basic Grasshopper use…

ProjLinesVToSrfMac.gh (17.4 KB)
ProjLinesVToSrf.3dm (420.0 KB)

ProjBoxesToSrfMac.gh (20.9 KB)
ProjBoxesToSrf.3dm (2.3 MB)

–Mitch

Mitch, many thanks - i’ll get my teeth into that over the weekend.

J

Hi Mitch,

I’ve spent a good while going through David Rutten’s Grasshopper tutorials and I feel like I have a basic understanding of how to use it now.

I’ve gone though your explanations too and I think that the project lines to surface one is more relevant.

To clarify: what I am trying to do is create a model of an installation of lightbulb pendants which I will then manufacture in reality.

Step 1 was to design the bulbs and pendants in rhino:

Next was to design the topography that the bulbs are going to follow (based conceptually on the form of the underside of the canopy of an Oak tree - I have not finalised this topography but I am using an arbitrary topography initially just to get an understanding of how to do it)

So now I need to array the pendants in a grid which follows the topography so that I can visualise it and work out what the best topography is. So I’m hoping that by understanding how to do this with a simple object (like a line or sphere) I will then be able to apply it to the more complex forms of the pendant model

The pendants will be hung from a flat ceiling so ultimately the original topography will be deleted, the cables will be cut and fixed to the flat ceiling plane and the individual lengths of the cables in each position will be of most interest as these will be the lengths which I will have to measure out in reality when creating the installation. ie these lengths will determine the topography that the bulbs create when they hang

Ive attached the files you sent over which I have modified slightly… there are two cases I was experimenting with (they are both in one file). In the first I have included a Brep which is just a sphere I’ve drawn in Rhino then arrayed. The output of the data from the brep goes into the move function which translates it upwards by a fixed vector. Unfortunately my meagre brain is struggling to understand what needs to be done in order to get them to each move by the correct vector amount to follow the topography.

The second example i’ve mainly just included to show you the model of the pendants which I am trying to get to follow the topography.

The other thing that I am struggling with is using Block instances. I have tried to set up the pendant models as blocks on this file however im not sure if it has worked as with the 121 unit array the file size ended up being < 40mb (as a result i have deleted most of the arrays so that I could upload it to you!)

Your help is greatly appreciated - Many thanks.

Joe

ProjLinesVToSrfMac (1).gh (23.8 KB)
ProjLinesVToSrf (1).3dm (19.1 MB)

Joe, just in case it helps - use RunPythonScript with the attached - I think it does what you want, but you’ll need to make a block from the line and ball things, then array that, if you want them to project as a unit.

MoveProjectEach.py (3.0 KB)

-Pascal

That works! many thanks! J