How to sort polysurfaces by size?

Hello everyone,

Is there a way to sort polysurfaces by size from largest to shortest in one axis? I have multiple box shaped polysurfaces representing 2"x4" lumber. The 2"x4" dimension in X and Y remains constant, but the Z length is different for most of them. I would like to sort them similar to a bar graph, from longest to shortest.

Thank you in advance.

Sorting means moving different polysurfaces to different places. Rhino cannot sort, but its SelSmall command can select all objects smaller than specified size. You have to move the selected objects manually. When the polysurfaces have been sorted, you can use Align and Distribute commands to arrange the polysurfaces.

Hello - here is a quick script that should do what you need - (2.0 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"



Thank you very much! Your script is an excellent solution to my problem. Not to mention it being an incredible time saver!

I truly appreciate your help.