Using Excel Coordinates To Place 4 Point Adaptive Component

Hello,
I am trying to place a 4 point adaptive component. I have progressed all the way to the point of having the points grouped into the 4 points I need. All I need to do now is reorder the points to go in a ccw order. how would i go about doing that?

CCW = Counter clockwise?

It would be similar to the method which is best described by @Konrad_K_Sobon here:

could it be done with less code and more dynamo nodes

A less-code-but-still-code solution can be a one-liner that use python sorted function(last line, OUT=…).
Essentially atan2 function calculate the angle between (0,0) to (x,y) and x axis, then use that value to sort to have a CCW order.

This assumes that all points have same Z value. But you can easily tweak it for other conditions.

1 Like