create_rectangle#
- Modeler2D.create_rectangle(origin, sizes, is_covered=True, name=None, material=None, non_model=False, **kwargs)#
Create a rectangle.
- Parameters:
- origin
list
Position of the lower-left corner of the rectangle
- sizes
list
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
- name
str
, default=None Name of the object. The default is
None
. IfNone
, a unique name NewObject_xxxxxx will be assigned)- material
str
, default=None Name of the material. The default is
None
. IfNone
, the default material is assigned.- non_modelbool,
optional
Either if create the new object as model or non-model. The default is
False
.
- origin
- Returns:
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="MyRectangle",material="Copper")