create_rectangle#

Modeler2D.create_rectangle(origin, sizes, is_covered=True, name=None, material=None, non_model=False, **kwargs)[source]#

Create a rectangle.

Parameters:
originlist

Position of the lower-left corner of the rectangle

sizeslist

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)

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.

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

References

>>> oEditor.CreateRectangle

Examples

>>> rect1 = aedtapp.modeler.create_rectangle([0, -2, -2],[3, 4])
>>> rect2 = aedtapp.modeler.create_rectangle(origin=[0, -2, -2],sizes=[3, 4],name="MyCircle",material="Copper")