Draw 6 sided polygon with certain distance across flats how?

How do I use the Polygon tool to draw polygons with a user indicated distance across the flats ?

Pick one is centre,
pick two is the corner.
I need option distance across flats, placing a corner is not usable for me.


What you want is a circumscribed polygon, with the diameter being the across flat distance.

The distance across the flats is D * cos(30 deg) where D is the diameter, ie the distance between opposite points. The cos of 30 deg is 0.8660254

In general the relationship between the distance across the flats and the diameter across the corners is:

Dflats = Ddia * cos(360 / (2 * n)) where n is the number of sides to the polygon. The argument for the cos of course simplifies to (180 / n).

You can see this by looking at the triangle formed by the radii from the center to two adjacent corners and the flat itself. The angle between two adjacent radii in degrees is 360 (in a full circle) divided by the number of sides. By bisecting the angle between the adjacent radii you will have a perpendicular bisector to the flat. This bisector, half of the flat from the bisector to one corner and the radius to that corner form a right triangle. The length of the perpendicular bisector is given by the general formula above.

You could probably make a macro for this.

As Mitch points out, it seems Dale already built this option into the polygon tool.


Now trying the Circumscribed Polygon, Centre osnap, click for centre then click at Circle/line intersect, see as gap.
delete try again, better,
click try again. still a bit of a gap.
Circle is distance across flats required, drew two lines at osnap quad to better represent that, the flats should be on those lines.

Glad to see this avoids the equations to create it !
Circumscribed polygon snap gap.3dm (131.7 KB)


Oh, come on now… this is not rocket science.


My rocket had a faulty igniter, I zoomed heavily in and got it, yet osnaps at normal working distance failed, not sure why.