create_regular_polygon#
- Modeler2D.create_regular_polygon(origin, start_point, num_sides=6, name=None, material=None, non_model=False, **kwargs)#
Create a rectangle.
- Parameters:
- origin
listoffloat Position of the center of the polygon in
[x, y, z].- start_point
listoffloat Start point for the outer path of the polygon in
[x, y, z].- num_sides
int Number of sides of the polygon. Must be an integer >= 3.
- name
str, default=None Name of the object. The default is
None. IfNone, a unique name NewObject_xxxxxx will be assigned)- material
str, default=None Name of the material. The default is
None. IfNone, the default material is assigned.- non_modelbool,
optional Either if create the new object as model or non-model. The default is
False.- **kwargsoptional
Additional keyword arguments may be passed when creating the primitive to set properties. See
ansys.aedt.core.modeler.cad.object_3d.Object3dfor more details.
- origin
- Returns:
References
>>> oEditor.CreateRegularPolygon
Examples
>>> pg1 = aedtapp.modeler.create_regular_polygon([0, 0, 0], [0, 2, 0]) >>> pg2 = aedtapp.modeler.create_regular_polygon(origin=[0, 0, 0], start_point=[0, 2, 0], ... name="MyPolygon", material="Copper")