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:
originlist of float

Position of the center of the polygon in [x, y, z].

start_pointlist of float

Start point for the outer path of the polygon in [x, y, z].

num_sidesint

Number of sides of the polygon. Must be an integer >= 3.

namestr, default=None

Name of the object. The default is None. If None , a unique name NewObject_xxxxxx will be assigned)

materialstr, default=None

Name of the material. The default is None. If None, 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.Object3d for more details.

Returns:
ansys.aedt.core.modeler.cad.object_3d.Object3d

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")