create_rectangle#

Modeler3D.create_rectangle(orientation, origin, sizes, name=None, material=None, is_covered=True, **kwargs)[source]#

Create a rectangle.

Parameters:
orientationstr or int

Coordinate system plane for orienting the rectangle. ansys.aedt.core.constants.PLANE Enumerator can be used as input.

originlist or Position

List of [x, y, z] coordinates of the lower-left corner of the rectangle or the position ApplicationName.modeler.Position(x,y,z) object.

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 assigned.

is_coveredbool, optional

Whether the rectangle is covered. The default is True.

**kwargsoptional

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.

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

3D object or False if it fails.

References

>>> oEditor.CreateRectangle