Polygon Incircle

Polygons in Alibre Design can be defined by an "exterior" or "interior" circle.  The interior circle is typically used for bolt heads.  The circle is called an "incircle".  This script shows how to draw a polygon by defining the incircle diameter.

import math
# diameter of circle that fits inside polygon
Diameter = 100
# number of sides
Sides = 6
# calculate exterior diameter of polygon
EDia = Diameter / math.cos(math.pi / Sides)
# create part, create polygon sketch, extrude
P = Part('Hex')
S = P.AddSketch('Hexagon', P.GetPlane('XY-Plane'))
S.AddPolygon(0, 0, EDia, Sides, False)
P.AddExtrudeBoss('Hex Head', S, 10, False)

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.