create_rectangle#
- Q2d.create_rectangle(origin: list, sizes: list, name: str | None = '', material: str | None = '') Object3d#
Create a rectangle.
- Parameters:
- origin
list List of
[x, y]coordinates for the starting point of the rectangle.- sizes
list List of
[width, height]dimensions.- name
str,optional Name of the rectangle. The default is
None, in which case the default name is assigned.- material
str,optional Name of the material. The default is
None, in which case the default material is used.
- origin
- Returns:
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")