Modeler2D.create_regular_polygon(origin, start_point, num_sides=6, name=None, material=None, non_model=False, **kwargs)[source]#

Create a rectangle.

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].


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.


Additional keyword arguments may be passed when creating the primitive to set properties. See pyaedt.modeler.cad.object3d.Object3d for more details.



>>> oEditor.CreateRegularPolygon


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