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:
- position
list
of
float
Position of the center of the polygon in
[x, y, z]
.- start_point
list
of
float
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.
- is_coveredbool
Specify whether the ellipse is a sheet (covered) or a line object
- name
str
, default=None Name of the object. The default is
None
. IfNone
, a unique name NewObject_xxxxxx will be assigned)- matname
str
, default=None Name of the material. The default is
None
. IfNone
, the default material is assigned.
- position
- Returns:
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")