Object (solid) x,y direction

Hi people,

How can I set the x,y direction of a solid in Rhino?

Ive imported some step files. I want to nest them in Grasshopper with Opennest. I dont want the objects to rotate in the nesting, so ive set rotations to 1. But the solids already have a predetermined direction. The step files were created in Spaceclaim and thats where they proberly got their x,y direction. It`s a lot of work to change this in Spaceclaim for multiple components.
Is there an wasy way to set an objects x, y direction in Rhino?



Hi Vincent -

While, I suppose, you could say that surfaces have an inherent x and y direction, it’s likely that this direction is not what you’d expect in all cases. You’ll have to rotate individual objects as required. If there is some rule to that that you can express, and you’ll be using Grasshopper downstream anyway, you could probably set up a definition to do so. I’m not sure why you wouldn’t want OpenNest to do the rotating…

Hi Wim,
The objects are wooden parts, so the grain direction is important.
I hoped there was a way to already determine x, y in Rhino. I could proberly set up a GH definition to do so, but since the parts have a different grain direction each time, it would be easyer to do manually. Just rotating them in Rhino doesn`t work (because x,y are already set somehow).

Hi Vincent -

That doesn’t sound right. Can you post a 3dm file with a single object that you can’t rotate?

Hello- just a guess here, but if you are rendering with materials using OCS mapped textures, and the wood grain direction is the thing, use ApplyOCSMapping on an object to set the mappingh direction as you like.


Hi Guys,

Thanks for your reply.
I think these pictures will explain it better by what I mean.
Also the .3dm and .gh files.

Nesting.gh (6.9 KB)
Parts for nesting.3dm (1.7 MB)


I’m not used to OpenNest, so I may be missing something here, but it appears the random rotation comes from the Hull component. Plugging directly the shapes in the nesting component keeps their orientation as imported from SpaceClaim.

Hi magicteddy,

Thanks for your reply!
I use the Hull component to flatten the parts out on the xy plane. (Sorry I didn`t mention this) This is because I get the parts as furniture objects like this:

I tried to avoid the Hull component and oriented (flattend) the parts like this but I get the same result.

What I want is that the length of all the parts are in the length direction of the sheet.
I don`t know how to fix this but proberly the frames (or vectors) of the eveluate surface have to be directed to longest vector direction of the parts? or something…
Furnitue object.3dm (1.5 MB)
Nesting_2.gh (13.3 KB)

I hope you guys can help me out.

Kind regards,



It seems on your screenshot that the nesting keeps the orientation of the unpacked parts. This is good, it means you now only have to orient them properly starting from your imported files, this is no longer an OpenNest issue, but a native GH one.

Do you mean the longest edge of the piece ? Some are almost square, so we may have to refine this rule.
Assuming on a sheet the reference direction is horizontal, left to right, could you draw some arrows on this exploded view below, to define piece by piece what direction you want to follow this reference direction. From there, we’ll find a rule to do that automatically, using Orient.


Yes I meant longest edge. I thougth this would be a good rule to start from although this might varies depending on the funiture piece.

Yes, that`s why I started the topic with my question how to give a x, y direction in Rhino.
I drew these stairs in Rhino and when referencing in Grasshopper you can see the positioning of the (evaluate surface) frames.

So this can`t even be nested.

Grain direction:

Theeeeere we go.

I tried several things and finally ended up computing the isocurves of the largest surface, and taking the longest one as the reference direction.
On the top and bottom pieces of the leftmost furniture though, the difference is only 2mm (which made the longest edge rule fail), so check the results if you have other pieces to orient.

On your stair, you could extract the largest edge and use Align Plane to rotate that frame in that direction… Or maybe the isocurve trick works as well.

OrientXY.gh (12.0 KB)

Thank you so much magicteddy!!
That works really well.
I tried it on the stairs stringers but it doesn`t work because of the iso curves.

I did what you said, extract the longest curve and it works fine!
Then I used this on the furniture parts, not the result that I wanted but could be necessary in some situations. So very informative!