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?
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…
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).
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.
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.
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)
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.
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.