create_regular_polygon#

Modeler2D.create_regular_polygon(position, start_point, num_sides=6, is_covered=True, name=None, matname=None)[source]#

Create a rectangle.

Parameters:
positionlist 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.

is_coveredbool

Specify whether the ellipse is a sheet (covered) or a line object

namestr, default=None

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

matnamestr, default=None

Name of the material. The default is None. If None, the default material is assigned.

Returns:
pyaedt.modeler.cad.object3d.Object3d

References

>>> oEditor.CreateRegularPolygon

Examples

>>> pg1 = aedtapp.modeler.create_regular_polygon([0, 0, 0], [0, 2, 0])
>>> pg2 = aedtapp.modeler.create_regular_polygon(position=[0, 0, 0], start_point=[0, 2, 0],
...                                              name="MyPolygon", matname="Copper")