create_rectangle#

Q2d.create_rectangle(origin: list, sizes: list, name: str | None = '', material: str | None = '') Object3d#

Create a rectangle.

Parameters:
originlist

List of [x, y] coordinates for the starting point of the rectangle.

sizeslist

List of [width, height] dimensions.

namestr, optional

Name of the rectangle. The default is None, in which case the default name is assigned.

materialstr, optional

Name of the material. The default is None, in which case the default material is used.

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

3D object.

References

>>> oEditor.CreateRectangle

Examples

>>> from ansys.aedt.core.q3d import Q2d
>>> obj = Q2d()
>>> obj.create_rectangle(origin=[0, 0], sizes=[10, 5], name="MyRectangle", material="copper")