I have set of rectangle in list- A which is in desire direction and set of polyline in another list. and i want to get the same direction in list b as well
Direction.gh (18.7 KB)
I have set of rectangle in list- A which is in desire direction and set of polyline in another list. and i want to get the same direction in list b as well
Have you tried the FlipCurve component?
I think it takes a guide curve input which could be your rectangles.
I tired, you can look into script but its not working.
Direction_GuideCrv.gh (21.5 KB)
Does this work? Use the rectangles as guide for the FlipCrv component
Ok, but the direction looks consistent now at least?
To get the points in the same order starting at the same corner you can put an aligned plane on the average of the points, in the centre of each rectangle. Then work out the angle between the planes’ X-axes and a vector between the planes’ origins and each of the 4 points of the rectangles.
Sort these angles smallest to largest and sort the points of the rectangles according to the order of the angles (use the K and A inputs of the sort component)
Messy data tree but possible I think. Will try later if I get chance
These exist already in the definition and are stored in a plane container.
That is essentially what To Polar does.