create_rectangle#
- Modeler3D.create_rectangle(orientation, origin, sizes, name=None, material=None, is_covered=True, **kwargs)#
Create a rectangle.
- Parameters:
- orientation
str
orint
Coordinate system plane for orienting the rectangle.
ansys.aedt.core.constants.PLANE
Enumerator can be used as input.- origin
list
orPosition
List of
[x, y, z]
coordinates of the lower-left corner of the rectangle or the position ApplicationName.modeler.Position(x,y,z) object.- 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 assigned.- is_coveredbool,
optional
Whether the rectangle is covered. The default is
True
.- **kwargs
optional
Additional keyword arguments may be passed when creating the primitive to set properties. See
ansys.aedt.core.modeler.cad.object_3d.Object3d
for more details.
- orientation
- Returns:
ansys.aedt.core.modeler.cad.object_3d.Object3d
or bool3D object or
False
if it fails.
References
>>> oEditor.CreateRectangle