create_ellipse#

Modeler3D.create_ellipse(orientation, origin, major_radius, ratio, is_covered=True, name=None, material=None, segments=0, **kwargs)#

Create an ellipse.

Parameters:
orientationstr or int

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

originlist

List of [x, y, z] coordinates for the center point of the ellipse.

major_radiusfloat

Base radius of the ellipse.

ratiofloat

Aspect ratio of the secondary radius to the base radius.

is_coveredbool, optional

Whether the ellipse is covered. The default is True, in which case the result is a 2D sheet object. If False, the result is a closed 1D polyline object.

namestr, optional

Name of the ellipse. 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.

segmentsint, optional

Number of segments to apply to create the segmented geometry. The default is 0.

**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:
ansys.aedt.core.modeler.cad.object_3d.Object3d

3D object.

References

>>> oEditor.CreateEllipse

Examples

The following example shows how to create an ellipse in HFSS. The required parameters are cs_plane, position, major_radius, ratio, and is_covered. The cs_plane parameter provides the plane that the ellipse is designed on. The position parameter provides the origin of the ellipse. The major_radius parameter provides the radius of the ellipse. The ratio parameter is a ratio between the major radius and minor radius of the ellipse. The is_covered parameter is a flag indicating if the ellipse is covered.

The optional parameter matname allows you to set the material name of the ellipse. The optional parameter name allows you to assign a name to the ellipse.

This method applies to all 3D applications: HFSS, Q3D, Icepak, Maxwell 3D, and Mechanical.

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> ellipse = aedtapp.modeler.create_ellipse(orientation='Z', origin=[0,0,0],
...                                          major_radius=2, ratio=2, is_covered=True, name="myell",
...                                          material="vacuum")