Align beams and columns

Hello everyone, can some one help me with the grasshopper script or logic for this β€”> i have a list of vertical columns and horizontal beams of a structure, i have to align all the columns and beams on xy plane such that all the longest side comes as length, the shorter side as width and the shortest side as height

what do you mean exactly with β€œList of”? a List of geometries, like Lines/curves/breps?

can you post a reference file?

columns and beams as breps

I would try something like this, but consider that knowing the shortest/longest/shorter side is along X/Y/Z axis does not define the direction of that axis :upside_down_face:

Orient_bounding_box.gh (14.6 KB)

you might want to introduce some flip curve to get the right orientation, or even change the indexes of the sampled bounding box edges

thank you, but this does not help :expressionless:

not very efficient but it gets the job done

Thank you Felipe, but this also does not work :neutral_face:

are your Breps oriented in such a way the sides of their bounding boxes are always along World X, Y, Z ?

Could you please post your file, or a sample with many different scenarios this definition should work with? because playing the game of mouse and cat by posting pictures instead of 3D geometries and try to guess what you need help with is not the very best strategy :slight_smile:

alignment.3dm (600.7 KB)

something like this could be a starting point


Orient_bounding_box_2.gh (70.3 KB)

1 Like

Thank you, this is exactly what I was looking for. :slightly_smiling_face: