Regular hexagon inscribed in a circle

Namaste All,
I am writing a def. on constructing a regular hexagon in a circle and came across this issue.
After getting all the points required, I was unable to get the polyline through them in the correct order without flattening the points individually.
Thanks.



inscribed regular hexagon.gh (21.4 KB)

Hi,

Is there a need to create the hexagon from scratch in your script?
the polygon tool inscribes any regular polygon within a circle of radius R.

@christopher.ho I was going through euclid’s constructions and was trying to replicate them in gh. thought it would help with the basics.what would you suggest? :smiley:

As Michael posted, you will need to internalise the data of your script before you post the script.

Since you are using curves formed by a protractor and getting the intersection.
use a “curve | curve” component which will intersect the circles and get the resultant points.
To organise the points you can use a Sort along curve to get them in the correct order.