Rotate and move to XY Plane

Hi, I was hoping someone could help me with my script. I have a wardrobe design which is a simple collection of extrusions. I am trying to rotate them all so they are all lying flat on the xy plane.



I’ve managed to get most of the way there, but some of the extrusions are sitting below 0 on the Z axis and some on 0. I would like to try and have them all aligned to 0.

If anyone has any suggestions it would be great, I’ve attahed the files if required.

Thanks
Grasshopper Rotation.gh (8.6 KB)
Grasshopper Rotation.3dm (4.4 MB)

I used Bounding Box to “normalize” the face planes for the Orient ‘A’ (Source) input. This results in stacking them all consistently just below Z = 0, which may not be what you want? And of course, spreading the parts out so they don’t overlap remains to be done.


Orient_layout_2025Jan20a.gh (10.1 KB)

P.S. Adding PFlip (Flip Plane, yellow group) puts them all just above Z = 0.


Orient_layout_2025Jan20b.gh (11.3 KB)

OpenNest is good for that so I added it in this version ‘c’, though I don’t understand the R8 version (v2.4.0.0) as well as I once did the R7 version. It works better now than the last time I looked so is worth the time to play with it. I could have used the Nest Options component instead of editing them as I did I (spacing 10) but discovered it too late.


Orient_layout_2025Jan20c.gh (25.2 KB)

Thank you very much. I was planning on using open nest once I’d fixed this part!