create_rectangle

Modeler2D.create_rectangle(position, dimension_list, is_covered=True, name=None, matname=None)

Create a rectangle.

Parameters
positionlist of float

Position of the lower-left corner of the rectangle

dimension_listlist of float

List of rectangle sizes: [X size, Y size] for XY planes or [Z size, R size] for RZ planes

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

References

>>> oEditor.CreateRectangle

Examples

>>> rect1 = aedtapp.modeler.primitives.create_rectangle([0, -2, -2], [3, 4])
>>> rect2 = aedtapp.modeler.primitives.create_rectangle(position=[0, -2, -2], dimension_list=[3, 4],
...                                                     name="MyCircle", matname="Copper")